]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdmon.c
util: make env checking more generic
[thirdparty/mdadm.git] / mdmon.c
diff --git a/mdmon.c b/mdmon.c
index 32805a84efe1abe21baed8a8cb489dcdcc21e765..cb4173a020dc51549478fdf1b0e1899b2ad7c2cf 100644 (file)
--- a/mdmon.c
+++ b/mdmon.c
@@ -1,3 +1,22 @@
+/*
+ * mdmon - monitor external metadata arrays
+ *
+ * Copyright (C) 2007-2008 Neil Brown <neilb@suse.de>
+ * Copyright (C) 2007-2008 Intel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 
 /*
  * md array manager.
@@ -73,15 +92,6 @@ int clone_monitor(struct supertype *container)
        return mon_tid;
 }
 
-static struct superswitch *find_metadata_methods(char *vers)
-{
-       if (strcmp(vers, "ddf") == 0)
-               return &super_ddf;
-       if (strcmp(vers, "imsm") == 0)
-               return &super_imsm;
-       return NULL;
-}
-
 
 int make_pidfile(char *devname, int o_excl)
 {
@@ -231,7 +241,7 @@ static void wake_me(int sig)
 static int do_fork(void)
 {
        #ifdef DEBUG
-       if (env_no_mdmon())
+       if (check_env("MDADM_NO_MDMON"))
                return 0;
        #endif