summaryrefslogtreecommitdiffstats
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-05-11 15:18:25 +1000
committerNeilBrown <neilb@suse.de>2009-05-11 15:18:25 +1000
commitaa7c284c06ba046039f60ceb4e3fb422967d354f (patch)
treef376b9893040f75ec50f6f9346de6529880bf97b /Assemble.c
parent061f2c6abd014c9f30ca2d784cb535e3e3452c65 (diff)
downloadmdadm-aa7c284c06ba046039f60ceb4e3fb422967d354f.tar.gz
mdadm-aa7c284c06ba046039f60ceb4e3fb422967d354f.tar.xz
mdadm-aa7c284c06ba046039f60ceb4e3fb422967d354f.zip
Fix tests on ->container and ->member
For container= and member= to be effective in an mdadm.conf line they must both be present. So when checking for their absence we need container != NULL || member != NULL. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Assemble.c b/Assemble.c
index 4966a79..13953bd 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -140,7 +140,7 @@ int Assemble(struct supertype *st, char *mddev,
int clean;
int auto_assem = (mddev == NULL && !ident->uuid_set &&
ident->super_minor == UnSet && ident->name[0] == 0
- && ident->container == NULL && ident->member == NULL);
+ && (ident->container == NULL || ident->member == NULL));
int old_linux = 0;
int vers = vers; /* Keep gcc quite - it really is initialised */
struct {
@@ -504,7 +504,7 @@ int Assemble(struct supertype *st, char *mddev,
break;
}
if (!auto_assem && trustworthy == FOREIGN)
- /* If the array is listed in mdadm or on
+ /* If the array is listed in mdadm.conf or on
* command line, then we trust the name
* even if the array doesn't look local
*/