diff options
Diffstat (limited to 'src/dbus-snapshot.c')
-rw-r--r-- | src/dbus-snapshot.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/dbus-snapshot.c b/src/dbus-snapshot.c index 8aeca15254..15e51f032e 100644 --- a/src/dbus-snapshot.c +++ b/src/dbus-snapshot.c @@ -22,17 +22,22 @@ #include "dbus-unit.h" #include "dbus-snapshot.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.Snapshot\">" - " <method name=\"Remove\"/>" - " <property name=\"Cleanup\" type=\"b\" access=\"read\"/>" - " </interface>" - BUS_INTROSPECTABLE_INTERFACE - "</node>"; +#define BUS_SNAPSHOT_INTERFACE \ + " <interface name=\"org.freedesktop.systemd1.Snapshot\">\n" \ + " <method name=\"Remove\"/>\n" \ + " <property name=\"Cleanup\" type=\"b\" access=\"read\"/>\n" \ + " </interface>\n" + +#define INTROSPECTION \ + DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \ + "<node>\n" \ + BUS_UNIT_INTERFACE \ + BUS_SNAPSHOT_INTERFACE \ + BUS_PROPERTIES_INTERFACE \ + BUS_INTROSPECTABLE_INTERFACE \ + "</node>\n" + +const char bus_snapshot_interface[] = BUS_SNAPSHOT_INTERFACE; DBusHandlerResult bus_snapshot_message_handler(Unit *u, DBusMessage *message) { const BusProperty properties[] = { @@ -54,7 +59,7 @@ DBusHandlerResult bus_snapshot_message_handler(Unit *u, DBusMessage *message) { goto oom; } else - return bus_default_message_handler(u->meta.manager, message, introspection, properties); + return bus_default_message_handler(u->meta.manager, message, INTROSPECTION, properties); if (reply) { if (!dbus_connection_send(u->meta.manager->api_bus, reply, NULL)) |