X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fconf-parser.c;h=d27b1b7eeac40206888376c216a443932cb33c23;hb=7d711efb9c6fd6d025cb688aa8317ce6a78db711;hp=86435d3bdebd3c87fa42b408a60878c9cce24212;hpb=8f2665a463ffb2b822c1e3effdb292d2bddf72be;p=elogind.git diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 86435d3bd..d27b1b7ee 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -585,7 +585,7 @@ int config_parse_string( assert(data); if (!utf8_is_valid(rvalue)) { - log_syntax(unit, LOG_ERR, filename, line, EINVAL, "String is not UTF-8 clean, ignoring assignment: %s", rvalue); + log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue); return 0; } @@ -623,7 +623,7 @@ int config_parse_path( assert(data); if (!utf8_is_valid(rvalue)) { - log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Path is not UTF-8 clean, ignoring assignment: %s", rvalue); + log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue); return 0; } @@ -681,19 +681,18 @@ int config_parse_strv(const char *unit, } FOREACH_WORD_QUOTED(w, l, rvalue, state) { - _cleanup_free_ char *n; + char *n; n = cunescape_length(w, l); if (!n) return log_oom(); if (!utf8_is_valid(n)) { - log_syntax(unit, LOG_ERR, filename, line, EINVAL, - "String is not UTF-8 clean, ignoring: %s", rvalue); + log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue); continue; } - r = strv_extend(sv, n); + r = strv_consume(sv, n); if (r < 0) return log_oom(); }