File gfs2_edit_print_hex_numbers_in_lower_case.patch of Package cluster

commit 33f53bc031467eb32c8b14893898ae2a23ffaa31
Author: Bob Peterson <bob@ganesha.(none)>
Date:   Thu Sep 30 11:42:05 2010 -0500

    gfs2_edit: print hex numbers in lower-case
    
    This patch changes the gfs2_edit output so it always prints hex
    numbers in lower-case so they match debug output from the debugfs
    and dmesg.
    
    rhbz#634623

diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index 1f7cc14..95959ad 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -338,7 +338,7 @@ static int bobgets(char string[],int x,int y,int sz,int *ch)
 				break;
 			default:
 				move(0,70);
-				printw("%08X",*ch);
+				printw("%08x",*ch);
 				// ignore all other characters
 				break;
 			} // end switch on non-printable character
@@ -474,7 +474,7 @@ int display_block_type(int from_restore)
 	else
 		print_gfs2(" ");
 	if (!from_restore) {
-		print_gfs2("of %" PRIu64 " (0x%" PRIX64 ")", max_block,
+		print_gfs2("of %" PRIu64 " (0x%" PRIx64 ")", max_block,
 			   max_block);
 		if (termlines)
 			move(line, 55);
@@ -650,7 +650,7 @@ static int hexdump(uint64_t startaddr, int len)
 	uint64_t l;
 	const char *lpBuffer = bh->b_data;
 
-	strcpy(edit_fmt,"%02X");
+	strcpy(edit_fmt,"%02x");
 	pointer = (unsigned char *)lpBuffer + offset;
 	ptr2 = (unsigned char *)lpBuffer + offset;
 	l = offset;
@@ -667,9 +667,9 @@ static int hexdump(uint64_t startaddr, int len)
 			COLORS_OFFSETS; /* cyan for offsets */
 		}
 		if (startaddr < 0xffffffff)
-			print_gfs2("%.8"PRIX64, startaddr + l);
+			print_gfs2("%.8"PRIx64, startaddr + l);
 		else
-			print_gfs2("%.16"PRIX64, startaddr + l);
+			print_gfs2("%.16"PRIx64, startaddr + l);
 		if (termlines) {
 			if (l < struct_len)
 				COLORS_NORMAL; /* normal part of structure */
@@ -722,9 +722,9 @@ static int hexdump(uint64_t startaddr, int len)
 				i == edit_col[dmode]) {
 				COLORS_HIGHLIGHT; /* in the structure */
 				memset(estring,0,3);
-				sprintf(estring,"%02X",*pointer);
+				sprintf(estring,"%02x",*pointer);
 			}
-			print_gfs2("%02X",*pointer);
+			print_gfs2("%02x",*pointer);
 			if (termlines && line == edit_row[dmode] + 3 &&
 				i == edit_col[dmode]) {
 				if (l < struct_len + offset)
@@ -2878,7 +2878,7 @@ static void interactive_mode(void)
 			break;
 		default:
 			move(termlines - 1, 0);
-			printw("Keystroke not understood: 0x%03X",ch);
+			printw("Keystroke not understood: 0x%03x",ch);
 			refresh();
 			usleep(50000);
 			break;
@@ -2919,7 +2919,7 @@ void gfs_log_header_in(struct gfs_log_header *head,
 void gfs_log_header_print(struct gfs_log_header *lh)
 {
 	gfs2_meta_header_print(&lh->lh_header);
-	pv(lh, lh_flags, "%u", "0x%.8X");
+	pv(lh, lh_flags, "%u", "0x%.8x");
 	pv(lh, lh_pad, "%u", "%x");
 	pv((unsigned long long)lh, lh_first, "%llu", "%llx");
 	pv((unsigned long long)lh, lh_sequence, "%llu", "%llx");