btrfs-progs: subvolume create: add global quiet option

Enable the quiet option to the subvolume create command.
Does the job quietly. For example:

  $ btrfs --quiet subvolume create <path>

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Anand Jain 2020-06-12 01:41:17 +08:00 committed by David Sterba
parent c19cc45e5e
commit ebeaf0089d

View File

@ -88,6 +88,8 @@ static const char * const cmd_subvol_create_usage[] = {
"",
"-i <qgroupid> add the newly created subvolume to a qgroup. This",
" option can be given multiple times.",
HELPINFO_INSERT_GLOBALS,
HELPINFO_INSERT_QUIET,
NULL
};
@ -169,7 +171,7 @@ static int cmd_subvol_create(const struct cmd_struct *cmd,
if (fddst < 0)
goto out;
printf("Create subvolume '%s/%s'\n", dstdir, newname);
pr_verbose(MUST_LOG, "Create subvolume '%s/%s'\n", dstdir, newname);
if (inherit) {
struct btrfs_ioctl_vol_args_v2 args;