Neil Brown: Print 'Events' more sensibly.

Martin F. Krafft madduck at alioth.debian.org
Wed Jun 25 15:42:25 UTC 2008


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

Author: Neil Brown <neilb at suse.de>
Date:   Mon Apr 28 16:29:45 2008 +1000

Print 'Events' more sensibly.

Instead of MSW.LSW, just print it as a 64bit number.

---

 ChangeLog |    2 ++
 super0.c  |    4 +++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fd42b4e..d96aa86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@ Changes Prior to this release
 	arrays.
     -   Fix problem with failing to add devices to v.large (>4TB) arrays,
 	cause by problems with device-size overflow.
+    -   For v0.90 superblocks, print the 'Events' count as a real count,
+	not 2 numbers separated by a dot.
 
 Changes Prior to 2.6.4 release
     -   Make "--create --auto=mdp" work for non-standard device names.
diff --git a/super0.c b/super0.c
index 0cff1ef..2ca127e 100644
--- a/super0.c
+++ b/super0.c
@@ -179,7 +179,9 @@ static void examine_super0(struct supertype *st, char *homehost)
 		printf("       Checksum : %x - correct\n", sb->sb_csum);
 	else
 		printf("       Checksum : %x - expected %lx\n", sb->sb_csum, calc_sb0_csum(sb));
-	printf("         Events : %d.%d\n", sb->events_hi, sb->events_lo);
+	printf("         Events : %llu\n",
+	       ((unsigned long long)sb->events_hi << 32)
+	       + sb->events_lo);
 	printf("\n");
 	if (sb->level == 5) {
 		c = map_num(r5layout, sb->layout);




More information about the pkg-mdadm-commits mailing list