diff mbox series

[v2,1/8] btrfs-progs: quota rescan: add quiet option

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

Commit Message

Anand Jain June 11, 2020, 5:41 p.m. UTC
Enable the quiet option to the btrfs(8) quota rescan command.
Does the job quietly. For example:
  btrfs --quiet quota rescan

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
v2: Use MUST_LOG

 cmds/quota.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/cmds/quota.c b/cmds/quota.c
index 075fc79816ad..d84c8ad327d3 100644
--- a/cmds/quota.c
+++ b/cmds/quota.c
@@ -108,6 +108,8 @@  static const char * const cmd_quota_rescan_usage[] = {
 	"",
 	"-s   show status of a running rescan operation",
 	"-w   wait for rescan operation to finish (can be already in progress)",
+	HELPINFO_INSERT_GLOBALS,
+	HELPINFO_INSERT_QUIET,
 	NULL
 };
 
@@ -172,7 +174,7 @@  static int cmd_quota_rescan(const struct cmd_struct *cmd, int argc, char **argv)
 	}
 
 	if (ret == 0) {
-		printf("quota rescan started\n");
+		pr_verbose(MUST_LOG, "quota rescan started\n");
 		fflush(stdout);
 	} else if (ret < 0 && (!wait_for_completion || e != EINPROGRESS)) {
 		error("quota rescan failed: %m");