diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-21 00:26:32 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-21 11:05:11 -0500 |
commit | 19a8e656a96d63c0b0047a84db980dd57ba51df2 (patch) | |
tree | 95194f9ce6c45e665871c422d07f8b42960bc5ea /man/sd_session_is_active.xml | |
parent | f4850a1d9593fd0f226e507c353ebdd46c069070 (diff) |
udev-rules: make error messages about rules more uniform
Also downgrade non-fatal warnings to log_warning.
Previously rule_add_key() would check the output array and log a cryptic
error and return -1. Most of the time the return value was ignored. This
does not seems right, because the buffer can overflow with enough rules.
It would also check if we have enough space for the *next* rule, even if
there might be not next rule, i.e. off-by-one.
Replace this with a check that we have enough space for a next rule before
we start parsing.
Normally using macros to alter flow is not allowed, but in this case I
think it is worth it, because it allows lots of boilerplate code to be
removed and hides repeated boring parameters, making function logic much
easier to follow.
Diffstat (limited to 'man/sd_session_is_active.xml')
0 files changed, 0 insertions, 0 deletions