From 14456f760768fc5b03f3e90e7c816fda51bdcd25 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 2 May 2020 23:04:27 -0700 Subject: machine: switch to BusLocator-oriented helpers Mechanical substitution reducing some verbosity --- src/machine/machine-dbus.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'src/machine/machine-dbus.c') diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c index 1d17f220a5..903dd8f161 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -552,14 +552,7 @@ int bus_machine_method_open_login(sd_bus_message *message, void *userdata, sd_bu getty = strjoina("container-getty@", p, ".service"); - r = sd_bus_call_method( - container_bus, - "org.freedesktop.systemd1", - "/org/freedesktop/systemd1", - "org.freedesktop.systemd1.Manager", - "StartUnit", - error, NULL, - "ss", getty, "replace"); + r = bus_call_method(container_bus, bus_systemd_mgr, "StartUnit", error, NULL, "ss", getty, "replace"); if (r < 0) return r; @@ -668,13 +661,7 @@ int bus_machine_method_open_shell(sd_bus_message *message, void *userdata, sd_bu container_bus = allocated_bus ?: m->manager->bus; - r = sd_bus_message_new_method_call( - container_bus, - &tm, - "org.freedesktop.systemd1", - "/org/freedesktop/systemd1", - "org.freedesktop.systemd1.Manager", - "StartTransientUnit"); + r = bus_message_new_method_call(container_bus, &tm, bus_systemd_mgr, "StartTransientUnit"); if (r < 0) return r; -- cgit v1.2.1