diff options
author | Manfred Spraul <manfred@colorfullife.com> | 2005-10-25 02:23:28 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-25 02:23:28 -0400 |
commit | 6960d52a9dff61f0c6d5c788d0cd4b691d28c7e7 (patch) | |
tree | c68e422b692dacef4893314d30f9af01b2ee67cd /ethtool.c | |
parent | b2fe65baadfbcc1ec8f1375256aef24a9ff178d4 (diff) | |
download | ethtool-6960d52a9dff61f0c6d5c788d0cd4b691d28c7e7.tar.gz |
Use hexdump instead of single values for default register dump.
forcedeth now supports ethtool -d, but ethtool dumps that as 1024 lines
with one value in each line.
A hexdump would be far better readable than the current output.
Diffstat (limited to 'ethtool.c')
-rw-r--r-- | ethtool.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -954,11 +954,14 @@ static int dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) ETHTOOL_BUSINFO_LEN)) return driver_list[i].func(info, regs); - fprintf(stdout, "Offset\tValue\n"); - fprintf(stdout, "--------\t-----\n"); - for (i = 0; i < regs->len; i++) - fprintf(stdout, "%02d\t0x%02x\n", i, regs->data[i]); - fprintf(stdout, "\n"); + fprintf(stdout, "Offset\tValues\n"); + fprintf(stdout, "--------\t-----"); + for (i = 0; i < regs->len; i++) { + if (i%16 == 0) + fprintf(stdout, "\n%03x:\t", i); + fprintf(stdout, " %02x", regs->data[i]); + } + fprintf(stdout, "\n\n"); return 0; } |