diff options
Diffstat (limited to 'src/dbus.c')
-rw-r--r-- | src/dbus.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/dbus.c b/src/dbus.c index 74b1c37dda..2c2a9cd6c2 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -1460,6 +1460,22 @@ int bus_property_append_int32(Manager *m, DBusMessageIter *i, const char *proper return 0; } +int bus_property_append_size(Manager *m, DBusMessageIter *i, const char *property, void *data) { + uint64_t u; + + assert(m); + assert(i); + assert(property); + assert(data); + + u = (uint64_t) *(size_t*) data; + + if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT64, &u)) + return -ENOMEM; + + return 0; +} + int bus_parse_strv(DBusMessage *m, char ***_l) { DBusMessageIter iter, sub; unsigned n = 0, i = 0; |