From: Yu Watanabe Date: Thu, 20 Mar 2025 23:37:46 +0000 (+0900) Subject: analyze: propagate error code returned by _from_string() X-Git-Tag: v258-rc1~1029 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=513f4d675a24a43f2588ef5cfe7a5b80fc207a49;p=thirdparty%2Fsystemd.git analyze: propagate error code returned by _from_string() Follow-up for a483c39fc20aced2178c908405fd020eda753964. Addresses https://github.com/systemd/systemd/pull/36468#discussion_r2005765024. --- diff --git a/src/analyze/analyze-condition.c b/src/analyze/analyze-condition.c index 630c4b389be..111f24f8d98 100644 --- a/src/analyze/analyze-condition.c +++ b/src/analyze/analyze-condition.c @@ -36,7 +36,7 @@ static int parse_condition(Unit *u, const char *line) { type = assert_type_from_string(type_string); } if (type < 0) - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Cannot parse \"%s\".", line); + return log_error_errno(type, "Cannot parse \"%s\".", line); const char *val = skip_leading_chars(eq + 1, /* bad = */ NULL);