summaryrefslogtreecommitdiff
path: root/src/run
diff options
context:
space:
mode:
authorArthur Shau <sandstorm4999@gmail.com>2023-05-03 18:41:10 -0700
committerGitHub <noreply@github.com>2023-05-04 09:41:10 +0800
commit9107ef5637fe92d408ef231c748fe04ab04cca18 (patch)
tree814cdd4e5dccfe18a3a8d1ece831f4a752993a5d /src/run
parent397067b818acd5ae4d92ff454328d53f45c02417 (diff)
downloadsystemd-9107ef5637fe92d408ef231c748fe04ab04cca18.tar.gz
run: change sd_bus_call_method to bus_call_method (#27518)
Migrates the sd_bus_call_method code in run.c to use bus-locator.h api
Diffstat (limited to 'src/run')
-rw-r--r--src/run/run.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/run/run.c b/src/run/run.c
index 41570bf12e..5124436a05 100644
--- a/src/run/run.c
+++ b/src/run/run.c
@@ -1240,14 +1240,12 @@ static int start_transient_service(sd_bus *bus) {
if (r < 0)
return log_error_errno(r, "Failed to connect to system bus: %m");
- r = sd_bus_call_method(system_bus,
- "org.freedesktop.machine1",
- "/org/freedesktop/machine1",
- "org.freedesktop.machine1.Manager",
- "OpenMachinePTY",
- &error,
- &pty_reply,
- "s", arg_host);
+ r = bus_call_method(system_bus,
+ bus_machine_mgr,
+ "OpenMachinePTY",
+ &error,
+ &pty_reply,
+ "s", arg_host);
if (r < 0)
return log_error_errno(r, "Failed to get machine PTY: %s", bus_error_message(&error, r));