diff options
author | Neil Brown <neilb@suse.de> | 2008-05-15 08:48:21 +0200 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-05-15 08:48:21 +0200 |
commit | 2f6079dc96180335fdb56d0b89e462e903abbb50 (patch) | |
tree | c643ba942b6a7a2ccb100e3707eed3d139b5253d /sysfs.c | |
parent | Can now mostly assemble DDF arrays (diff) | |
download | mdadm-2f6079dc96180335fdb56d0b89e462e903abbb50.tar.xz mdadm-2f6079dc96180335fdb56d0b89e462e903abbb50.zip |
Create a container member
From: Neil Brown <neilb@suse.de>
Diffstat (limited to 'sysfs.c')
-rw-r--r-- | sysfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -34,7 +34,7 @@ int load_sys(char *path, char *buf) return -1; n = read(fd, buf, 1024); close(fd); - if (n <=0 || n >= 1024) + if (n <0 || n >= 1024) return -1; buf[n] = 0; if (buf[n-1] == '\n') @@ -316,6 +316,7 @@ int sysfs_set_array(struct mdinfo *sra, { int rv = 0; sra->array = info->array; + if (info->array.level < 0) return 0; /* FIXME */ rv |= sysfs_set_str(sra, NULL, "level", |