btrfs-progs: device scan: add global verbose option
Enable verbose output for the device scan, this uses the global verbose option. For example: $ btrfs -v device scan Scanning for Btrfs filesystems registered: /dev/sda1 registered: /dev/sda2 registered: /dev/sda3 registered: /dev/sda5 registered: /dev/sda6 Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
aeb2242b70
commit
e7f1d41f3f
|
@ -305,6 +305,8 @@ static const char * const cmd_device_scan_usage[] = {
|
||||||
" -d|--all-devices enumerate and register all devices, use as a fallback",
|
" -d|--all-devices enumerate and register all devices, use as a fallback",
|
||||||
" if blkid is not available",
|
" if blkid is not available",
|
||||||
" -u|--forget [<device>...] unregister a given device or all stale devices if no path ",
|
" -u|--forget [<device>...] unregister a given device or all stale devices if no path ",
|
||||||
|
HELPINFO_INSERT_GLOBALS,
|
||||||
|
HELPINFO_INSERT_VERBOSE,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -356,7 +358,7 @@ static int cmd_device_scan(const struct cmd_struct *cmd, int argc, char **argv)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
printf("Scanning for Btrfs filesystems\n");
|
printf("Scanning for Btrfs filesystems\n");
|
||||||
ret = btrfs_scan_devices(0);
|
ret = btrfs_scan_devices(1);
|
||||||
error_on(ret, "error %d while scanning", ret);
|
error_on(ret, "error %d while scanning", ret);
|
||||||
ret = btrfs_register_all_devices();
|
ret = btrfs_register_all_devices();
|
||||||
error_on(ret,
|
error_on(ret,
|
||||||
|
|
Loading…
Reference in New Issue