summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-03-23 21:31:14 +0100
committerLennart Poettering <lennart@poettering.net>2018-05-24 17:01:57 +0200
commit1a5a177eafa72adfd40916be05f35b71011014b0 (patch)
treedf4d3504ef6ea99aaf75f9cce66a3dc3127fc296 /src/network
parentprocess-util: add a new FORK_MOUNTNS_SLAVE flag for safe_fork() (diff)
downloadsystemd-1a5a177eafa72adfd40916be05f35b71011014b0.tar.xz
systemd-1a5a177eafa72adfd40916be05f35b71011014b0.zip
fileio: accept FILE* in addition to path in parse_env_file()
Most our other parsing functions do this, let's do this here too, internally we accept that anyway. Also, the closely related load_env_file() and load_env_file_pairs() also do this, so let's be systematic.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c2
-rw-r--r--src/network/networkd-lldp-tx.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index be0742e47b..8cc817ac00 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -2866,7 +2866,7 @@ static int link_load(Link *link) {
assert(link);
- r = parse_env_file(link->state_file, NEWLINE,
+ r = parse_env_file(NULL, link->state_file, NEWLINE,
"NETWORK_FILE", &network_file,
"ADDRESSES", &addresses,
"ROUTES", &routes,
diff --git a/src/network/networkd-lldp-tx.c b/src/network/networkd-lldp-tx.c
index 6cccfc4be0..a2121eb5ff 100644
--- a/src/network/networkd-lldp-tx.c
+++ b/src/network/networkd-lldp-tx.c
@@ -249,7 +249,7 @@ static int link_send_lldp(Link *link) {
return r;
(void) gethostname_strict(&hostname);
- (void) parse_env_file("/etc/machine-info", NEWLINE, "PRETTY_HOSTNAME", &pretty_hostname, NULL);
+ (void) parse_env_file(NULL, "/etc/machine-info", NEWLINE, "PRETTY_HOSTNAME", &pretty_hostname, NULL);
assert_cc(LLDP_TX_INTERVAL_USEC * LLDP_TX_HOLD + 1 <= (UINT16_MAX - 1) * USEC_PER_SEC);
ttl = DIV_ROUND_UP(LLDP_TX_INTERVAL_USEC * LLDP_TX_HOLD + 1, USEC_PER_SEC);