gfs2-utils: master - gfs2_edit: print large block numbers better

Bob Peterson rpeterso at fedoraproject.org
Thu Feb 3 17:09:44 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=dde989e50401270fbfd8882c10e44e401afd78ec
Commit:        dde989e50401270fbfd8882c10e44e401afd78ec
Parent:        5c35d4c605b171c8e431990ac137816ac65f2b0f
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Wed Feb 2 15:57:18 2011 -0600
Committer:     Bob Peterson <rpeterso at redhat.com>
CommitterDate: Wed Feb 2 15:57:18 2011 -0600

gfs2_edit: print large block numbers better

The gfs2_edit tool was obscuring block number on the display when
the block number got big enough.  This patch makes it print the
block number so that it looks better when it gets big.

rhbz#656371
---
 gfs2/edit/hexedit.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index cdcdecd..13d432f 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -1061,17 +1061,10 @@ int display_block_type(int from_restore)
 	if (termlines) {
 		if (edit_row[dmode] == -1)
 			COLORS_NORMAL;
-		move(line,30);
-	}
-	else
-		print_gfs2(" ");
-	if (!from_restore) {
-		print_gfs2("of %llu (0x%llx)", max_block, max_block);
-		if (termlines)
-			move(line, 55);
-		else
-			printf(" ");
 	}
+	print_gfs2(" ");
+	if (!from_restore)
+		print_gfs2("of %llu (0x%llx) ", max_block, max_block);
 	if (block == RGLIST_DUMMY_BLOCK) {
 		ret_type = GFS2_METATYPE_RG;
 		struct_len = gfs1 ? sizeof(struct gfs_rgrp) : sizeof(struct gfs2_rgrp);


More information about the cluster-commits mailing list