From c98f9d03925b7d5b6b26aa9adb0f9bca3607b3fc Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 4 Oct 2022 16:50:09 +0200 Subject: [PATCH] btrfs-progs: property: use pr_verbose for messages Replace printf 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/property.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmds/property.c b/cmds/property.c index 418633d9..f2ba4962 100644 --- a/cmds/property.c +++ b/cmds/property.c @@ -141,7 +141,7 @@ static int prop_read_only(enum prop_object_type type, return -errno; } - printf("ro=%s\n", read_only ? "true" : "false"); + pr_verbose(LOG_DEFAULT, "ro=%s\n", read_only ? "true" : "false"); } return 0; @@ -162,7 +162,7 @@ static int prop_label(enum prop_object_type type, ret = get_label((char *) object, label); if (!ret) - fprintf(stdout, "label=%s\n", label); + pr_verbose(LOG_DEFAULT, "label=%s\n", label); } return ret; @@ -226,7 +226,7 @@ static int prop_compression(enum prop_object_type type, error("failed to get compression for %s: %m", object); goto out; } - fprintf(stdout, "compression=%.*s\n", (int)len, buf); + pr_verbose(LOG_DEFAULT, "compression=%.*s\n", (int)len, buf); } ret = 0; @@ -420,7 +420,7 @@ static int dump_prop(const struct prop_handler *prop, if (!name_and_help) ret = prop->handler(type, object, prop->name, NULL, false); else - printf("%-20s%s\n", prop->name, prop->desc); + pr_verbose(LOG_DEFAULT, "%-20s%s\n", prop->name, prop->desc); } return ret; }