mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
shared/conf-parser: emit a nicer warning for something like "======"
Urlich Windl wrote on the mailing list: > I noticed that a line of "=======" in "[Service]" cases the message " Unknown lvalue '' in section 'Service'". This now becomes: /etc/systemd/system/eqeqeqeq.service:3: Missing key name before '=', ignoring line.
This commit is contained in:
parent
2d4fffb00b
commit
8be8ed8ce1
@ -249,6 +249,9 @@ static int parse_line(
|
|||||||
if (!e)
|
if (!e)
|
||||||
return log_syntax(unit, LOG_WARNING, filename, line, 0,
|
return log_syntax(unit, LOG_WARNING, filename, line, 0,
|
||||||
"Missing '=', ignoring line.");
|
"Missing '=', ignoring line.");
|
||||||
|
if (e == l)
|
||||||
|
return log_syntax(unit, LOG_WARNING, filename, line, 0,
|
||||||
|
"Missing key name before '=', ignoring line.");
|
||||||
|
|
||||||
*e = 0;
|
*e = 0;
|
||||||
e++;
|
e++;
|
||||||
|
Loading…
Reference in New Issue
Block a user