]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ethtool: minimize the size of port_table 11351/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Jan 2019 18:29:21 +0000 (03:29 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Jan 2019 18:30:15 +0000 (03:30 +0900)
Note that `_NET_DEV_PORT_MAX` is 0x100.

src/udev/net/ethtool-util.c

index bc0deaf347c111165cc85d5ec3607b90badbd008..a1eb6902aac73bc4efd3fb68b12ba9b5078b65b7 100644 (file)
@@ -31,18 +31,18 @@ static const char* const wol_table[_WOL_MAX] = {
         [WOL_ARP]         = "arp",
         [WOL_MAGIC]       = "magic",
         [WOL_MAGICSECURE] = "secureon",
-        [WOL_OFF]         = "off"
+        [WOL_OFF]         = "off",
 };
 
 DEFINE_STRING_TABLE_LOOKUP(wol, WakeOnLan);
 DEFINE_CONFIG_PARSE_ENUM(config_parse_wol, wol, WakeOnLan, "Failed to parse WakeOnLan setting");
 
-static const char* const port_table[_NET_DEV_PORT_MAX] = {
+static const char* const port_table[] = {
         [NET_DEV_PORT_TP]     = "tp",
         [NET_DEV_PORT_AUI]    = "aui",
         [NET_DEV_PORT_MII]    = "mii",
         [NET_DEV_PORT_FIBRE]  = "fibre",
-        [NET_DEV_PORT_BNC]    = "bnc"
+        [NET_DEV_PORT_BNC]    = "bnc",
 };
 
 DEFINE_STRING_TABLE_LOOKUP(port, NetDevPort);