]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Detail.c
Monitor: mailfrom is initialized correctly
[thirdparty/mdadm.git] / Detail.c
index ceb21b1537cdd5be201f4e0467002dd013009f51..ef2370ceefb0547df69e8414bf6950408a520c60 100644 (file)
--- a/Detail.c
+++ b/Detail.c
@@ -88,9 +88,11 @@ int Detail(char *dev, struct context *c)
        }
        sra = sysfs_read(fd, NULL, GET_VERSION | GET_DEVS | GET_ARRAY_STATE);
        if (!sra) {
-               pr_err("%s does not appear to be an md device\n", dev);
-               close(fd);
-               return rv;
+               if (md_get_array_info(fd, &array)) {
+                       pr_err("%s does not appear to be an md device\n", dev);
+                       close(fd);
+                       return rv;
+               }
        }
        external = (sra != NULL && sra->array.major_version == -1 &&
                    sra->array.minor_version == -2);