#include "alloc-util.h"
#include "bus-common-errors.h"
#include "bus-error.h"
+#include "bus-locator.h"
#include "bus-util.h"
#include "device-util.h"
#include "fd-util.h"
log_info("Requesting %s/start/%s", target, mode);
/* Start this unit only if we can replace basic.target with it */
- r = sd_bus_call_method(bus,
- "org.freedesktop.systemd1",
- "/org/freedesktop/systemd1",
- "org.freedesktop.systemd1.Manager",
- "StartUnitReplace",
- &error,
- NULL,
- "sss", "basic.target", target, mode);
+ r = bus_call_method(bus, bus_systemd_mgr, "StartUnitReplace", &error, NULL, "sss", "basic.target", target, mode);
/* Don't print a warning if we aren't called during startup */
if (r < 0 && !sd_bus_error_has_name(&error, BUS_ERROR_NO_SUCH_JOB))
FOREACH_STRING(unit, SPECIAL_INITRD_FS_TARGET, SPECIAL_SWAP_TARGET) {
log_info("Requesting %s/start/replace...", unit);
- k = sd_bus_call_method(bus,
- "org.freedesktop.systemd1",
- "/org/freedesktop/systemd1",
- "org.freedesktop.systemd1.Manager",
- "StartUnit",
- &error,
- NULL,
- "ss", unit, "replace");
+ k = bus_call_method(bus, bus_systemd_mgr, "StartUnit", &error, NULL, "ss", unit, "replace");
if (k < 0) {
log_error_errno(k, "Failed to (re)start %s: %s", unit, bus_error_message(&error, r));
if (r == 0)
#include "alloc-util.h"
#include "bus-error.h"
+#include "bus-locator.h"
#include "bus-util.h"
#include "constants.h"
#include "daemon-util.h"
log_debug("Requesting %s/start/%s", target, mode);
- r = sd_bus_call_method(
- s->bus,
- "org.freedesktop.systemd1",
- "/org/freedesktop/systemd1",
- "org.freedesktop.systemd1.Manager",
- "StartUnit",
- &error,
- NULL,
- "ss", target, mode);
+ r = bus_call_method(s->bus, bus_systemd_mgr, "StartUnit", &error, NULL, "ss", target, mode);
if (r < 0)
return log_error_errno(r, "Failed to change runlevel: %s", bus_error_message(&error, r));
#include "alloc-util.h"
#include "bus-error.h"
+#include "bus-locator.h"
#include "bus-log-control-api.h"
#include "bus-message.h"
#include "bus-polkit.h"
assert(bus);
- r = sd_bus_call_method(bus,
- "org.freedesktop.systemd1",
- "/org/freedesktop/systemd1",
- "org.freedesktop.systemd1.Manager",
- "RestartUnit",
- &error,
- NULL,
- "ss", "systemd-vconsole-setup.service", "replace");
+ r = bus_call_method(bus, bus_systemd_mgr, "RestartUnit", &error, NULL, "ss", "systemd-vconsole-setup.service", "replace");
if (r < 0)
return log_error_errno(r, "Failed to issue method call: %s", bus_error_message(&error, r));
#include "alloc-util.h"
#include "bus-error.h"
+#include "bus-locator.h"
#include "bus-util.h"
#include "cgroup-util.h"
#include "conf-parser.h"
}
xsprintf(name, "autovt@tty%u.service", vtnr);
- r = sd_bus_call_method(
- m->bus,
- "org.freedesktop.systemd1",
- "/org/freedesktop/systemd1",
- "org.freedesktop.systemd1.Manager",
- "StartUnit",
- &error,
- NULL,
- "ss", name, "fail");
+ r = bus_call_method(m->bus, bus_systemd_mgr, "StartUnit", &error, NULL, "ss", name, "fail");
if (r < 0)
return log_error_errno(r, "Failed to start %s: %s", name, bus_error_message(&error, r));