]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
assemble: fix setting of 'foreign' trustability.
authorNeilBrown <neilb@suse.de>
Tue, 4 Nov 2008 09:50:39 +0000 (20:50 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 4 Nov 2008 09:50:39 +0000 (20:50 +1100)
Assemble.c

index dbbabdb12021db3c8076bcb20f262578909b28f9..1c9486b7301633c8d8b3bc1899f55f8ab4f83598 100644 (file)
@@ -426,6 +426,13 @@ int Assemble(struct supertype *st, char *mddev,
                trustworthy = FOREIGN;
                break;
        }
+       if (!auto_assem && trustworthy == FOREIGN)
+               /* If the array is listed in mdadm or on
+                * command line, then we trust the name
+                * even if the array doesn't look local
+                */
+               trustworthy = LOCAL;
+
        if (info.name[0] == 0 &&
            info.array.level == LEVEL_CONTAINER) {
                name = info.text_version;