diff mbox series

[3/8] btrfs-progs: subvolume delete: add quiet option

Message ID 20200608063851.8874-4-anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: add quiet option | expand

Commit Message

Anand Jain June 8, 2020, 6:38 a.m. UTC
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@oracle.com>
---
 cmds/subvolume.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

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);