diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-30 18:22:42 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-30 22:26:16 +0200 |
commit | 12ca818ffddb77eb6a0fabe369a5bcbf6994ff8b (patch) | |
tree | c8ebcdb6cc00af0e97cf16a629bf10990f8ae4d2 /src/network/networkd-util.c | |
parent | Merge pull request #1421 from keszybz/formatting-fixes (diff) | |
download | systemd-12ca818ffddb77eb6a0fabe369a5bcbf6994ff8b.tar.xz systemd-12ca818ffddb77eb6a0fabe369a5bcbf6994ff8b.zip |
tree-wide: clean up log_syntax() usage
- Rely everywhere that we use abs() on the error code passed in anyway,
thus don't need to explicitly negate what we pass in
- Never attach synthetic error number information to log messages. Only
log about errors we *receive* with the error number we got there,
don't log any synthetic error, that don#t even propagate, but just eat
up.
- Be more careful with attaching exactly the error we get, instead of
errno or unrelated errors randomly.
- Fix one occasion where the error number and line number got swapped.
- Make sure we never tape over OOM issues, or inability to resolve
specifiers
Diffstat (limited to 'src/network/networkd-util.c')
-rw-r--r-- | src/network/networkd-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-util.c b/src/network/networkd-util.c index a41cd86239..dde6b327ed 100644 --- a/src/network/networkd-util.c +++ b/src/network/networkd-util.c @@ -82,7 +82,7 @@ int config_parse_address_family_boolean_with_kernel( if (streq(rvalue, "kernel")) s = _ADDRESS_FAMILY_BOOLEAN_INVALID; else { - log_syntax(unit, LOG_ERR, filename, line, s, "Failed to parse IPForwarding= option, ignoring: %s", rvalue); + log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to parse IPForwarding= option, ignoring: %s", rvalue); return 0; } } @@ -133,7 +133,7 @@ int config_parse_resolve( s = resolve_support_from_string(rvalue); if (s < 0){ - log_syntax(unit, LOG_ERR, filename, line, -s, "Failed to parse %s= option, ignoring: %s", lvalue, rvalue); + log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to parse %s= option, ignoring: %s", lvalue, rvalue); return 0; } |