1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-22 22:03:43 +03:00

machinectl: fix message

bus_wait_for_jobs_new() can fail for various reasons.

(cherry picked from commit b2544bb6e851dabdde106539ba14b86cf4cfa5cb)
(cherry picked from commit 620cab2d4c8223200616abfbbfe8348325e6fe9a)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2023-06-19 13:35:22 +02:00 committed by Luca Boccassi
parent 36ce0edc50
commit 6272d0506e

View File

@ -1547,7 +1547,7 @@ static int start_machine(int argc, char *argv[], void *userdata) {
r = bus_wait_for_jobs_new(bus, &w);
if (r < 0)
return log_oom();
return log_error_errno(r, "Could not watch jobs: %m");
for (int i = 1; i < argc; i++) {
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;