summaryrefslogtreecommitdiffstats
path: root/src/network/netdev
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-01-09 14:32:44 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-01-11 13:04:11 +0100
commit5360d7713198b497b669724869bdb9a40d500c9d (patch)
tree0c95610d0a608e081b67745f80d7c7e2c23d3176 /src/network/netdev
parenttmpfiles: consider /etc uninitialized also when /etc/machine-id is present bu... (diff)
downloadsystemd-5360d7713198b497b669724869bdb9a40d500c9d.tar.xz
systemd-5360d7713198b497b669724869bdb9a40d500c9d.zip
netdev: use "relaxed" parsing
We parse each netdev file twice: once to determine the type and match conditions, and then the second time properly. In bcde742e78ac3b8e8ea348cfb022c820c11800e2 the flags for the first parsing were (inadvertently I assume) were changed to emit warnings. But this first pass is called with only [Match] and [NetDev] sections, so we'd get warnings about all other section types. The obvious solution would be to remove CONFIG_PARSE_WARN again, but I think it's better to keep the warnings and set CONFIG_PARSE_RELAXED: we do want to get warnings about malformed lines and such, and _RELAXED is enough to kill warnings about unknown sections.
Diffstat (limited to 'src/network/netdev')
-rw-r--r--src/network/netdev/netdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
index 199e911128..93648e1be0 100644
--- a/src/network/netdev/netdev.c
+++ b/src/network/netdev/netdev.c
@@ -647,7 +647,7 @@ static int netdev_load_one(Manager *manager, const char *filename) {
r = config_parse_many(filename, network_dirs, dropin_dirname,
"Match\0NetDev\0",
config_item_perf_lookup, network_netdev_gperf_lookup,
- CONFIG_PARSE_WARN, netdev_raw);
+ CONFIG_PARSE_WARN|CONFIG_PARSE_RELAXED, netdev_raw);
if (r < 0)
return r;