[systemd-devel] [PATCH 1/2] Report about syntax error in extended format

Oleksii Shevchuk alxchk at gmail.com
Wed Apr 17 21:41:36 PDT 2013


Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl> writes:

> I have now pushed a change that adds UNIT= or USER_UNIT= to most
> syntax error messages. This patch mostly follows Oleksii's approach,
> but extends it to all syntax parsing functions.
>

For the last time I tried to use next approach: I added reporting
callback to all parser functions. That was enough, because *userdata
contains all nessesary information about call (because it's used by
caller to store parsed data to). That makes further extentions less
expensive..

> The 'issues' patch can now easily go on top, by hooking into
> log_syntax_internal.

What is supposed way to hook with log_syntax_internal? Address unit data by name?
conf-parser called not only for parsing unit files, but configuration
files of services too..

Probably I'll replace *unit with *reporter and move log_struct calling to
the callback owner instead. 


More information about the systemd-devel mailing list