LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File gfs2_edit_print_large_block_numbers_better.patch of Package cluster (Project home:sschapiro:openstack:upstream)

commit 87f0950748b045b50e7ce18a8baf6e0ac81a1492
Author: Bob Peterson <rpeterso@redhat.com>
Date:   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#674843

diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index 467885e..4fc8a43 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -1059,18 +1059,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 %" PRIu64 " (0x%" PRIx64 ")", 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);