Initial DDF support code.
[thirdparty/mdadm.git] / Create.c
index 6e58b53..1099dcb 100644 (file)
--- a/Create.c
+++ b/Create.c
@@ -92,6 +92,14 @@ int Create(struct supertype *st, char *mddev, int mdfd,
                        return 1;
                }
        }
+       if (level == UnSet) {
+               /* "ddf" metadata only supports one level - should possibly
+                * push this into metadata handler??
+                */
+               if (st && st->ss == &super_ddf)
+                       level = LEVEL_CONTAINER;
+       }
+
        if (level == UnSet) {
                fprintf(stderr,
                        Name ": a RAID level is needed to create an array.\n");