diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-11-28 10:13:40 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-11-28 10:13:40 -0500 |
commit | 107530eaa336ae23f53a0f573901799564379106 (patch) | |
tree | c210091f470b6fe895cfac3bfcbcf9d107153e14 /src/gudev | |
parent | 62d9908a8432f115833f07bb9dadd8f7d8e1c316 (diff) |
log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers
This change has two benefits:
- The format string %m will now resolve to the specified error (or to
errno if the specified error is 0. This allows getting rid of a ton of
strerror() invocations, a function that is not thread-safe.
- The specified error can be passed to the journal in the ERRNO= field.
Now of course, we just need somebody to convert all cases of this:
log_error("Something happened: %s", strerror(-r));
into thus:
log_error_errno(-r, "Something happened: %m");
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/gudev')
0 files changed, 0 insertions, 0 deletions