diff options
author | Michael Brown <mcb30@etherboot.org> | 2009-07-12 21:30:08 +0100 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2009-07-17 22:58:44 +0100 |
commit | 51172783e2211bc90017d14bafec5d2eb4080694 (patch) | |
tree | 59aae3e947043cb76ad67b694ba0d3cc46fdffdb | |
parent | b7e93a6a55cadbf14fc0fc8f797d2f576c0c5dda (diff) | |
download | ipxe-51172783e2211bc90017d14bafec5d2eb4080694.tar.gz |
[debug] Use a delimiter to break up DBG_HD() output
Reading sixteen columns of hex digits can be difficult; include a "-"
character to split the output into two groups of eight columns.
-rw-r--r-- | src/core/debug.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/debug.c b/src/core/debug.c index 500a7ac05..8f9293099 100644 --- a/src/core/debug.c +++ b/src/core/debug.c @@ -36,7 +36,8 @@ static void dbg_hex_dump_da_row ( unsigned long dispaddr, const void *data, printf ( " " ); continue; } - printf ( " %02x", bytes[i] ); + printf ( "%c%02x", + ( ( ( i % 16 ) == 8 ) ? '-' : ' ' ), bytes[i] ); } printf ( " : " ); for ( i = offset ; i < ( offset + 16 ) ; i++ ) { |