From d438679977ea49a23103d2cfa1014a075e9f0770 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Tue, 1 Feb 2011 13:07:07 +1100 Subject: [PATCH] Assemble: ignore unknown devices not listed on command line. 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 --- Assemble.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assemble.c b/Assemble.c index 36fd4b7..ea54fc0 100644 --- a/Assemble.c +++ b/Assemble.c @@ -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] ||