]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Treat feature as experimental
authorAdam Kwolek <adam.kwolek@intel.com>
Mon, 29 Nov 2010 01:11:09 +0000 (12:11 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 29 Nov 2010 01:11:09 +0000 (12:11 +1100)
Due to fact that IMSM Windows compatibility was not tested yet,
feature has to be treated as experimental until compatibility
verification will be performed.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
mdadm.h
util.c

diff --git a/mdadm.h b/mdadm.h
index d754730af6373fc28e5664a4aa6b676bc8dd2504..bfeddd0a0e46ac8e3ec9a12b20c75e8c774ab062 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -1040,6 +1040,7 @@ extern char *conf_word(FILE *file, int allow_key);
 extern int conf_name_is_free(char *name);
 extern int devname_matches(char *name, char *match);
 extern struct mddev_ident *conf_match(struct mdinfo *info, struct supertype *st);
+extern int experimental(void);
 
 extern void free_line(char *line);
 extern int match_oneof(char *devices, char *devname);
diff --git a/util.c b/util.c
index fde58ebbeffa6271c93e01abae14c5880221e0f6..4b41e2b47b7ce50e3a4bdd23b182f0cfd2b637a3 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1896,3 +1896,13 @@ void append_metadata_update(struct supertype *st, void *buf, int len)
 unsigned int __invalid_size_argument_for_IOC = 0;
 #endif
 
+int experimental(void)
+{
+       if (check_env("MDADM_EXPERIMENTAL"))
+               return 1;
+       else {
+               fprintf(stderr, Name ": To use this feature MDADM_EXPERIMENTAL enviroment variable has to defined.\n");
+               return 0;
+       }
+}
+