]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super-ddf.c
teach imsm and ddf what st->subarray means at load_super time
[thirdparty/mdadm.git] / super-ddf.c
index bcd44d1ea4b5ab074fe3f7320808800e688fb2b2..517a586420ae44130d46822bf2a03139803af115 100644 (file)
@@ -835,6 +835,18 @@ static int load_super_ddf(struct supertype *st, int fd,
                return rv;
        }
 
+       if (st->subarray[0]) {
+               struct vcl *v;
+
+               for (v = super->conflist; v; v = v->next)
+                       if (v->vcnum == atoi(st->subarray))
+                               super->currentconf = v;
+               if (!super->currentconf) {
+                       free(super);
+                       return 1;
+               }
+       }
+
        /* Should possibly check the sections .... */
 
        st->sb = super;
@@ -1172,7 +1184,6 @@ static void brief_examine_super_ddf(struct supertype *st, int verbose)
        char nbuf[64];
        getinfo_super_ddf(st, &info);
        fname_from_uuid(st, &info, nbuf, ':');
-       printf("ARRAY metadata=ddf UUID=%s\n", nbuf + 5);
 
        for (i=0; i<__be16_to_cpu(ddf->virt->max_vdes); i++) {
                struct virtual_entry *ve = &ddf->virt->entries[i];
@@ -1187,6 +1198,7 @@ static void brief_examine_super_ddf(struct supertype *st, int verbose)
                printf("ARRAY container=%s member=%d UUID=%s\n",
                       nbuf+5, i, nbuf1+5);
        }
+       printf("ARRAY metadata=ddf UUID=%s\n", nbuf + 5);
 }
 
 static void export_examine_super_ddf(struct supertype *st)