From 6d11ec6fc2a9d47d7af0773b03fa4104983ffc80 Mon Sep 17 00:00:00 2001 From: Adam Kwolek Date: Mon, 29 Nov 2010 12:11:09 +1100 Subject: [PATCH] Treat feature as experimental 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 Signed-off-by: NeilBrown --- mdadm.h | 1 + util.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/mdadm.h b/mdadm.h index d754730a..bfeddd0a 100644 --- 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 fde58ebb..4b41e2b4 100644 --- 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; + } +} + -- 2.39.2