summaryrefslogtreecommitdiffstats
path: root/sysfs.c
diff options
context:
space:
mode:
authorJes Sorensen <jsorensen@fb.com>2017-04-20 06:19:44 +0200
committerJes Sorensen <jsorensen@fb.com>2017-04-20 06:27:42 +0200
commit5e8e35fb7e17495032e144f319517dcae38d1b56 (patch)
tree045d674756d667dfdc7adbe26186ce69d025cfe7 /sysfs.c
parentmaps: Terminate 'modes' map correctly. (diff)
downloadmdadm-5e8e35fb7e17495032e144f319517dcae38d1b56.tar.xz
mdadm-5e8e35fb7e17495032e144f319517dcae38d1b56.zip
maps: Use keyvalue for null terminator to indicate 'unset' value
This simplifies the code calling map_name() so it no longer has to manually check for UnSet and convert the value manually. Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'sysfs.c')
-rw-r--r--sysfs.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sysfs.c b/sysfs.c
index c6df9b06..712f8b3e 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -250,8 +250,6 @@ struct mdinfo *sysfs_read(int fd, char *devnm, unsigned long options)
if (load_sys(fname, buf, sizeof(buf)))
goto abort;
sra->array_state = map_name(sysfs_array_states, buf);
- if (sra->array_state == UnSet)
- sra->array_state = ARRAY_UNKNOWN_STATE;
}
if (options & GET_CONSISTENCY_POLICY) {