diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-04-29 20:32:56 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-05-02 11:17:06 +0200 |
commit | 795c5d31affeb3b3edbf673940cc0f16afebc7a8 (patch) | |
tree | ffd79868bad763f8bfa094f7a4b6c0e824333bb5 /src/machine/machine.c | |
parent | 5d2036b5f3506bd0ff07042aee8d69c26db32298 (diff) |
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.
Diffstat (limited to 'src/machine/machine.c')
-rw-r--r-- | src/machine/machine.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/machine/machine.c b/src/machine/machine.c index 7d4270a8ff..c1fae57084 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -89,7 +89,7 @@ void machine_free(Machine *m) { assert(m); while (m->operations) - machine_operation_unref(m->operations); + operation_free(m->operations); if (m->in_gc_queue) LIST_REMOVE(gc_queue, m->manager->machine_gc_queue, m); @@ -596,28 +596,6 @@ int machine_open_terminal(Machine *m, const char *path, int mode) { } } -MachineOperation *machine_operation_unref(MachineOperation *o) { - if (!o) - return NULL; - - sd_event_source_unref(o->event_source); - - safe_close(o->errno_fd); - - if (o->pid > 1) - (void) kill(o->pid, SIGKILL); - - sd_bus_message_unref(o->message); - - if (o->machine) { - LIST_REMOVE(operations, o->machine->operations, o); - o->machine->n_operations--; - } - - free(o); - return NULL; -} - void machine_release_unit(Machine *m) { assert(m); |