summaryrefslogtreecommitdiff
path: root/src/sysctl
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-03-27 13:41:59 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-27 12:01:44 -0400
commit6f6fad96addf6b00b55c98cc0d0d8026b0c1e7ca (patch)
tree5bc85911427c14ac72ed06da407d6361db2058a5 /src/sysctl
parentf36a783ca7b8200d4e865a49342e44929c0f4c06 (diff)
systemd-sysctl: Handle missing /etc/sysctl.conf properly
Since fabe5c0e5fce730aa66e10a9c4f9fdd443d7aeda, systemd-sysctl returns a non-zero exit code if /etc/sysctl.conf does not exist, due to a broken ENOENT check.
Diffstat (limited to 'src/sysctl')
-rw-r--r--src/sysctl/sysctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
index 2d43660bb5..79f3f77676 100644
--- a/src/sysctl/sysctl.c
+++ b/src/sysctl/sysctl.c
@@ -125,7 +125,7 @@ static int parse_file(Hashmap *sysctl_options, const char *path, bool ignore_eno
r = search_and_fopen_nulstr(path, "re", conf_file_dirs, &f);
if (r < 0) {
- if (ignore_enoent && errno == -ENOENT)
+ if (ignore_enoent && r == -ENOENT)
return 0;
log_error("Failed to open file '%s', ignoring: %s", path, strerror(-r));