summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Detail.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Detail.c b/Detail.c
index cb33794..3d92855 100644
--- a/Detail.c
+++ b/Detail.c
@@ -110,6 +110,14 @@ int Detail(char *dev, struct context *c)
if (ioctl(fd, GET_ARRAY_INFO, &array) == 0) {
inactive = 0;
} else if (errno == ENODEV && sra) {
+ if (sra->array.major_version == -1 &&
+ sra->array.minor_version == -1 &&
+ sra->devs == NULL) {
+ pr_err("Array associated with md device %s does not exist.\n", dev);
+ close(fd);
+ sysfs_free(sra);
+ return rv;
+ }
array = sra->array;
inactive = 1;
} else {