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 <dsterba@suse.com>
This commit is contained in:
David Sterba 2020-06-12 18:04:31 +02:00
parent 5a1a02d208
commit 79bb50787a

View file

@ -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, ...);