]> git.ipfire.org Git - thirdparty/mdadm.git/commit
sysfs: Use the presence of /sys/block/<dev>/md as indicator of valid device
authorJes Sorensen <Jes.Sorensen@gmail.com>
Thu, 30 Mar 2017 20:02:36 +0000 (16:02 -0400)
committerJes Sorensen <Jes.Sorensen@gmail.com>
Thu, 30 Mar 2017 20:02:36 +0000 (16:02 -0400)
commit67a02d520085b01a1b9e6ea59fb30e79c5649c9c
tree0c3e70be5a9352290898dd831892d0ce73e0295d
parent13428e2e76e8149336282d514908ced424f878a2
sysfs: Use the presence of /sys/block/<dev>/md as indicator of valid device

Rather than calling ioctl(RAID_VERSION), use the presence of
/sys/block/<dev>/md as indicator of the device being valid and sysfs
being active for it. The ioctl could return valid data, but sysfs
not mounted, which renders sysfs_init() useless anyway.

Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
sysfs.c