mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2025-01-24 20:53:21 +08:00
btrfs-progs: Fix device scan to interpret its argument properly
Fix the following bug. ================================ # btrfs device scan -- /dev/sdb ERROR: not a block device: -- ================================ It should work as follow. ================================ # ./btrfs device scan -- /dev/sdb Scanning for Btrfs filesystems in '/dev/sdb' ================================ Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
3ee935e4dd
commit
1ff2823225
@ -222,7 +222,7 @@ static const char * const cmd_device_scan_usage[] = {
|
||||
static int cmd_device_scan(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
int devstart = 1;
|
||||
int devstart;
|
||||
int all = 0;
|
||||
int ret = 0;
|
||||
|
||||
@ -245,6 +245,7 @@ static int cmd_device_scan(int argc, char **argv)
|
||||
usage(cmd_device_scan_usage);
|
||||
}
|
||||
}
|
||||
devstart = optind;
|
||||
|
||||
if (all && check_argc_max(argc - optind, 1))
|
||||
usage(cmd_device_scan_usage);
|
||||
|
Loading…
Reference in New Issue
Block a user