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 3a6d79f3d9..405ea46cda 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -1473,6 +1473,22 @@ int bus_property_append_size(Manager *m, DBusMessageIter *i, const char *propert return 0; } +int bus_property_append_ul(Manager *m, DBusMessageIter *i, const char *property, void *data) { + uint64_t u; + + assert(m); + assert(i); + assert(property); + assert(data); + + u = (uint64_t) *(unsigned long*) 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; |