diff options
author | Jes Sorensen <jsorensen@fb.com> | 2017-04-25 20:34:31 +0200 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2017-04-25 20:34:31 +0200 |
commit | 0885b942b3575c7f2a8290087751d83902587371 (patch) | |
tree | 2b3da4898ef145a44e7f71f5017e84de539c30ed /Detail.c | |
parent | Detail: Respect code lines are 80 character wide (diff) | |
download | mdadm-0885b942b3575c7f2a8290087751d83902587371.tar.xz mdadm-0885b942b3575c7f2a8290087751d83902587371.zip |
Detail: Reinstate support for not having sysfs
While sysfs support will hopefully go away eventually, lets not break
it unnecessarily for now.
Fixes: 901d5ee ("Detail: Stop bothering about md drivers older than 0.90.00")
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'Detail.c')
-rw-r--r-- | Detail.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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); |