diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-04-16 01:54:49 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-04-16 02:03:35 +0200 |
commit | bfebab7f69cb23f3a488f02bc2be9c8309808221 (patch) | |
tree | 15706e6e3730e3a5b167fa4642d255b9b3956797 /src/dbus-mount.c | |
parent | e1830b12ae8d97a1baaabe28d9ee28c77835463d (diff) |
dbus: split out object management code into dbus-common, and simplify it
Diffstat (limited to 'src/dbus-mount.c')
-rw-r--r-- | src/dbus-mount.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/dbus-mount.c b/src/dbus-mount.c index 5fb9a3f071..cfbfd4531c 100644 --- a/src/dbus-mount.c +++ b/src/dbus-mount.c @@ -24,6 +24,7 @@ #include "dbus-unit.h" #include "dbus-mount.h" #include "dbus-execute.h" +#include "dbus-common.h" #define BUS_MOUNT_INTERFACE \ " <interface name=\"org.freedesktop.systemd1.Mount\">\n" \ @@ -65,11 +66,10 @@ const char bus_mount_invalidating_properties[] = "ExecRemount\0" "ControlPID\0"; -static int bus_mount_append_what(Manager *n, DBusMessageIter *i, const char *property, void *data) { +static int bus_mount_append_what(DBusMessageIter *i, const char *property, void *data) { Mount *m = data; const char *d; - assert(n); assert(i); assert(property); assert(m); @@ -89,11 +89,10 @@ static int bus_mount_append_what(Manager *n, DBusMessageIter *i, const char *pro return 0; } -static int bus_mount_append_options(Manager *n, DBusMessageIter *i, const char *property, void *data) { +static int bus_mount_append_options(DBusMessageIter *i, const char *property, void *data) { Mount *m = data; const char *d; - assert(n); assert(i); assert(property); assert(m); @@ -113,11 +112,10 @@ static int bus_mount_append_options(Manager *n, DBusMessageIter *i, const char * return 0; } -static int bus_mount_append_type(Manager *n, DBusMessageIter *i, const char *property, void *data) { +static int bus_mount_append_type(DBusMessageIter *i, const char *property, void *data) { Mount *m = data; const char *d; - assert(n); assert(i); assert(property); assert(m); @@ -138,6 +136,7 @@ static int bus_mount_append_type(Manager *n, DBusMessageIter *i, const char *pro } DBusHandlerResult bus_mount_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) { + const BusProperty properties[] = { BUS_UNIT_PROPERTIES, { "org.freedesktop.systemd1.Mount", "Where", bus_property_append_string, "s", u->mount.where }, @@ -154,5 +153,5 @@ DBusHandlerResult bus_mount_message_handler(Unit *u, DBusConnection *c, DBusMess { NULL, NULL, NULL, NULL, NULL } }; - return bus_default_message_handler(u->meta.manager, c, message, INTROSPECTION, INTERFACES_LIST, properties); + return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, properties); } |