mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-07 01:31:17 +00:00
btrfs-progs: use warning helper for multiple profile messages
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
0e38e1c4f2
commit
4f23f0e711
@ -35,6 +35,7 @@
|
|||||||
#include "common/utils.h"
|
#include "common/utils.h"
|
||||||
#include "common/path-utils.h"
|
#include "common/path-utils.h"
|
||||||
#include "common/open-utils.h"
|
#include "common/open-utils.h"
|
||||||
|
#include "common/messages.h"
|
||||||
#include "cmds/commands.h"
|
#include "cmds/commands.h"
|
||||||
#include "mkfs/common.h"
|
#include "mkfs/common.h"
|
||||||
#include "ioctl.h"
|
#include "ioctl.h"
|
||||||
@ -1137,19 +1138,11 @@ int btrfs_warn_multiple_profiles(int fd)
|
|||||||
if (ret != 1)
|
if (ret != 1)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
fprintf(stderr,
|
warning("Multiple block group profiles detected, see 'man btrfs(5)'");
|
||||||
"WARNING: Multiple block group profiles detected, see 'man btrfs(5)'.\n");
|
warning_on(!!data_prof, " Data: %s", data_prof);
|
||||||
if (data_prof)
|
warning_on(!!metadata_prof, " Metadata: %s", metadata_prof);
|
||||||
fprintf(stderr, "WARNING: Data: %s\n", data_prof);
|
warning_on(!!mixed_prof, " Data+Metadata: %s", mixed_prof);
|
||||||
|
warning_on(!!system_prof, " System: %s", system_prof);
|
||||||
if (metadata_prof)
|
|
||||||
fprintf(stderr, "WARNING: Metadata: %s\n", metadata_prof);
|
|
||||||
|
|
||||||
if (mixed_prof)
|
|
||||||
fprintf(stderr, "WARNING: Data+Metadata: %s\n", mixed_prof);
|
|
||||||
|
|
||||||
if (system_prof)
|
|
||||||
fprintf(stderr, "WARNING: System: %s\n", system_prof);
|
|
||||||
|
|
||||||
free(data_prof);
|
free(data_prof);
|
||||||
free(metadata_prof);
|
free(metadata_prof);
|
||||||
|
Loading…
Reference in New Issue
Block a user