diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-11-12 14:04:47 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-11-14 17:01:54 +0100 |
commit | aa8fbc74e3eadf57a15b84cce5778a8eab1d97e6 (patch) | |
tree | ea8b676c0cfc8d35dd9977d16a6fcf214704200d /src/hostname | |
parent | tree-wide: replace all remaining uses of parse_env_file() for parsing /proc/c... (diff) | |
download | systemd-aa8fbc74e3eadf57a15b84cce5778a8eab1d97e6.tar.xz systemd-aa8fbc74e3eadf57a15b84cce5778a8eab1d97e6.zip |
fileio: drop "newline" parameter for env file parsers
Now that we don't (mis-)use the env file parser to parse kernel command
lines there's no need anymore to override the used newline character
set. Let's hence drop the argument and just "\n\r" always. This nicely
simplifies our code.
Diffstat (limited to 'src/hostname')
-rw-r--r-- | src/hostname/hostnamed.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index a0535070b3..b8facaf47d 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -89,7 +89,7 @@ static int context_read_data(Context *c) { if (r < 0 && r != -ENOENT) return r; - r = parse_env_file(NULL, "/etc/machine-info", NEWLINE, + r = parse_env_file(NULL, "/etc/machine-info", "PRETTY_HOSTNAME", &c->data[PROP_PRETTY_HOSTNAME], "ICON_NAME", &c->data[PROP_ICON_NAME], "CHASSIS", &c->data[PROP_CHASSIS], @@ -314,7 +314,7 @@ static int context_write_data_machine_info(Context *c) { assert(c); - r = load_env_file(NULL, "/etc/machine-info", NULL, &l); + r = load_env_file(NULL, "/etc/machine-info", &l); if (r < 0 && r != -ENOENT) return r; |