diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-12-01 07:39:05 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-12-01 07:39:05 -0500 |
commit | 761b969283f415df75efe2ffb772a62b23379222 (patch) | |
tree | 66b297fd3a52397122ba44d0e4eefbd40cc6e160 /src/libudev/libudev-device-private.c | |
parent | ed7c6787bd009fb3e16fac6cccb6c0eb2fe7705e (diff) |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/libudev/libudev-device-private.c')
-rw-r--r-- | src/libudev/libudev-device-private.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libudev/libudev-device-private.c b/src/libudev/libudev-device-private.c index aa3b2270e0..be3f17fd47 100644 --- a/src/libudev/libudev-device-private.c +++ b/src/libudev/libudev-device-private.c @@ -129,7 +129,7 @@ int udev_device_update_db(struct udev_device *udev_device) mkdir_parents(filename_tmp, 0755); f = fopen(filename_tmp, "we"); if (f == NULL) { - log_debug("unable to create temporary db file '%s': %m", filename_tmp); + log_debug_errno(errno, "unable to create temporary db file '%s': %m", filename_tmp); return -errno; } |