summaryrefslogtreecommitdiff
path: root/src/login
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/login
parente2047ba9ed68aa223715f25e156aeb0665c884ce (diff)
downloadsystemd-1a5a177eafa72adfd40916be05f35b71011014b0.tar.gz
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/login')
-rw-r--r--src/login/logind-inhibit.c2
-rw-r--r--src/login/logind-session.c2
-rw-r--r--src/login/logind-user.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c
index 0938f2f101..8bf3e72d22 100644
--- a/src/login/logind-inhibit.c
+++ b/src/login/logind-inhibit.c
@@ -198,7 +198,7 @@ int inhibitor_load(Inhibitor *i) {
char *cc;
int r;
- r = parse_env_file(i->state_file, NEWLINE,
+ r = parse_env_file(NULL, i->state_file, NEWLINE,
"WHAT", &what,
"UID", &uid,
"PID", &pid,
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index eb131ae50c..a82498c92e 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -365,7 +365,7 @@ int session_load(Session *s) {
assert(s);
- r = parse_env_file(s->state_file, NEWLINE,
+ r = parse_env_file(NULL, s->state_file, NEWLINE,
"REMOTE", &remote,
"SCOPE", &s->scope,
"SCOPE_JOB", &s->scope_job,
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index 8d3af6948c..1dfc590147 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -287,7 +287,7 @@ int user_load(User *u) {
assert(u);
- r = parse_env_file(u->state_file, NEWLINE,
+ r = parse_env_file(NULL, u->state_file, NEWLINE,
"SERVICE_JOB", &u->service_job,
"SLICE_JOB", &u->slice_job,
"DISPLAY", &display,