summaryrefslogtreecommitdiffstats
path: root/super0.c
diff options
context:
space:
mode:
Diffstat (limited to 'super0.c')
-rw-r--r--super0.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/super0.c b/super0.c
index 7e81482..42d8659 100644
--- a/super0.c
+++ b/super0.c
@@ -93,7 +93,7 @@ static void examine_super0(struct supertype *st, char *homehost)
char *c;
printf(" Magic : %08x\n", sb->md_magic);
- printf(" Version : %02d.%02d.%02d\n", sb->major_version, sb->minor_version,
+ printf(" Version : %d.%02d.%02d\n", sb->major_version, sb->minor_version,
sb->patch_version);
if (sb->minor_version >= 90) {
printf(" UUID : %08x:%08x:%08x:%08x", sb->set_uuid0, sb->set_uuid1,
@@ -847,6 +847,9 @@ static struct supertype *match_metadata_desc0(char *arg)
st->minor_version = 90;
st->max_devs = MD_SB_DISKS;
st->sb = NULL;
+ /* Eliminate pointless leading 0 from some versions of mdadm -D */
+ if (strncmp(arg, "00.", 3) == 0)
+ arg++;
if (strcmp(arg, "0") == 0 ||
strcmp(arg, "0.90") == 0 ||
strcmp(arg, "0.91") == 0 ||