X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fsysctl%2Fsysctl.c;h=79f3f77676c81efdf3cc584123d9131e23402d0d;hb=6f6fad96addf6b00b55c98cc0d0d8026b0c1e7ca;hp=2d43660bb5285a8eaf5435f04a7be2bd8f2ec45f;hpb=a5c32cff1f56afe6f0c6c70d91a88a7a8238b2d7;p=elogind.git diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index 2d43660bb..79f3f7767 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));