diff options
author | Doug Ledford <dledford@redhat.com> | 2008-10-29 15:05:35 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-10-30 08:53:02 +1100 |
commit | d7ee65c960fa8a6886df7416307f57545ddc4460 (patch) | |
tree | 996e86fac5fea15cf3e51d5c7f870fcd398451d7 /super1.c | |
parent | b3d3195538e315b3863235731112eee7398d4340 (diff) | |
download | mdadm-d7ee65c960fa8a6886df7416307f57545ddc4460.tar.gz mdadm-d7ee65c960fa8a6886df7416307f57545ddc4460.tar.xz mdadm-d7ee65c960fa8a6886df7416307f57545ddc4460.zip |
Fix bad metadata formatting
Certain operations (Detail.c mainly) would print out the metadata of
an array in a format that the scan operation in super0.c and super1.c
would later reject as unknown when it was found in the mdadm.conf file.
Use a consistent format, but also modify the super0 and super1 match
methods to accept the other format without complaint.
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super1.c')
-rw-r--r-- | super1.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1203,6 +1203,9 @@ static struct supertype *match_metadata_desc1(char *arg) st->ss = &super1; st->max_devs = 384; st->sb = NULL; + /* Eliminate pointless leading 0 from some versions of mdadm -D */ + if (strncmp(arg, "01.", 3) == 0) + arg++; if (strcmp(arg, "1.0") == 0) { st->minor_version = 0; return st; |