cluster: RHEL57 - gfs2_edit: print hex numbers in lower-case
Bob Peterson
rpeterso at fedoraproject.org
Wed Feb 2 21:15:42 UTC 2011
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=7c8b325db69186d61a44a0f38c46278ea000b2a6
Commit: 7c8b325db69186d61a44a0f38c46278ea000b2a6
Parent: c9c57f5f0409743435e171c57cc7e59bd0b09cac
Author: Bob Peterson <rpeterso at redhat.com>
AuthorDate: Mon Dec 13 10:45:03 2010 -0600
Committer: Bob Peterson <rpeterso at redhat.com>
CommitterDate: Wed Feb 2 14:36:08 2011 -0600
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#656371
---
gfs2/edit/hexedit.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index c7d1849..196b324 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -358,7 +358,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
@@ -494,7 +494,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);
@@ -670,7 +670,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;
@@ -687,9 +687,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 */
@@ -742,9 +742,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)
@@ -2892,7 +2892,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;
@@ -2933,7 +2933,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");
More information about the cluster-commits
mailing list