summaryrefslogtreecommitdiff
path: root/src/dbus-path.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus-path.c')
-rw-r--r--src/dbus-path.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/dbus-path.c b/src/dbus-path.c
index f67b5a2b7c..53a5b420d5 100644
--- a/src/dbus-path.c
+++ b/src/dbus-path.c
@@ -80,24 +80,26 @@ static int bus_path_append_paths(DBusMessageIter *i, const char *property, void
static int bus_path_append_unit(DBusMessageIter *i, const char *property, void *data) {
Unit *u = data;
+ Path *p = PATH(u);
const char *t;
assert(i);
assert(property);
assert(u);
- t = UNIT_DEREF(u->path.unit) ? UNIT_DEREF(u->path.unit)->meta.id : "";
+ t = UNIT_DEREF(p->unit) ? UNIT_DEREF(p->unit)->id : "";
return dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t) ? 0 : -ENOMEM;
}
DBusHandlerResult bus_path_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) {
+ Path *p = PATH(u);
const BusProperty properties[] = {
BUS_UNIT_PROPERTIES,
- { "org.freedesktop.systemd1.Path", "Unit", bus_path_append_unit, "s", u },
- { "org.freedesktop.systemd1.Path", "Paths", bus_path_append_paths, "a(ss)", u },
- { "org.freedesktop.systemd1.Path", "MakeDirectory", bus_property_append_bool, "b", &u->path.make_directory },
- { "org.freedesktop.systemd1.Path", "DirectoryMode", bus_property_append_mode, "u", &u->path.directory_mode },
+ { "org.freedesktop.systemd1.Path", "Unit", bus_path_append_unit, "s", u },
+ { "org.freedesktop.systemd1.Path", "Paths", bus_path_append_paths, "a(ss)", u },
+ { "org.freedesktop.systemd1.Path", "MakeDirectory", bus_property_append_bool, "b", &p->make_directory },
+ { "org.freedesktop.systemd1.Path", "DirectoryMode", bus_property_append_mode, "u", &p->directory_mode },
{ NULL, NULL, NULL, NULL, NULL }
};