]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mapfile.c
Handles spaces in array names better.
[thirdparty/mdadm.git] / mapfile.c
index fa238832ab6ba633ef08960125f37242945cfd09..34ebdb54f7ee567e112d3346587ce4a7c2745b47 100644 (file)
--- a/mapfile.c
+++ b/mapfile.c
@@ -403,7 +403,12 @@ void RebuildMap(void)
                        close(dfd);
                        if (ok != 0)
                                continue;
-                       info = st->ss->container_content(st, subarray);
+                       if (subarray)
+                               info = st->ss->container_content(st, subarray);
+                       else {
+                               info = xmalloc(sizeof(*info));
+                               st->ss->getinfo_super(st, info, NULL);
+                       }
                        if (!info)
                                continue;
 
@@ -417,7 +422,7 @@ void RebuildMap(void)
                                 * an MD_DEVNAME for udev.
                                 * The name needs to be unique both in /dev/md/
                                 * and in this mapfile.
-                                * It needs to match watch -I or -As would come
+                                * It needs to match what -I or -As would come
                                 * up with.
                                 * That means:
                                 *   Check if array is in mdadm.conf