summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-07 22:08:41 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-07 22:08:41 +0100
commit40be0704eb4784ee01f60442396a70f797281744 (patch)
tree9f12c807421dfba3c10374178c1a89dd08f4eb33
parent988b9df29fa01a305eeb073153e7d5113a5ae537 (diff)
inhibit: more conversions to use bus_log_parse_error()
-rw-r--r--src/login/inhibit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/login/inhibit.c b/src/login/inhibit.c
index e20af74ef0..10de54b221 100644
--- a/src/login/inhibit.c
+++ b/src/login/inhibit.c
@@ -92,7 +92,7 @@ static int print_inhibitors(sd_bus *bus, sd_bus_error *error) {
r = sd_bus_message_enter_container(reply, SD_BUS_TYPE_ARRAY, "(ssssuu)");
if (r < 0)
- return -EIO;
+ return bus_log_parse_error(r);
while ((r = sd_bus_message_read(reply, "(ssssuu)", &what, &who, &why, &mode, &uid, &pid)) > 0) {
_cleanup_free_ char *comm = NULL, *u = NULL;
@@ -112,11 +112,11 @@ static int print_inhibitors(sd_bus *bus, sd_bus_error *error) {
n++;
}
if (r < 0)
- return -EIO;
+ return bus_log_parse_error(r);
r = sd_bus_message_exit_container(reply);
if (r < 0)
- return -EIO;
+ return bus_log_parse_error(r);
printf("%u inhibitors listed.\n", n);
return 0;