From 31938a8560a664c32a9d72f1fc2d4347b232e6e9 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Fri, 28 Nov 2014 13:17:02 +0100 Subject: core: convert log_unit_*() to log_unit_*_errno() Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_unit_(debug|info|notice|warning|error|emergency)\(([^"]+), "(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_unit_\1_errno(\2, \5, "\3%m"\4);/' --- src/core/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/swap.c') diff --git a/src/core/swap.c b/src/core/swap.c index e41d77aa54..346a5fd712 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -410,7 +410,7 @@ static int swap_add_one( return 0; fail: - log_unit_warning(e, "Failed to load swap unit: %s", strerror(-r)); + log_unit_warning_errno(e, r, "Failed to load swap unit: %m"); if (delete && u) unit_free(u); -- cgit v1.2.3-54-g00ecf