From: Zbigniew Jędrzejewski-Szmek Date: Sun, 11 Dec 2016 04:20:42 +0000 (-0500) Subject: basic/extract-word,man: clarify "correction" of invalid escapes X-Git-Tag: v233.3~119 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=4e18c45c953d5c07e5c7e15fdb56a1cbb8eccc90 basic/extract-word,man: clarify "correction" of invalid escapes Our warning message was misleading, because we wouldn't "correct" anything, we'd just ignore unkown escapes. Update the message. Also, print just the extracted word (which contains the offending sequences) in the message, instead of the whole line. Fixes #4697. --- diff --git a/src/basic/extract-word.c b/src/basic/extract-word.c index 609f5dc22..9d33c7f63 100644 --- a/src/basic/extract-word.c +++ b/src/basic/extract-word.c @@ -228,8 +228,8 @@ int extract_first_word_and_warn( *p = save; r = extract_first_word(p, ret, separators, flags|EXTRACT_CUNESCAPE_RELAX); if (r >= 0) { - /* It worked this time, hence it must have been an invalid escape sequence we could correct. */ - log_syntax(unit, LOG_WARNING, filename, line, EINVAL, "Invalid escape sequences in line, correcting: \"%s\"", rvalue); + /* It worked this time, hence it must have been an invalid escape sequence. */ + log_syntax(unit, LOG_WARNING, filename, line, EINVAL, "Ignoring unknown escape sequences: \"%s\"", *ret); return r; }