[PATCH v2 8/8] btrfs-progs: scrub cancel: add quiet option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Enable the quiet option to the btrfs(8) scrub cancel command.
Does the job quietly. For example:
	btrfs -q scrub cancel <mnt>

Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
v2: MUST_LOG

 cmds/scrub.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cmds/scrub.c b/cmds/scrub.c
index 809790266011..53376a376534 100644
--- a/cmds/scrub.c
+++ b/cmds/scrub.c
@@ -1626,6 +1626,8 @@ static DEFINE_SIMPLE_COMMAND(scrub_start, "start");
 static const char * const cmd_scrub_cancel_usage[] = {
 	"btrfs scrub cancel <path>|<device>",
 	"Cancel a running scrub",
+	HELPINFO_INSERT_GLOBALS,
+	HELPINFO_INSERT_QUIET,
 	NULL
 };
 
@@ -1662,7 +1664,7 @@ static int cmd_scrub_cancel(const struct cmd_struct *cmd, int argc, char **argv)
 	}
 
 	ret = 0;
-	printf("scrub cancelled\n");
+	pr_verbose(MUST_LOG, "scrub cancelled\n");
 
 out:
 	close_file_or_dir(fdmnt, dirstream);
-- 
2.25.1




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux