From 79bb50787ae422cda3e131bb0e874a0848be0f46 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Fri, 12 Jun 2020 18:04:31 +0200 Subject: [PATCH] btrfs-progs: add separate verbosity level for on-by-default messages For backward compatibility with tools that may rely on the messages we need a special level to print the message unless the verbosity settings haven't been set on command line. Signed-off-by: David Sterba --- common/messages.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/messages.h b/common/messages.h index 47efe248..4b604f38 100644 --- a/common/messages.h +++ b/common/messages.h @@ -95,6 +95,13 @@ int __btrfs_warning_on(int condition, const char *fmt, ...); __attribute__ ((format (printf, 2, 3))) int __btrfs_error_on(int condition, const char *fmt, ...); +/* + * Level of messages that must be printed by default (in case the verbosity + * options haven't been set by the user) due to backward compatibility reasons + * where applications may expect the output. + */ +#define MUST_LOG -1 + __attribute__ ((format (printf, 2, 3))) void pr_verbose(int level, const char *fmt, ...);