chiark / gitweb /
systemctl: fix printing of individual properties
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 9 Nov 2013 23:32:31 +0000 (18:32 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 10 Nov 2013 00:02:53 +0000 (19:02 -0500)
src/systemctl/systemctl.c

index c042da5..24295e4 100644 (file)
@@ -2917,8 +2917,11 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte
         /* This is a low-level property printer, see
          * print_status_info() for the nicer output */
 
-        if (arg_properties && !strv_find(arg_properties, name))
-                return 0;
+        if (arg_properties && !strv_find(arg_properties, name)) {
+                /* skip what we didn't read */
+                r = sd_bus_message_skip(m, contents);
+                return r;
+        }
 
         switch (contents[0]) {