From: NeilBrown Date: Thu, 22 Nov 2012 05:28:00 +0000 (+1100) Subject: conf: allow multiple arrays to be d X-Git-Tag: mdadm-3.3-rc1~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13f2dd6be5618ff556f9a364903e4b95558115e1;p=thirdparty%2Fmdadm.git conf: allow multiple arrays to be d We currently complain if mdadm.conf contains multiple definitions for the same name. Unfortunately this stops multiple arrays from being d. So exclude "" from the duplicate-names test. Reported-by: Mike Frysinger Signed-off-by: NeilBrown --- diff --git a/config.c b/config.c index 656d4e2f..8461309a 100644 --- 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, "") == 0) + continue; for (a2 = a1->next; a2; a2 = a2->next) { if (!a2->devname) continue;