X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fdbus-automount.c;h=ada2d22ca3c3c700218ad25356aa976cd45f31dc;hp=9003b74b8acdee05b1cdd0492e1b93c034b7ce54;hb=9c2d9caab23286f3d8dceaaa43ab46e29e3579fb;hpb=e99e38bbdcca3fe5956823bdb3d38544ccf93221 diff --git a/src/dbus-automount.c b/src/dbus-automount.c index 9003b74b8..ada2d22ca 100644 --- a/src/dbus-automount.c +++ b/src/dbus-automount.c @@ -22,23 +22,30 @@ #include "dbus-unit.h" #include "dbus-automount.h" -static const char introspection[] = - DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE - "" - BUS_UNIT_INTERFACE - BUS_PROPERTIES_INTERFACE - " " - " " - " " - BUS_INTROSPECTABLE_INTERFACE - ""; - -DBusHandlerResult bus_automount_message_handler(Unit *u, DBusMessage *message) { +#define BUS_AUTOMOUNT_INTERFACE \ + " \n" \ + " \n" \ + " \n" \ + " \n" + +#define INTROSPECTION \ + DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \ + "\n" \ + BUS_UNIT_INTERFACE \ + BUS_AUTOMOUNT_INTERFACE \ + BUS_PROPERTIES_INTERFACE \ + BUS_INTROSPECTABLE_INTERFACE \ + "\n" + +const char bus_automount_interface[] = BUS_AUTOMOUNT_INTERFACE; + +DBusHandlerResult bus_automount_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) { const BusProperty properties[] = { BUS_UNIT_PROPERTIES, - { "org.freedesktop.systemd1.Automount", "Where", bus_property_append_string, "s", u->automount.where }, + { "org.freedesktop.systemd1.Automount", "Where", bus_property_append_string, "s", u->automount.where }, + { "org.freedesktop.systemd1.Automount", "DirectoryMode", bus_property_append_mode, "u", &u->automount.directory_mode }, { NULL, NULL, NULL, NULL, NULL } }; - return bus_default_message_handler(u->meta.manager, message, introspection, properties); + return bus_default_message_handler(u->meta.manager, c, message, INTROSPECTION, properties); }