From: NeilBrown Date: Tue, 4 Nov 2008 09:50:39 +0000 (+1100) Subject: Assemble: Fix naming of container devices. X-Git-Tag: mdadm-3.0-devel2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4bc1720ff51ed81ef3cd088f362d3a8a80bd1bc;p=thirdparty%2Fmdadm.git Assemble: Fix naming of container devices. Container devices are meant to be named for the metadata type. That wasn't happening properly for DDF. Signed-off-by: NeilBrown --- diff --git a/Assemble.c b/Assemble.c index f801a73e..dbbabdb1 100644 --- a/Assemble.c +++ b/Assemble.c @@ -423,13 +423,14 @@ int Assemble(struct supertype *st, char *mddev, name = info.name; break; case -1: - if (info.name[0] == 0 && info.array.level == LEVEL_CONTAINER) { - name = info.text_version; - trustworthy = METADATA; - } else - trustworthy = FOREIGN; + trustworthy = FOREIGN; break; } + if (info.name[0] == 0 && + info.array.level == LEVEL_CONTAINER) { + name = info.text_version; + trustworthy = METADATA; + } mdfd = create_mddev(mddev, name, ident->autof, trustworthy, chosen_name); if (mdfd < 0) {