From: Lennart Poettering Date: Tue, 14 Jul 2020 10:21:47 +0000 (+0200) Subject: analyze: make testing ConditionPathExistsGlob= work X-Git-Tag: v246-rc2~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08ef688656fc0f387e9cff503fd0e6365c8e4b84;p=thirdparty%2Fsystemd.git analyze: make testing ConditionPathExistsGlob= work Fixes: #16439 Alternative-To: #16440 --- diff --git a/src/analyze/analyze-condition.c b/src/analyze/analyze-condition.c index d18ee9d043a..52ad382637f 100644 --- a/src/analyze/analyze-condition.c +++ b/src/analyze/analyze-condition.c @@ -85,11 +85,14 @@ static int parse_condition(Unit *u, const char *line) { p = startswith(line, c->name); if (!p) continue; + p += strspn(p, WHITESPACE); + if (*p != '=') - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Expected \"=\" in \"%s\".", line); + continue; + p++; - p += 1 + strspn(p + 1, WHITESPACE); + p += strspn(p, WHITESPACE); return c->parser(NULL, "(stdin)", 0, NULL, 0, c->name, c->type, p, target, u); }