chiark / gitweb /
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)
committerSven Eden <yamakuzure@gmx.net>
Mon, 13 Mar 2017 17:23:26 +0000 (18:23 +0100)
src/libelogind/sd-bus/bus-util.c

index dcad701980ceededcd7a004931cfc03bd20eb54f..164fbf8f8d7b512ee0c9b266060fc2ce5b6719f8 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;