From: Lennart Poettering Date: Thu, 22 May 2014 07:47:46 +0000 (+0900) Subject: conf-parser: never consider it an error if we cannot load a drop-in file because... X-Git-Tag: v213~36 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=9f43a07f10639c5b41b45448e551e43914eefe32 conf-parser: never consider it an error if we cannot load a drop-in file because it is missing After all, we want to be able to boot with /etc empty one day... --- diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 062b15b86..77a172e9f 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -340,8 +340,8 @@ int config_parse(const char *unit, if (!f) { f = ours = fopen(filename, "re"); if (!f) { - log_error("Failed to open configuration file '%s': %m", filename); - return -errno; + log_full(errno == ENOENT ? LOG_DEBUG : LOG_ERR, "Failed to open configuration file '%s': %m", filename); + return errno == ENOENT ? 0 : -errno; } }