diff options
author | NeilBrown <neilb@suse.de> | 2008-11-04 10:50:38 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-11-04 10:50:38 +0100 |
commit | cf8de6913b63a99602cc2bb6e6ea7b9f9eb694d9 (patch) | |
tree | 759f20b5b4fddbb8b6bdc4c4092e39b1c1cf81aa | |
parent | config: Support container=uuid as alternative to container=/dev/name in mdadm... (diff) | |
download | mdadm-cf8de6913b63a99602cc2bb6e6ea7b9f9eb694d9.tar.xz mdadm-cf8de6913b63a99602cc2bb6e6ea7b9f9eb694d9.zip |
Don't give array name in --examine --brief output if it is doubtful.
Now that mdadm.conf doesn't need an array name, we don't need to
give one if the array cannot reliably provide one.
-rw-r--r-- | super-ddf.c | 2 | ||||
-rw-r--r-- | super-intel.c | 9 | ||||
-rw-r--r-- | super1.c | 6 |
3 files changed, 10 insertions, 7 deletions
diff --git a/super-ddf.c b/super-ddf.c index 4264bdf7..98e75ad6 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -1137,7 +1137,7 @@ static void brief_examine_super_ddf(struct supertype *st) char nbuf[64]; getinfo_super_ddf(st, &info); fname_from_uuid(st, &info, nbuf, ':'); - printf("ARRAY /dev/ddf metadata=ddf UUID=%s\n", nbuf + 5); + printf("ARRAY metadata=ddf UUID=%s\n", nbuf + 5); } static void detail_super_ddf(struct supertype *st, char *homehost) diff --git a/super-intel.c b/super-intel.c index f5ce06bd..7ecc09f8 100644 --- a/super-intel.c +++ b/super-intel.c @@ -611,6 +611,7 @@ static void brief_examine_super_imsm(struct supertype *st) /* We just write a generic IMSM ARRAY entry */ struct mdinfo info; char nbuf[64]; + char nbuf1[64]; struct intel_super *super = st->sb; int i; @@ -619,15 +620,15 @@ static void brief_examine_super_imsm(struct supertype *st) getinfo_super_imsm(st, &info); fname_from_uuid(st, &info, nbuf,'-'); - printf("ARRAY /dev/imsm metadata=imsm auto=md UUID=%s\n", nbuf + 5); + printf("ARRAY metadata=imsm auto=md UUID=%s\n", nbuf + 5); for (i = 0; i < super->anchor->num_raid_devs; i++) { struct imsm_dev *dev = get_imsm_dev(super, i); super->current_vol = i; getinfo_super_imsm(st, &info); - fname_from_uuid(st, &info, nbuf,'-'); - printf("ARRAY /dev/md/%.16s container=/dev/imsm member=%d auto=mdp UUID=%s\n", - dev->volume, i, nbuf + 5); + fname_from_uuid(st, &info, nbuf1,'-'); + printf("ARRAY /dev/md/%.16s container=%s member=%d auto=mdp UUID=%s\n", + dev->volume, nbuf + 5, i, nbuf1 + 5); } } @@ -353,9 +353,11 @@ static void brief_examine_super1(struct supertype *st) else if (sb->set_name[0]) nm = sb->set_name; else - nm = "??"; + nm = NULL; - printf("ARRAY /dev/md/%s level=%s ", nm, c?c:"-unknown-"); + printf("ARRAY%s%s level=%s ", + nm ? " /dev/md/":"", nm, + c?c:"-unknown-"); sb_offset = __le64_to_cpu(sb->super_offset); if (sb_offset <= 4) printf("metadata=1.1 "); |