Sometimes the device decode logic just gets in the way so add a "force hex" option to register dump.
Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> --- ethtool.8 | 1 + ethtool.c | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ethtool.8 b/ethtool.8 index bffde30..d247d51 100644 --- a/ethtool.8 +++ b/ethtool.8 @@ -126,6 +126,7 @@ ethtool \- Display or change ethernet ca .B ethtool \-d|\-\-register\-dump .I ethX .B2 raw on off +.B2 hex on off .RB [ file .IR name ] diff --git a/ethtool.c b/ethtool.c index f004d54..06e3675 100644 --- a/ethtool.c +++ b/ethtool.c @@ -255,6 +255,7 @@ static int msglvl_wanted = -1; static int phys_id_time = 0; static int gregs_changed = 0; static int gregs_dump_raw = 0; +static int gregs_dump_hex = 0; static char *gregs_dump_file = NULL; static int geeprom_changed = 0; static int geeprom_dump_raw = 0; @@ -285,6 +286,7 @@ struct cmdline_info { static struct cmdline_info cmdline_gregs[] = { { "raw", CMDL_BOOL, &gregs_dump_raw, NULL }, + { "hex", CMDL_BOOL, &gregs_dump_hex, NULL }, { "file", CMDL_STR, &gregs_dump_file, NULL }, }; @@ -1000,10 +1002,11 @@ static int dump_regs(struct ethtool_drvi fclose(f); } - for (i = 0; i < ARRAY_SIZE(driver_list); i++) - if (!strncmp(driver_list[i].name, info->driver, - ETHTOOL_BUSINFO_LEN)) - return driver_list[i].func(info, regs); + if (!gregs_dump_hex) + for (i = 0; i < ARRAY_SIZE(driver_list); i++) + if (!strncmp(driver_list[i].name, info->driver, + ETHTOOL_BUSINFO_LEN)) + return driver_list[i].func(info, regs); fprintf(stdout, "Offset\tValues\n"); fprintf(stdout, "--------\t-----"); -- 1.4.2.3 - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html