summaryrefslogtreecommitdiff
path: root/Detail.c
diff options
context:
space:
mode:
authorDoug Ledford <dledford@redhat.com>2008-10-29 15:05:35 -0400
committerNeilBrown <neilb@suse.de>2008-10-30 08:53:02 +1100
commitd7ee65c960fa8a6886df7416307f57545ddc4460 (patch)
tree996e86fac5fea15cf3e51d5c7f870fcd398451d7 /Detail.c
parentb3d3195538e315b3863235731112eee7398d4340 (diff)
downloadmdadm-d7ee65c960fa8a6886df7416307f57545ddc4460.tar.gz
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 'Detail.c')
-rw-r--r--Detail.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Detail.c b/Detail.c
index 25b91b1..9ba8af1 100644
--- a/Detail.c
+++ b/Detail.c
@@ -138,7 +138,7 @@ int Detail(char *dev, int brief, int export, int test, char *homehost)
if (sra && sra->array.major_version < 0)
printf("MD_METADATA=%s\n", sra->text_version);
else
- printf("MD_METADATA=%02d.%02d\n",
+ printf("MD_METADATA=%d.%02d\n",
array.major_version, array.minor_version);
if (st && st->sb)
@@ -154,7 +154,7 @@ int Detail(char *dev, int brief, int export, int test, char *homehost)
if (sra && sra->array.major_version < 0)
printf(" metadata=%s", sra->text_version);
else
- printf(" metadata=%02d.%02d",
+ printf(" metadata=%d.%02d",
array.major_version, array.minor_version);
/* Only try GET_BITMAP_FILE for 0.90.01 and later */
@@ -183,7 +183,7 @@ int Detail(char *dev, int brief, int export, int test, char *homehost)
if (sra && sra->array.major_version < 0)
printf(" Version : %s\n", sra->text_version);
else
- printf(" Version : %02d.%02d\n",
+ printf(" Version : %d.%02d\n",
array.major_version, array.minor_version);
atime = array.ctime;