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>
This commit is contained in:
parent
5737086ed7
commit
0885b942b3
2
Detail.c
2
Detail.c
|
@ -88,10 +88,12 @@ int Detail(char *dev, struct context *c)
|
|||
}
|
||||
sra = sysfs_read(fd, NULL, GET_VERSION | GET_DEVS | GET_ARRAY_STATE);
|
||||
if (!sra) {
|
||||
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);
|
||||
inactive = (sra->array_state == ARRAY_ACTIVE ||
|
||||
|
|
Loading…
Reference in New Issue