chiark / gitweb /
unit: use the UNIT() macro consistently
[elogind.git] / src / dbus-automount.c
index eccad37e8b062f2876386f96066d5b05ac73e52e..62e8a5fca703b7e9a486788d31de5b517bded85b 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "dbus-unit.h"
 #include "dbus-automount.h"
+#include "dbus-common.h"
 
 #define BUS_AUTOMOUNT_INTERFACE                                      \
         " <interface name=\"org.freedesktop.systemd1.Automount\">\n" \
 const char bus_automount_interface[] _introspect_("Automount") = BUS_AUTOMOUNT_INTERFACE;
 
 DBusHandlerResult bus_automount_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) {
+        Automount *am = AUTOMOUNT(u);
         const BusProperty properties[] = {
                 BUS_UNIT_PROPERTIES,
-                { "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 },
+                { "org.freedesktop.systemd1.Automount", "Where", bus_property_append_string,       "s", am->where           },
+                { "org.freedesktop.systemd1.Automount", "DirectoryMode", bus_property_append_mode, "u", &am->directory_mode },
                 { 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);
 }