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/run/run.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/run') diff --git a/src/run/run.c b/src/run/run.c index ea9454a0e5..8c7bd5c92d 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -575,10 +575,9 @@ int main(int argc, char* argv[]) { r = find_binary(argv[optind], arg_transport == BUS_TRANSPORT_LOCAL, &command); if (r < 0) { - log_error("Failed to find executable %s%s: %s", - argv[optind], - arg_transport == BUS_TRANSPORT_LOCAL ? "" : " on local system", - strerror(-r)); + log_error_errno(r, "Failed to find executable %s%s: %m", + argv[optind], + arg_transport == BUS_TRANSPORT_LOCAL ? "" : " on local system"); goto finish; } argv[optind] = command; -- cgit v1.2.3-54-g00ecf