X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=conf-parser.c;h=2cf90f2defa1ff8dec0ae4d5c7aad47d433baecd;hb=6dde1f33e1249a8a6b354372dd95065f26b8c712;hp=712b4e489c3fc9e7c35988d3b79978ead1bd458d;hpb=d2b9fd2bb971b3b7a23acdfa1748d6810629c94c;p=elogind.git diff --git a/conf-parser.c b/conf-parser.c index 712b4e489..2cf90f2de 100644 --- a/conf-parser.c +++ b/conf-parser.c @@ -63,7 +63,10 @@ static int next_assignment( return t->parse(filename, line, section, lvalue, rvalue, t->data, userdata); } - log_info("[%s:%u] Unknown lvalue '%s' in section '%s'. Ignoring.", filename, line, lvalue, strna(section)); + /* Warn about unknown non-extension fields. */ + if (!startswith(lvalue, "X-")) + log_info("[%s:%u] Unknown lvalue '%s' in section '%s'. Ignoring.", filename, line, lvalue, strna(section)); + return 0; } @@ -108,6 +111,7 @@ static int parse_line(const char *filename, unsigned line, char **section, const return -ENOMEM; if (sections && !strv_contains((char**) sections, n)) { + log_error("[%s:%u] Unknown section '%s'.", filename, line, n); free(n); return -EBADMSG; }