summaryrefslogtreecommitdiff
path: root/src/udev/net/link-config-gperf.gperf
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-10-28 20:59:56 +0100
committerTom Gundersen <teg@jklm.no>2013-10-29 14:17:57 +0100
commit5fde13d748749f0e06e2e6cdd15f0980a79ea82c (patch)
treea10f8106048135d1f84b3dbe6c1ec9d8827afd1f /src/udev/net/link-config-gperf.gperf
parent916484f54d084e11a11458716b2e0bbdf4822d40 (diff)
udev: link-config - add proper parsing
Diffstat (limited to 'src/udev/net/link-config-gperf.gperf')
-rw-r--r--src/udev/net/link-config-gperf.gperf15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/udev/net/link-config-gperf.gperf b/src/udev/net/link-config-gperf.gperf
index 1d905319e9..130ebc9b90 100644
--- a/src/udev/net/link-config-gperf.gperf
+++ b/src/udev/net/link-config-gperf.gperf
@@ -2,6 +2,7 @@
#include <stddef.h>
#include "conf-parser.h"
#include "link-config.h"
+#include "ethtool-util.h"
%}
struct ConfigPerfItem;
%null_strings
@@ -14,16 +15,16 @@ struct ConfigPerfItem;
%struct-type
%includes
%%
-Match.MACAddress, config_parse_string, 0, offsetof(link_config, match_mac)
+Match.MACAddress, config_parse_hwaddr, 0, offsetof(link_config, match_mac)
Match.Path, config_parse_string, 0, offsetof(link_config, match_path)
Match.Driver, config_parse_string, 0, offsetof(link_config, match_driver)
Match.Type, config_parse_string, 0, offsetof(link_config, match_type)
Link.Description, config_parse_string, 0, offsetof(link_config, description)
-Link.MACAddressPolicy, config_parse_string, 0, offsetof(link_config, mac_policy)
-Link.MACAddress, config_parse_string, 0, offsetof(link_config, mac)
-Link.NamePolicy, config_parse_strv, 0, offsetof(link_config, name_policy)
-Link.Name, config_parse_string, 0, offsetof(link_config, name)
+Link.MACAddressPolicy, config_parse_mac_policy, 0, offsetof(link_config, mac_policy)
+Link.MACAddress, config_parse_hwaddr, 0, offsetof(link_config, mac)
+Link.NamePolicy, config_parse_name_policy, 0, offsetof(link_config, name_policy)
+Link.Name, config_parse_ifname, 0, offsetof(link_config, name)
Link.MTU, config_parse_unsigned, 0, offsetof(link_config, mtu)
Link.SpeedMBytes, config_parse_unsigned, 0, offsetof(link_config, speed)
-Link.Duplex, config_parse_string, 0, offsetof(link_config, duplex)
-Link.WakeOnLan, config_parse_string, 0, offsetof(link_config, wol)
+Link.Duplex, config_parse_duplex, 0, offsetof(link_config, duplex)
+Link.WakeOnLan, config_parse_wol, 0, offsetof(link_config, wol)