]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.c
Sort mdstat entries so that composites are well-ordered.
[thirdparty/mdadm.git] / mdadm.c
diff --git a/mdadm.c b/mdadm.c
index 925c01fef8315940134ecac8c1afb161fe4de82d..7b6c3d01039c3d463494fb7f19131cf1596e64f9 100644 (file)
--- a/mdadm.c
+++ b/mdadm.c
@@ -1030,7 +1030,7 @@ int main(int argc, char *argv[])
                        if (devlist == NULL) {
                                if (devmode=='D' && scan) {
                                        /* apply --detail to all devices in /proc/mdstat */
-                                       struct mdstat_ent *ms = mdstat_read(0);
+                                       struct mdstat_ent *ms = mdstat_read(0, 1);
                                        struct mdstat_ent *e;
                                        for (e=ms ; e ; e=e->next) {
                                                char *name = get_md_name(e->devnum);
@@ -1051,7 +1051,7 @@ int main(int argc, char *argv[])
                                        int progress=1, err;
                                        int last = 0;
                                        do {
-                                               struct mdstat_ent *ms = mdstat_read(0);
+                                               struct mdstat_ent *ms = mdstat_read(0, 0);
                                                struct mdstat_ent *e;
 
                                                if (!progress) last = 1;