btrfs-progs: add warning helper for experimental build
We should warn that there's an experimental feature used. Add a helper with optional description. Should be used only if such feature is used and not always. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
720819745c
commit
e0cc76a9ce
|
@ -1152,6 +1152,14 @@ int btrfs_warn_multiple_profiles(int fd)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void btrfs_warn_experimental(const char *str)
|
||||
{
|
||||
#if EXPERIMENTAL
|
||||
warning("Experimental build with unstable or unfinished features");
|
||||
warning_on(str != NULL, "%s\n", str);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Open a file in fsid directory in sysfs and return the file descriptor or
|
||||
* error
|
||||
|
|
|
@ -110,6 +110,7 @@ void init_rand_seed(u64 seed);
|
|||
|
||||
char *btrfs_test_for_multiple_profiles(int fd);
|
||||
int btrfs_warn_multiple_profiles(int fd);
|
||||
void btrfs_warn_experimental(const char *str);
|
||||
|
||||
int sysfs_open_file(const char *name);
|
||||
int sysfs_open_fsid_file(int fd, const char *filename);
|
||||
|
|
Loading…
Reference in New Issue