summaryrefslogtreecommitdiff
path: root/src/dbus-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus-device.c')
-rw-r--r--src/dbus-device.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/dbus-device.c b/src/dbus-device.c
index 83764783ad..0610ab873f 100644
--- a/src/dbus-device.c
+++ b/src/dbus-device.c
@@ -22,16 +22,21 @@
#include "dbus-unit.h"
#include "dbus-device.h"
-static const char introspection[] =
- DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE
- "<node>"
- BUS_UNIT_INTERFACE
- BUS_PROPERTIES_INTERFACE
- " <interface name=\"org.freedesktop.systemd1.Device\">"
- " <property name=\"SysFSPath\" type=\"s\" access=\"read\"/>"
- " </interface>"
- BUS_INTROSPECTABLE_INTERFACE
- "</node>";
+#define BUS_DEVICE_INTERFACE \
+ " <interface name=\"org.freedesktop.systemd1.Device\">\n" \
+ " <property name=\"SysFSPath\" type=\"s\" access=\"read\"/>\n" \
+ " </interface>\n"
+
+#define INTROSPECTION \
+ DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
+ "<node>\n" \
+ BUS_UNIT_INTERFACE \
+ BUS_DEVICE_INTERFACE \
+ BUS_PROPERTIES_INTERFACE \
+ BUS_INTROSPECTABLE_INTERFACE \
+ "</node>\n"
+
+const char bus_device_interface[] = BUS_DEVICE_INTERFACE;
DBusHandlerResult bus_device_message_handler(Unit *u, DBusMessage *message) {
const BusProperty properties[] = {
@@ -40,5 +45,5 @@ DBusHandlerResult bus_device_message_handler(Unit *u, DBusMessage *message) {
{ NULL, NULL, NULL, NULL, NULL }
};
- return bus_default_message_handler(u->meta.manager, message, introspection, properties);
+ return bus_default_message_handler(u->meta.manager, message, INTROSPECTION, properties);
}