aboutsummaryrefslogtreecommitdiff
path: root/migration-exec.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2010-05-11 22:27:45 +0200
committerJuan Quintela <quintela@redhat.com>2011-10-20 13:23:53 +0200
commit07af4452919fddc6dca6462828b457aad62f6387 (patch)
treeb1a6775ce2293625ccfd525349614fee564b8c47 /migration-exec.c
parent8b6b99b3561b8da3b15da1871e1bb3d4ac7770ca (diff)
migration: move migrate_new to do_migrate
Once there, remove all parameters that don't need to be passed to *start_outgoing_migration() functions Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'migration-exec.c')
-rw-r--r--migration-exec.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/migration-exec.c b/migration-exec.c
index d0119c67d8..b7b1055e88 100644
--- a/migration-exec.c
+++ b/migration-exec.c
@@ -61,22 +61,14 @@ static int exec_close(MigrationState *s)
return ret;
}
-MigrationState *exec_start_outgoing_migration(Monitor *mon,
- const char *command,
- int64_t bandwidth_limit,
- int detach,
- int blk,
- int inc)
+int exec_start_outgoing_migration(MigrationState *s, const char *command)
{
- MigrationState *s;
FILE *f;
- s = migrate_new(mon, bandwidth_limit, detach, blk, inc);
-
f = popen(command, "w");
if (f == NULL) {
DPRINTF("Unable to popen exec target\n");
- goto err_after_alloc;
+ goto err_after_popen;
}
s->fd = fileno(f);
@@ -94,13 +86,12 @@ MigrationState *exec_start_outgoing_migration(Monitor *mon,
s->write = file_write;
migrate_fd_connect(s);
- return s;
+ return 0;
err_after_open:
pclose(f);
-err_after_alloc:
- g_free(s);
- return NULL;
+err_after_popen:
+ return -1;
}
static void exec_accept_incoming_migration(void *opaque)