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) if (r < 0)
return log_error_errno(r, "Failed to connect to system bus: %m"); return log_error_errno(r, "Failed to connect to system bus: %m");
r = sd_bus_call_method(system_bus, r = bus_call_method(system_bus,
"org.freedesktop.machine1", bus_machine_mgr,
"/org/freedesktop/machine1", "OpenMachinePTY",
"org.freedesktop.machine1.Manager", &error,
"OpenMachinePTY", &pty_reply,
&error, "s", arg_host);
&pty_reply,
"s", arg_host);
if (r < 0) if (r < 0)
return log_error_errno(r, "Failed to get machine PTY: %s", bus_error_message(&error, r)); return log_error_errno(r, "Failed to get machine PTY: %s", bus_error_message(&error, r));