From c33b329709ebe2755181980a050d02ec7c81ed87 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Fri, 28 Nov 2014 17:09:20 +0100 Subject: 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. --- src/core/path.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/path.c') diff --git a/src/core/path.c b/src/core/path.c index ca586d9616..202cba5d31 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -562,8 +562,7 @@ static void path_enter_waiting(Path *p, bool initial, bool recheck) { return; fail: - log_warning("%s failed to enter waiting state: %s", - UNIT(p)->id, strerror(-r)); + log_warning_errno(r, "%s failed to enter waiting state: %m", UNIT(p)->id); path_enter_dead(p, PATH_FAILURE_RESOURCES); } -- cgit v1.2.3-54-g00ecf