summaryrefslogtreecommitdiff
path: root/src/core/main.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 17:09:20 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 17:17:51 +0100
commitc33b329709ebe2755181980a050d02ec7c81ed87 (patch)
tree39080c428c72c90daddbe1c08d45c181adf1476c /src/core/main.c
parent5567fafbc9d83a1391f23ecdbe698a3c03929370 (diff)
treewide: more log_*_errno() conversions, multiline calls
Basically: find . -name '*.[ch]' | while read f; do perl -i.mmm -e \ 'local $/; local $_=<>; s/log_(debug|info|notice|warning|error|emergency)\("([^"]*)%s"([^;]*),\s*strerror\(-?([->a-zA-Z_]+)\)\);/log_\1_errno(\4, "\2%m"\3);/gms;print;' \ $f; done Plus manual indentation fixups.
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/main.c b/src/core/main.c
index c204758d43..6224a7ae6b 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1695,7 +1695,7 @@ int main(int argc, char *argv[]) {
if (r < 0)
log_error("Failed to load default target: %s", bus_error_message(&error, r));
else if (target->load_state == UNIT_ERROR || target->load_state == UNIT_NOT_FOUND)
- log_error("Failed to load default target: %s", strerror(-target->load_error));
+ log_error_errno(target->load_error, "Failed to load default target: %m");
else if (target->load_state == UNIT_MASKED)
log_error("Default target masked.");
@@ -1708,7 +1708,7 @@ int main(int argc, char *argv[]) {
error_message = "Failed to load rescue target";
goto finish;
} else if (target->load_state == UNIT_ERROR || target->load_state == UNIT_NOT_FOUND) {
- log_emergency("Failed to load rescue target: %s", strerror(-target->load_error));
+ log_emergency_errno(target->load_error, "Failed to load rescue target: %m");
error_message = "Failed to load rescue target";
goto finish;
} else if (target->load_state == UNIT_MASKED) {