From fb6e0c5448ac857c6345502e782684bf6868014b Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 5 Oct 2022 14:27:57 +0200 Subject: [PATCH] btrfs-progs: filesystem: use pr_verbose and pr_stderr for messages Replace printing to stderr and stdout by the level-aware helper. No change for commands that don't have the global -q/-v options, otherwise the output can be quieted. Signed-off-by: David Sterba --- cmds/filesystem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmds/filesystem.c b/cmds/filesystem.c index b1e7dda2..3efde90f 100644 --- a/cmds/filesystem.c +++ b/cmds/filesystem.c @@ -1074,7 +1074,7 @@ next: } if (defrag_global_errors) - fprintf(stderr, "total %d failures\n", defrag_global_errors); + pr_stderr(LOG_DEFAULT, "total %d failures\n", defrag_global_errors); return !!defrag_global_errors; } @@ -1344,7 +1344,7 @@ static int cmd_filesystem_label(const struct cmd_struct *cmd, ret = get_label(argv[optind], label); if (!ret) - fprintf(stdout, "%s\n", label); + pr_verbose(LOG_DEFAULT, "%s\n", label); return ret; }