diff options
author | Jes Sorensen <Jes.Sorensen@gmail.com> | 2017-03-29 21:23:50 +0200 |
---|---|---|
committer | Jes Sorensen <Jes.Sorensen@gmail.com> | 2017-03-29 21:23:50 +0200 |
commit | d97572f5a59ca1ddde9971a79d47c9ea4db5891b (patch) | |
tree | f748c4137dc291624599a7927c57310efe794584 /Query.c | |
parent | Incremental: Remove redundant call for GET_ARRAY_INFO (diff) | |
download | mdadm-d97572f5a59ca1ddde9971a79d47c9ea4db5891b.tar.xz mdadm-d97572f5a59ca1ddde9971a79d47c9ea4db5891b.zip |
util: Introduce md_get_disk_info()
This removes all the inline ioctl calls for GET_DISK_INFO, allowing us
to switch to sysfs in one place, and improves type checking.
Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
Diffstat (limited to 'Query.c')
-rw-r--r-- | Query.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -102,7 +102,7 @@ int Query(char *dev) if (mddev && (fd = open(mddev, O_RDONLY))>=0) { if (md_get_version(fd) >= 9000 && md_get_array_info(fd, &array) >= 0) { - if (ioctl(fd, GET_DISK_INFO, &disc) >= 0 && + if (md_get_disk_info(fd, &disc) >= 0 && makedev((unsigned)disc.major,(unsigned)disc.minor) == stb.st_rdev) activity = "active"; else |