summaryrefslogtreecommitdiff
path: root/Query.c
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2018-06-26 15:38:57 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2018-06-26 15:38:57 +0100
commit9421e599c44cd50d3df4cd019cd3c53d9320e93d (patch)
tree2d9606679ad49fbc9f9cf72b3a3a87d7a6dc8fff /Query.c
parentec9bfc63255cdf01a67171d1228f562c927c6d36 (diff)
Cherrypick master patches up to 4th of June 2018.debian/4.1_rc1-3archive/debian/4.1_rc1-3
Diffstat (limited to 'Query.c')
-rw-r--r--Query.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Query.c b/Query.c
index 2bd0e2a0..23fbf8aa 100644
--- a/Query.c
+++ b/Query.c
@@ -85,12 +85,11 @@ int Query(char *dev)
if (ioctlerr == ENODEV)
printf("%s: is an md device which is not active\n", dev);
+ else if (ioctlerr && major(stb.st_rdev) != MD_MAJOR)
+ printf("%s: is not an md array\n", dev);
else if (ioctlerr)
printf("%s: is an md device, but gives \"%s\" when queried\n",
dev, strerror(ioctlerr));
- else if (staterr)
- printf("%s: is not a valid md device, returning %s\n",
- dev, strerror(ioctlerr));
else {
printf("%s: %s %s %d devices, %d spare%s. Use mdadm --detail for more detail.\n",
dev, human_size_brief(larray_size,IEC),