diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-08-07 03:14:30 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-08-07 03:14:33 +0200 |
commit | 4ae25393f37b96b2b753562a349d68947ab1ad3d (patch) | |
tree | 3ca5d2f931b2ab4760f70a218b5eb704f8a1445a /src/core/transaction.c | |
parent | resolve: use _cleanup_ attribute (diff) | |
download | systemd-4ae25393f37b96b2b753562a349d68947ab1ad3d.tar.xz systemd-4ae25393f37b96b2b753562a349d68947ab1ad3d.zip |
tree-wide: shorten error logging a bit
Continuation of 4027f96aa08c73f109aa46b89842ca0e25c9c0e9.
Diffstat (limited to 'src/core/transaction.c')
-rw-r--r-- | src/core/transaction.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/core/transaction.c b/src/core/transaction.c index 1c7efb207a..045930838b 100644 --- a/src/core/transaction.c +++ b/src/core/transaction.c @@ -695,10 +695,8 @@ int transaction_activate(Transaction *tr, Manager *m, JobMode mode, sd_bus_error if (r >= 0) break; - if (r != -EAGAIN) { - log_warning("Requested transaction contains an unfixable cyclic ordering dependency: %s", bus_error_message(e, r)); - return r; - } + if (r != -EAGAIN) + return log_warning_errno(r, "Requested transaction contains an unfixable cyclic ordering dependency: %s", bus_error_message(e, r)); /* Let's see if the resulting transaction ordering * graph is still cyclic... */ @@ -712,10 +710,8 @@ int transaction_activate(Transaction *tr, Manager *m, JobMode mode, sd_bus_error if (r >= 0) break; - if (r != -EAGAIN) { - log_warning("Requested transaction contains unmergeable jobs: %s", bus_error_message(e, r)); - return r; - } + if (r != -EAGAIN) + return log_warning_errno(r, "Requested transaction contains unmergeable jobs: %s", bus_error_message(e, r)); /* Seventh step: an entry got dropped, let's garbage * collect its dependencies. */ @@ -731,10 +727,8 @@ int transaction_activate(Transaction *tr, Manager *m, JobMode mode, sd_bus_error /* Ninth step: check whether we can actually apply this */ r = transaction_is_destructive(tr, mode, e); - if (r < 0) { - log_notice("Requested transaction contradicts existing jobs: %s", bus_error_message(e, r)); - return r; - } + if (r < 0) + return log_notice_errno(r, "Requested transaction contradicts existing jobs: %s", bus_error_message(e, r)); /* Tenth step: apply changes */ r = transaction_apply(tr, m, mode); |