diff options
author | OMOJOLA JOSHUA <109356020+1awesomeJ@users.noreply.github.com> | 2023-03-15 01:12:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-15 00:12:57 +0000 |
commit | 59228d0dbf91b72be954ac8f93185f32ba4e4f51 (patch) | |
tree | ea67355f282c52b02451e34f01892311f5edb14c /src/initctl | |
parent | c1c4ecd356228319a4ac9d5573ebc1d03561d5a0 (diff) | |
download | systemd-59228d0dbf91b72be954ac8f93185f32ba4e4f51.tar.gz |
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()
Diffstat (limited to 'src/initctl')
-rw-r--r-- | src/initctl/initctl.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/initctl/initctl.c b/src/initctl/initctl.c index 0882570a66..99f28721de 100644 --- a/src/initctl/initctl.c +++ b/src/initctl/initctl.c @@ -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)); |