summaryrefslogtreecommitdiff
path: root/ethtool.c
diff options
context:
space:
mode:
authorManfred Spraul <manfred@colorfullife.com>2005-10-25 02:23:28 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-25 02:23:28 -0400
commit6960d52a9dff61f0c6d5c788d0cd4b691d28c7e7 (patch)
treec68e422b692dacef4893314d30f9af01b2ee67cd /ethtool.c
parentb2fe65baadfbcc1ec8f1375256aef24a9ff178d4 (diff)
downloadethtool-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.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/ethtool.c b/ethtool.c
index f7f89a4..89dd319 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -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;
}