summaryrefslogtreecommitdiff
path: root/src/firstboot/firstboot.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 19:29:59 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 19:49:27 +0100
commit56f64d95763a799ba4475daf44d8e9f72a1bd474 (patch)
tree4c38253c718dc1972b811fa7c01ebfa3c2b7776c /src/firstboot/firstboot.c
parent895b3a7b44fe7ca2f260986be2a877ff56a72718 (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.
Diffstat (limited to 'src/firstboot/firstboot.c')
-rw-r--r--src/firstboot/firstboot.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
index 343f3e100e..d8fbd5945f 100644
--- a/src/firstboot/firstboot.c
+++ b/src/firstboot/firstboot.c
@@ -337,7 +337,7 @@ static int process_timezone(void) {
mkdir_parents(etc_localtime, 0755);
if (symlink(p, etc_localtime) < 0) {
- log_error("Failed to create %s symlink: %m", etc_localtime);
+ log_error_errno(errno, "Failed to create %s symlink: %m", etc_localtime);
return -errno;
}
@@ -357,7 +357,7 @@ static int process_timezone(void) {
mkdir_parents(etc_localtime, 0755);
if (symlink(e, etc_localtime) < 0) {
- log_error("Failed to create %s symlink: %m", etc_localtime);
+ log_error_errno(errno, "Failed to create %s symlink: %m", etc_localtime);
return -errno;
}
@@ -566,7 +566,7 @@ static int process_root_password(void) {
if (!errno)
errno = EIO;
- log_error("Failed to find shadow entry for root: %m");
+ log_error_errno(errno, "Failed to find shadow entry for root: %m");
return -errno;
}
@@ -604,7 +604,7 @@ static int process_root_password(void) {
if (!errno)
errno = -EINVAL;
- log_error("Failed to encrypt password: %m");
+ log_error_errno(errno, "Failed to encrypt password: %m");
return -errno;
}