]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Assemble: ignore unknown devices not listed on command line.
authorNeilBrown <neilb@suse.de>
Tue, 1 Feb 2011 02:07:07 +0000 (13:07 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 1 Feb 2011 02:07:07 +0000 (13:07 +1100)
If we find a device that has not superblock, we currently fail
unless in auto_assem mode.
However we really should only fail if the device was explicitly listed
in the arg list.  So add a test for that.

Signed-off-by: NeilBrown <neilb@suse.de>
Assemble.c

index 36fd4b7afb25a5fc344d54bbcaf4f8d7069203f1..ea54fc099d8f9cc060efb9dd1bdb3a298f97deba 100644 (file)
@@ -379,7 +379,7 @@ int Assemble(struct supertype *st, char *mddev,
                }
                if (dfd >= 0) close(dfd);
                if (tmpdev->used == 2) {
-                       if (auto_assem)
+                       if (auto_assem || !inargv)
                                /* Ignore unrecognised devices during auto-assembly */
                                goto loop;
                        if (ident->uuid_set || ident->name[0] ||