ethtool/ethtool-cmd-speed-display-all.patch
OBS User autobuild fb18bb9a29 Accepting request 25406 from network:utilities
Copy from network:utilities/ethtool based on submit request 25406 from user mseben

OBS-URL: https://build.opensuse.org/request/show/25406
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ethtool?expand=0&rev=8
2009-12-04 11:27:18 +00:00

21 lines
659 B
Diff

ethtool: display all speed values, not just the predefined ones
Some NICs report speeds other than 10, 100, 1000, 10000 to user land.
At least display them properly.
Signed-off-by: Olaf Kirch <okir@suse.de>
------------------------------------------------------------------
diff -ur ethtool-6//ethtool.c speed//ethtool.c
--- ethtool-6.orig/ethtool.c 2009-11-19 08:28:23.000000000 +0100
+++ ethtool-6/ethtool.c 2009-11-19 08:22:46.000000000 +0100
@@ -819,7 +819,7 @@
fprintf(stdout, "10000Mb/s\n");
break;
default:
- fprintf(stdout, "Unknown! (%i)\n", ethtool_cmd_speed(ep));
+ fprintf(stdout, "%iMb/s\n", ethtool_cmd_speed(ep));
break;
};