]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-bus: teach bus_print_property() how to print SD_BUS_TYPE_INT64
authorDaniel Mack <daniel@zonque.org>
Fri, 20 Feb 2015 14:16:02 +0000 (15:16 +0100)
committerDaniel Mack <daniel@zonque.org>
Fri, 24 Apr 2015 15:51:08 +0000 (17:51 +0200)
src/libsystemd/sd-bus/bus-util.c

index 840878931f1929419a7f6e292293ae1a5da35593..a84d3381cbe91652516830ac06e9127fac223ad7 100644 (file)
@@ -722,6 +722,18 @@ int bus_print_property(const char *name, sd_bus_message *property, bool all) {
                 return 1;
         }
 
+        case SD_BUS_TYPE_INT64: {
+                int64_t i;
+
+                r = sd_bus_message_read_basic(property, type, &i);
+                if (r < 0)
+                        return r;
+
+                printf("%s=%lld\n", name, (long long) i);
+
+                return 1;
+        }
+
         case SD_BUS_TYPE_UINT32: {
                 uint32_t u;