src: changed instances of sd_bus_call_method() to bus_call_method() (#26819)

* src: changed instances of sd_bus_call_method() to bus_call_method()
This commit is contained in:
OMOJOLA JOSHUA
2023-03-15 00:12:57 +00:00
committed by GitHub
parent c1c4ecd356
commit 59228d0dbf
5 changed files with 9 additions and 42 deletions
+2 -9
View File
@@ -13,6 +13,7 @@
#include "alloc-util.h"
#include "bus-error.h"
#include "bus-locator.h"
#include "bus-util.h"
#include "constants.h"
#include "daemon-util.h"
@@ -106,15 +107,7 @@ static int change_runlevel(Server *s, int runlevel) {
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));