[systemd-devel] Antw: Re: "Unknown lvalue '' in section 'Service'"
Ulrich Windl
Ulrich.Windl at rz.uni-regensburg.de
Thu Jul 18 09:49:08 UTC 2019
>>> Mantas Mikulenas <grawity at gmail.com> schrieb am 18.07.2019 um 10:46 in
Nachricht
<CAPWNY8W1JKV6TeSSg_dD82+QfM3T2_o=KxpwiuZDVfbxx4Y-LA at mail.gmail.com>:
> On Thu, Jul 18, 2019 at 11:34 AM Ulrich Windl <
> Ulrich.Windl at rz.uni-regensburg.de> wrote:
>
>> Hi!
>>
>> I noticed that a line of "=======" in "[Service]" cases the message "
>> Unknown lvalue '' in section 'Service'".
>> (systemd 228)
>>
>> Shouldn't that be "Parse error at '=======' in section 'Service'"?
>>
>
> Arguably it isn't a parse error – the keyfile parser successfully
> recognizes the line as assigning the value "======" to the key "". It's
> only later when the parsed results are interpreted that each key is matched
> to an internal handler.
Well, of course it's a matter of interpretation:
You could assign "======" to a variable with an empty name, or you could
assing "=====" to a variable named "=", but to me the the parser sould detect
theis kind of error (I susüect it was a mark from some merge, btw)
>
> The error message *could* be clearer if all such errors had a common "Parse
> error:" prefix, I guess. (And what's the point of calling it an 'lvalue'
> anyway?...)
Well if the variable with an empty name is valid, it's an lvalue and it's name
is the "unknown" value (if you like to argue that way). IMHO variable names
consisting of empty strings are a bad concept at least...
>
> --
> Mantas Mikulėnas
More information about the systemd-devel
mailing list