diff options
author | NeilBrown <neilb@suse.de> | 2009-05-11 15:18:20 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-05-11 15:18:20 +1000 |
commit | 061f2c6abd014c9f30ca2d784cb535e3e3452c65 (patch) | |
tree | 63c5696cf22393743a3506aee8adfaf2222f4961 /super1.c | |
parent | 9652457eea62c06f48df1035218cdcb6f756b74d (diff) | |
download | mdadm-061f2c6abd014c9f30ca2d784cb535e3e3452c65.tar.gz |
Make --brief even briefer.
Because ---examine --brief, or --detail --brief are
often used to create mdadm.conf, and because people don't want to
have to update their mdadm.conf unnecessarily, we don't want to
include information that might change.
And now that level changing is supported, that is almost everything
but UUID.
So move some more fields into the "Only print with --verbose" class.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super1.c')
-rw-r--r-- | super1.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -414,7 +414,7 @@ static void examine_super1(struct supertype *st, char *homehost) } -static void brief_examine_super1(struct supertype *st) +static void brief_examine_super1(struct supertype *st, int verbose) { struct mdp_superblock_1 *sb = st->sb; int i; @@ -430,9 +430,9 @@ static void brief_examine_super1(struct supertype *st) else nm = NULL; - printf("ARRAY%s%s level=%s ", - nm ? " /dev/md/":"", nm, - c?c:"-unknown-"); + printf("ARRAY%s%s", nm ? " /dev/md/":"", nm); + if (verbose && c) + printf(" level=%s", c); sb_offset = __le64_to_cpu(sb->super_offset); if (sb_offset <= 4) printf("metadata=1.1 "); @@ -440,7 +440,9 @@ static void brief_examine_super1(struct supertype *st) printf("metadata=1.2 "); else printf("metadata=1.0 "); - printf("num-devices=%d UUID=", __le32_to_cpu(sb->raid_disks)); + if (verbose) + printf("num-devices=%d ", __le32_to_cpu(sb->raid_disks)); + printf("UUID="); for (i=0; i<16; i++) { if ((i&3)==0 && i != 0) printf(":"); printf("%02x", sb->set_uuid[i]); |