]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Detail.c
Monitor: stop notifing about containers.
[thirdparty/mdadm.git] / Detail.c
index daec4f1a8f42338fc758dd14b00f42ffcfdf806c..b6587c8c8db356b04ea3613f2e02d902a64d2943 100644 (file)
--- a/Detail.c
+++ b/Detail.c
@@ -224,7 +224,10 @@ int Detail(char *dev, struct context *c)
        }
 
        /* Ok, we have some info to print... */
-       str = map_num(pers, array.level);
+       if (inactive)
+               str = map_num(pers, info->array.level);
+       else
+               str = map_num(pers, array.level);
 
        if (c->export) {
                if (array.raid_disks) {
@@ -498,17 +501,20 @@ int Detail(char *dev, struct context *c)
                        } else
                                arrayst = "active";
 
-                       printf("             State : %s%s%s%s%s%s \n",
+                       printf("             State : %s%s%s%s%s%s%s \n",
                               arrayst, st,
                               (!e || (e->percent < 0 &&
                                       e->percent != RESYNC_PENDING &&
-                                      e->percent != RESYNC_DELAYED)) ?
+                                      e->percent != RESYNC_DELAYED &&
+                                      e->percent != RESYNC_REMOTE)) ?
                               "" : sync_action[e->resync],
                               larray_size ? "": ", Not Started",
                               (e && e->percent == RESYNC_DELAYED) ?
                               " (DELAYED)": "",
                               (e && e->percent == RESYNC_PENDING) ?
-                              " (PENDING)": "");
+                              " (PENDING)": "",
+                              (e && e->percent == RESYNC_REMOTE) ?
+                              " (REMOTE)": "");
                } else if (inactive && !is_container) {
                        printf("             State : inactive\n");
                }