Enable the quiet option to the btrfs(8) subvolume delete command.
Does the job quietly. For example:
btrfs --quiet subvolume delete <path>
Also, fix a line with over 80 char with proper indentation.
Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
cmds/subvolume.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmds/subvolume.c b/cmds/subvolume.c
index ed3a3ab48ec7..9c8fe35a2aae 100644
--- a/cmds/subvolume.c
+++ b/cmds/subvolume.c
@@ -359,14 +359,14 @@ again:
goto out;
}
- printf("Delete subvolume (%s): ",
- commit_mode == COMMIT_EACH || (commit_mode == COMMIT_AFTER && cnt + 1 == argc)
+ pr_verbose(-1, "Delete subvolume (%s): ",
+commit_mode == COMMIT_EACH || (commit_mode == COMMIT_AFTER && cnt + 1 == argc)
? "commit" : "no-commit");
if (subvolid == 0)
- printf("'%s/%s'\n", dname, vname);
+ pr_verbose(-1, "'%s/%s'\n", dname, vname);
else
- printf("'%s'\n", full_subvolpath);
+ pr_verbose(-1, "'%s'\n", full_subvolpath);
if (subvolid == 0)
err = btrfs_util_delete_subvolume_fd(fd, vname, 0);
--
2.25.1