1
0
mirror of https://github.com/systemd/systemd synced 2024-07-09 04:26:06 +00:00

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
This commit is contained in:
Arthur Shau 2023-05-03 18:41:10 -07:00 committed by GitHub
parent 397067b818
commit 9107ef5637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));