@@ -669,6 +669,8 @@ static const char * const cmd_subvol_snapshot_usage[] = {
"-r create a readonly snapshot",
"-i <qgroupid> add the newly created snapshot to a qgroup. This",
" option can be given multiple times.",
+ HELPINFO_INSERT_GLOBALS,
+ HELPINFO_INSERT_QUIET,
NULL
};
@@ -783,11 +785,13 @@ static int cmd_subvol_snapshot(const struct cmd_struct *cmd,
if (readonly) {
args.flags |= BTRFS_SUBVOL_RDONLY;
- printf("Create a readonly snapshot of '%s' in '%s/%s'\n",
- subvol, dstdir, newname);
+ pr_verbose(-1,
+ "Create a readonly snapshot of '%s' in '%s/%s'\n",
+ subvol, dstdir, newname);
} else {
- printf("Create a snapshot of '%s' in '%s/%s'\n",
- subvol, dstdir, newname);
+ pr_verbose(-1,
+ "Create a snapshot of '%s' in '%s/%s'\n",
+ subvol, dstdir, newname);
}
args.fd = fd;
Enable the quiet option to the btrfs(8) subvolume snapshot command. Does the job quietly. For example: btrfs -q subvolume snapshot <src> <dest> Signed-off-by: Anand Jain <anand.jain@oracle.com> --- cmds/subvolume.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)