diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-04-13 21:33:28 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-04-13 21:37:59 +0200 |
commit | c757a65b6afb462bde082b5362bbb5a074b5bb7b (patch) | |
tree | 418574d4844ca800499f23d01b285b2b72e18f81 /src/shared | |
parent | d4e7373bbbc878b0d8ed1c28e21262a6d908d616 (diff) |
watchdog: make watchdog dbus properties writable
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/dbus-common.c | 10 | ||||
-rw-r--r-- | src/shared/dbus-common.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/shared/dbus-common.c b/src/shared/dbus-common.c index badd037db1..6d000e1162 100644 --- a/src/shared/dbus-common.c +++ b/src/shared/dbus-common.c @@ -660,6 +660,16 @@ int bus_property_append_long(DBusMessageIter *i, const char *property, void *dat return 0; } +int bus_property_set_uint64(DBusMessageIter *i, const char *property, void *data) { + uint64_t *t = data; + + assert(i); + assert(property); + + dbus_message_iter_get_basic(i, t); + return 0; +} + const char *bus_errno_to_dbus(int error) { switch(error) { diff --git a/src/shared/dbus-common.h b/src/shared/dbus-common.h index ca398fc3f5..2bfcdfa5d4 100644 --- a/src/shared/dbus-common.h +++ b/src/shared/dbus-common.h @@ -144,6 +144,9 @@ int bus_property_append_long(DBusMessageIter *i, const char *property, void *dat #define bus_property_append_unsigned bus_property_append_uint32 #define bus_property_append_usec bus_property_append_uint64 +int bus_property_set_uint64(DBusMessageIter *i, const char *property, void *data); +#define bus_property_set_usec bus_property_set_uint64 + #define DEFINE_BUS_PROPERTY_APPEND_ENUM(function,name,type) \ int function(DBusMessageIter *i, const char *property, void *data) { \ const char *value; \ |