summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/monitor.c b/monitor.c
index 3c54f8cb..b771707a 100644
--- a/monitor.c
+++ b/monitor.c
@@ -140,17 +140,17 @@ int read_dev_state(int fd)
cp = buf;
while (cp) {
- if (sysfs_attr_match(cp, "faulty"))
+ if (sysfs_attr_match(cp, map_memb_state(MEMB_STATE_FAULTY)))
rv |= DS_FAULTY;
- if (sysfs_attr_match(cp, "in_sync"))
+ if (sysfs_attr_match(cp, map_memb_state(MEMB_STATE_IN_SYNC)))
rv |= DS_INSYNC;
- if (sysfs_attr_match(cp, "write_mostly"))
+ if (sysfs_attr_match(cp, map_memb_state(MEMB_STATE_WRITE_MOSTLY)))
rv |= DS_WRITE_MOSTLY;
- if (sysfs_attr_match(cp, "spare"))
+ if (sysfs_attr_match(cp, map_memb_state(MEMB_STATE_SPARE)))
rv |= DS_SPARE;
- if (sysfs_attr_match(cp, "blocked"))
+ if (sysfs_attr_match(cp, map_memb_state(MEMB_STATE_BLOCKED)))
rv |= DS_BLOCKED;
- if (sysfs_attr_match(cp, "external_bbl"))
+ if (sysfs_attr_match(cp, map_memb_state(MEMB_STATE_EXTERNAL_BBL)))
rv |= DS_EXTERNAL_BB;
cp = strchr(cp, ',');
if (cp)