summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-07-31 18:28:33 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-31 18:28:33 +0200
commitf786e80d7a76fd7446d142f610d62ea8c28ed902 (patch)
tree2dcb62a6bc3100c583a250b67a6f90374267c203
parenta43757462acaffa902417a9876486763d0b7ed58 (diff)
systemctl: fix parsing of LoadError property for systemctl show
-rw-r--r--src/systemctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index 4981433ebe..bb998d37e2 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -2469,11 +2469,13 @@ static int print_property(const char *name, DBusMessageIter *iter) {
} else if (dbus_message_iter_get_arg_type(&sub) == DBUS_TYPE_STRING && streq(name, "LoadError")) {
const char *a = NULL, *b = NULL;
- if (bus_iter_get_basic_and_next(&sub, DBUS_TYPE_STRING, &a, true) > 0)
+ if (bus_iter_get_basic_and_next(&sub, DBUS_TYPE_STRING, &a, true) >= 0)
bus_iter_get_basic_and_next(&sub, DBUS_TYPE_STRING, &b, false);
if (arg_all || !isempty(a) || !isempty(b))
printf("%s=%s \"%s\"\n", name, strempty(a), strempty(b));
+
+ return 0;
}
break;