]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
conf: allow multiple arrays to be <ignore>d
authorNeilBrown <neilb@suse.de>
Thu, 22 Nov 2012 05:28:00 +0000 (16:28 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 22 Nov 2012 05:28:00 +0000 (16:28 +1100)
We currently complain if mdadm.conf contains multiple
definitions for the same name.  Unfortunately this stops
multiple arrays  from being <ignored>d.

So exclude "<ignore>" from the duplicate-names test.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: NeilBrown <neilb@suse.de>
config.c

index 656d4e2f4189115d182195653a8931aeadbaa96c..8461309aa106a9e2e030e52ef0d846a6f7cc8d9c 100644 (file)
--- a/config.c
+++ b/config.c
@@ -1095,6 +1095,8 @@ int conf_verify_devnames(struct mddev_ident *array_list)
        for (a1 = array_list; a1; a1 = a1->next) {
                if (!a1->devname)
                        continue;
+               if (strcmp(a1->devname, "<ignore>") == 0)
+                       continue;
                for (a2 = a1->next; a2; a2 = a2->next) {
                        if (!a2->devname)
                                continue;