chiark / gitweb /
udev: link-config - use new0 instead of calloc
[elogind.git] / src / udev / net / link-config-gperf.gperf
1 %{
2 #include <stddef.h>
3 #include "conf-parser.h"
4 #include "link-config.h"
5 #include "ethtool-util.h"
6 %}
7 struct ConfigPerfItem;
8 %null_strings
9 %language=ANSI-C
10 %define slot-name section_and_lvalue
11 %define hash-function-name link_config_gperf_hash
12 %define lookup-function-name link_config_gperf_lookup
13 %readonly-tables
14 %omit-struct-type
15 %struct-type
16 %includes
17 %%
18 Match.MACAddress,                   config_parse_hwaddr,        0, offsetof(link_config, match_mac)
19 Match.Path,                         config_parse_string,        0, offsetof(link_config, match_path)
20 Match.Driver,                       config_parse_string,        0, offsetof(link_config, match_driver)
21 Match.Type,                         config_parse_string,        0, offsetof(link_config, match_type)
22 Link.Description,                   config_parse_string,        0, offsetof(link_config, description)
23 Link.MACAddressPolicy,              config_parse_mac_policy,    0, offsetof(link_config, mac_policy)
24 Link.MACAddress,                    config_parse_hwaddr,        0, offsetof(link_config, mac)
25 Link.NamePolicy,                    config_parse_name_policy,   0, offsetof(link_config, name_policy)
26 Link.Name,                          config_parse_ifname,        0, offsetof(link_config, name)
27 Link.MTU,                           config_parse_unsigned,      0, offsetof(link_config, mtu)
28 Link.SpeedMBytes,                   config_parse_unsigned,      0, offsetof(link_config, speed)
29 Link.Duplex,                        config_parse_duplex,        0, offsetof(link_config, duplex)
30 Link.WakeOnLan,                     config_parse_wol,           0, offsetof(link_config, wol)