machine: rework Operation logic to reuse in varlink interface

This commit is contained in:
Ivan Kruglov
2024-10-21 17:08:14 +02:00
committed by Lennart Poettering
parent 9312b3dc28
commit d8964f9d4d
5 changed files with 68 additions and 43 deletions
+2 -2
View File
@@ -79,7 +79,7 @@ int bus_image_method_remove(
errno_pipe_fd[1] = safe_close(errno_pipe_fd[1]);
r = operation_new(m, NULL, child, message, errno_pipe_fd[0], NULL);
r = operation_new_with_bus_reply(m, /* machine= */ NULL, child, message, errno_pipe_fd[0], /* ret= */ NULL);
if (r < 0) {
(void) sigkill_wait(child);
return r;
@@ -196,7 +196,7 @@ int bus_image_method_clone(
errno_pipe_fd[1] = safe_close(errno_pipe_fd[1]);
r = operation_new(m, NULL, child, message, errno_pipe_fd[0], NULL);
r = operation_new_with_bus_reply(m, /* machine= */ NULL, child, message, errno_pipe_fd[0], /* ret= */ NULL);
if (r < 0) {
(void) sigkill_wait(child);
return r;