@@ -305,6 +305,7 @@ static const char * const cmd_device_scan_usage[] = {
" -u|--forget [<device>...] unregister a given device or all stale devices if no path ",
HELPINFO_GLOBAL_OPTIONS_HEADER,
HELPINFO_INSERT_VERBOSE,
+ HELPINFO_INSERT_QUIET,
NULL
};
@@ -355,7 +356,7 @@ static int cmd_device_scan(const struct cmd_struct *cmd, int argc, char **argv)
error("cannot unregister devices: %m");
}
} else {
- printf("Scanning for Btrfs filesystems\n");
+ pr_verbose(-1, "Scanning for Btrfs filesystems\n");
ret = btrfs_scan_devices(1);
error_on(ret, "error %d while scanning", ret);
ret = btrfs_register_all_devices();
Enable the quiet option to the btrfs(8) device scan command. Does the job quietly. For example: btrfs --quiet device scan Signed-off-by: Anand Jain <anand.jain@oracle.com> --- v1.1: fix typo in HELPINFO_INSERT_QUIET cmds/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)