NeilBrown: Examine: fix --examine --brief --verbose on containers.

Martin F. Krafft madduck at alioth.debian.org
Tue Oct 27 19:21:23 UTC 2009


Module: mdadm
Branch: master
Commit: fa09d4961e5c72da3c7f78d53a7d64f5196110a3
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=fa09d4961e5c72da3c7f78d53a7d64f5196110a3

Author: NeilBrown <neilb at suse.de>
Date:   Thu Jun  4 12:44:32 2009 +1000

Examine: fix --examine --brief --verbose on containers.

With --verbose, --examine --brief prints dev= information after
the personality has done its bit.
But with containers, the member array are printed in between.
So in super-ddf and super-intel, move printing of the member
arrays to before printing of the container.  This avoids
confusion.

Signed-off-by: NeilBrown <neilb at suse.de>

---

 super-ddf.c   |    2 +-
 super-intel.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/super-ddf.c b/super-ddf.c
index bcd44d1..5ad89c2 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -1172,7 +1172,6 @@ static void brief_examine_super_ddf(struct supertype *st, int verbose)
 	char nbuf[64];
 	getinfo_super_ddf(st, &info);
 	fname_from_uuid(st, &info, nbuf, ':');
-	printf("ARRAY metadata=ddf UUID=%s\n", nbuf + 5);
 
 	for (i=0; i<__be16_to_cpu(ddf->virt->max_vdes); i++) {
 		struct virtual_entry *ve = &ddf->virt->entries[i];
@@ -1187,6 +1186,7 @@ static void brief_examine_super_ddf(struct supertype *st, int verbose)
 		printf("ARRAY container=%s member=%d UUID=%s\n",
 		       nbuf+5, i, nbuf1+5);
 	}
+	printf("ARRAY metadata=ddf UUID=%s\n", nbuf + 5);
 }
 
 static void export_examine_super_ddf(struct supertype *st)
diff --git a/super-intel.c b/super-intel.c
index 7e2a086..3abaca5 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -768,7 +768,6 @@ static void brief_examine_super_imsm(struct supertype *st, int verbose)
 
 	getinfo_super_imsm(st, &info);
 	fname_from_uuid(st, &info, nbuf, ':');
-	printf("ARRAY metadata=imsm UUID=%s\n", nbuf + 5);
 	for (i = 0; i < super->anchor->num_raid_devs; i++) {
 		struct imsm_dev *dev = get_imsm_dev(super, i);
 
@@ -778,6 +777,7 @@ static void brief_examine_super_imsm(struct supertype *st, int verbose)
 		printf("ARRAY /dev/md/%.16s container=%s member=%d UUID=%s\n",
 		       dev->volume, nbuf + 5, i, nbuf1 + 5);
 	}
+	printf("ARRAY metadata=imsm UUID=%s\n", nbuf + 5);
 }
 
 static void export_examine_super_imsm(struct supertype *st)




More information about the pkg-mdadm-commits mailing list