Enable the quiet option to the btrfs(8) subvolume create command.
Does the job quietly. For example:
btrfs --quiet subvolume create <path>
Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
v2: use MUST_LOG
cmds/subvolume.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/cmds/subvolume.c b/cmds/subvolume.c
index 279c75d0669a..459661a93e31 100644
--- a/cmds/subvolume.c
+++ b/cmds/subvolume.c
@@ -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;
--
2.25.1