diff options
author | Neil Brown <neilb@suse.de> | 2008-05-15 15:50:47 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-05-15 15:50:47 +1000 |
commit | 294d6f450f79fda5475e6e5c99b7be85393f03c6 (patch) | |
tree | 59acebb36928cd034961974d3bcbc2a91c59121d /sysfs.c | |
parent | 3b0896f89988923c314cfb07454dde23b1b401fc (diff) | |
download | mdadm-294d6f450f79fda5475e6e5c99b7be85393f03c6.tar.gz mdadm-294d6f450f79fda5475e6e5c99b7be85393f03c6.tar.xz mdadm-294d6f450f79fda5475e6e5c99b7be85393f03c6.zip |
Recent change broken handling of metadata-less arrays.
In particular, failing a device would give a silly
error message.
Diffstat (limited to 'sysfs.c')
-rw-r--r-- | sysfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -103,10 +103,11 @@ struct mdinfo *sysfs_read(int fd, int devnum, unsigned long options) strcpy(base, "metadata_version"); if (load_sys(fname, buf)) goto abort; - if (strncmp(buf, "none", 4) == 0) + if (strncmp(buf, "none", 4) == 0) { sra->array.major_version = sra->array.minor_version = -1; - else if (strncmp(buf, "external:", 9) == 0) { + strcpy(sra->text_version, ""); + } else if (strncmp(buf, "external:", 9) == 0) { sra->array.major_version = -1; sra->array.minor_version = -2; strcpy(sra->text_version, buf+9); |