From 6960d52a9dff61f0c6d5c788d0cd4b691d28c7e7 Mon Sep 17 00:00:00 2001 From: Manfred Spraul Date: Tue, 25 Oct 2005 02:23:28 -0400 Subject: 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. --- ethtool.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'ethtool.c') 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; } -- cgit v1.2.1