<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 18, 2019 at 12:49 PM Ulrich Windl <<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de">Ulrich.Windl@rz.uni-regensburg.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">>>> Mantas Mikulenas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>> schrieb am 18.07.2019 um 10:46 in<br>
Nachricht<br>
<CAPWNY8W1JKV6TeSSg_dD82+QfM3T2_o=<a href="mailto:KxpwiuZDVfbxx4Y-LA@mail.gmail.com" target="_blank">KxpwiuZDVfbxx4Y-LA@mail.gmail.com</a>>:<br>
> On Thu, Jul 18, 2019 at 11:34 AM Ulrich Windl <<br>
> <a href="mailto:Ulrich.Windl@rz.uni-regensburg.de" target="_blank">Ulrich.Windl@rz.uni-regensburg.de</a>> wrote:<br>
> <br>
>> Hi!<br>
>><br>
>> I noticed that a line of "=======" in "[Service]" cases the message "<br>
>> Unknown lvalue '' in section 'Service'".<br>
>> (systemd 228)<br>
>><br>
>> Shouldn't that be "Parse error at '=======' in section 'Service'"?<br>
>><br>
> <br>
> Arguably it isn't a parse error – the keyfile parser successfully<br>
> recognizes the line as assigning the value "======" to the key "". It's<br>
> only later when the parsed results are interpreted that each key is matched<br>
> to an internal handler.<br>
<br>
Well, of course it's a matter of interpretation:<br>
You could assign "======" to a variable with an empty name, or you could<br>
assing "=====" to a variable named "=", but to me the the parser sould detect<br>
theis kind of error (I susüect it was a mark from some merge, btw)<br>
<br>
> <br>
> The error message *could* be clearer if all such errors had a common "Parse<br>
> error:" prefix, I guess. (And what's the point of calling it an 'lvalue'<br>
> anyway?...)<br>
<br>
Well if the variable with an empty name is valid, it's an lvalue and it's name<br>
is the "unknown" value (if you like to argue that way). IMHO variable names<br>
consisting of empty strings are a bad concept at least...<br></blockquote><div><br></div><div>Yes, and Zbigniew's PR adjusts the parser to not allow empty names.</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div></div>