summaryrefslogtreecommitdiffstats
path: root/Query.c
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@gmail.com>2017-03-29 21:23:50 +0200
committerJes Sorensen <Jes.Sorensen@gmail.com>2017-03-29 21:23:50 +0200
commitd97572f5a59ca1ddde9971a79d47c9ea4db5891b (patch)
treef748c4137dc291624599a7927c57310efe794584 /Query.c
parentIncremental: Remove redundant call for GET_ARRAY_INFO (diff)
downloadmdadm-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Query.c b/Query.c
index cae75d17..a2c839c0 100644
--- a/Query.c
+++ b/Query.c
@@ -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