diff options
author | Ingo Bürk <admin@airblader.de> | 2019-01-27 22:40:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-27 22:40:46 +0100 |
commit | 1f3fe73b36547e486984c1798f3ab0b2bf0b9bff (patch) | |
tree | 64bf26a4131db0333b87b695c60014812aee0d6e | |
parent | e36966d49cb2db0be24baf845aedcde109841ff8 (diff) | |
parent | 0e4fd9ad4a4cc7d6c770134a077e91b02f6cd2f0 (diff) |
Merge pull request #334 from stapelberg/speed
fix ethernet speed display for 100 Gbit/s cards
-rw-r--r-- | src/print_eth_info.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/print_eth_info.c b/src/print_eth_info.c index f9e63da..81e74a7 100644 --- a/src/print_eth_info.c +++ b/src/print_eth_info.c @@ -43,7 +43,7 @@ static int print_eth_speed(char *outwalk, const char *interface) { ifr.ifr_data = (caddr_t)&ecmd; (void)strcpy(ifr.ifr_name, interface); if (ioctl(general_socket, SIOCETHTOOL, &ifr) == 0) { - ethspeed = (ecmd.speed == USHRT_MAX ? 0 : ecmd.speed); + ethspeed = (ecmd.speed == USHRT_MAX ? 0 : ethtool_cmd_speed(&ecmd)); return sprintf(outwalk, "%d Mbit/s", ethspeed); } else return sprintf(outwalk, "?"); |