2007-03-31 01:00:26 +04:00
/*
* Copyright ( C ) 2001 - 2004 Sistina Software , Inc . All rights reserved .
* Copyright ( C ) 2007 Red Hat , Inc . All rights reserved .
*
* This file is part of LVM2 .
*
* This copyrighted material is made available to anyone wishing to use ,
* modify , copy , or redistribute it subject to the terms and conditions
2007-08-21 00:55:30 +04:00
* of the GNU Lesser General Public License v .2 .1 .
2007-03-31 01:00:26 +04:00
*
2007-08-21 00:55:30 +04:00
* You should have received a copy of the GNU Lesser General Public License
2007-03-31 01:00:26 +04:00
* along with this program ; if not , write to the Free Software Foundation ,
2016-01-21 13:49:46 +03:00
* Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA
2007-03-31 01:00:26 +04:00
*/
# include "tools.h"
int pvck ( struct cmd_context * cmd , int argc , char * * argv )
{
2007-04-26 00:03:16 +04:00
int i ;
2014-11-13 15:26:43 +03:00
int ret_max = ECMD_PROCESSED ;
2007-04-26 00:03:16 +04:00
/* FIXME: validate cmdline options */
/* FIXME: what does the cmdline look like? */
2014-11-13 15:26:43 +03:00
2018-02-15 20:06:50 +03:00
label_scan_setup_bcache ( ) ;
2007-04-26 00:03:16 +04:00
/*
* Use what ' s on the cmdline directly , and avoid calling into
* some of the other infrastructure functions , so as to avoid
* hitting some of the lvmcache behavior , scanning other devices ,
* etc .
*/
for ( i = 0 ; i < argc ; i + + ) {
/* FIXME: warning and/or check if in use? */
log_verbose ( " Scanning %s " , argv [ i ] ) ;
2011-08-30 18:55:15 +04:00
dm_unescape_colons_and_at_signs ( argv [ i ] , NULL , NULL ) ;
2014-11-13 15:26:43 +03:00
if ( ! pv_analyze ( cmd , argv [ i ] ,
arg_uint64_value ( cmd , labelsector_ARG , UINT64_C ( 0 ) ) ) ) {
stack ;
ret_max = ECMD_FAILED ;
}
2007-04-26 00:03:16 +04:00
}
2014-11-13 15:26:43 +03:00
return ret_max ;
2007-03-31 01:00:26 +04:00
}