From 795c5d31affeb3b3edbf673940cc0f16afebc7a8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 29 Apr 2016 20:32:56 +0200 Subject: machined: rework copy-from/copy-to operation to use generic Operation object With this all potentially slow operations are done out-of-process, asynchronously, using the same "Operation" object. --- src/machine/operation.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/machine/operation.h') diff --git a/src/machine/operation.h b/src/machine/operation.h index 9d4c3afe45..7ca47bc3af 100644 --- a/src/machine/operation.h +++ b/src/machine/operation.h @@ -34,12 +34,14 @@ typedef struct Operation Operation; struct Operation { Manager *manager; + Machine *machine; pid_t pid; sd_bus_message *message; int errno_fd; sd_event_source *event_source; LIST_FIELDS(Operation, operations); + LIST_FIELDS(Operation, operations_by_machine); }; -int operation_new(Manager *m, pid_t child, sd_bus_message *message, int errno_fd); +int operation_new(Manager *manager, Machine *machine, pid_t child, sd_bus_message *message, int errno_fd); Operation *operation_free(Operation *o); -- cgit v1.2.3-54-g00ecf