mirror of https://github.com/xemu-project/xemu.git
migration: Remove migration cancel() callback
It is used only in one place Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
48a2f4d6c5
commit
767de72258
|
@ -132,12 +132,12 @@ free_migrate_state:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void migrate_fd_cancel(MigrationState *s);
|
||||||
|
|
||||||
int do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data)
|
int do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data)
|
||||||
{
|
{
|
||||||
MigrationState *s = current_migration;
|
if (current_migration) {
|
||||||
|
migrate_fd_cancel(current_migration);
|
||||||
if (s && s->state == MIG_STATE_ACTIVE) {
|
|
||||||
s->cancel(s);
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -488,7 +488,6 @@ static MigrationState *migrate_new(Monitor *mon, int64_t bandwidth_limit,
|
||||||
{
|
{
|
||||||
MigrationState *s = g_malloc0(sizeof(*s));
|
MigrationState *s = g_malloc0(sizeof(*s));
|
||||||
|
|
||||||
s->cancel = migrate_fd_cancel;
|
|
||||||
s->blk = blk;
|
s->blk = blk;
|
||||||
s->shared = inc;
|
s->shared = inc;
|
||||||
s->mon = NULL;
|
s->mon = NULL;
|
||||||
|
|
|
@ -38,7 +38,6 @@ struct MigrationState
|
||||||
int (*get_error)(MigrationState *s);
|
int (*get_error)(MigrationState *s);
|
||||||
int (*close)(MigrationState *s);
|
int (*close)(MigrationState *s);
|
||||||
int (*write)(MigrationState *s, const void *buff, size_t size);
|
int (*write)(MigrationState *s, const void *buff, size_t size);
|
||||||
void (*cancel)(MigrationState *s);
|
|
||||||
void *opaque;
|
void *opaque;
|
||||||
int blk;
|
int blk;
|
||||||
int shared;
|
int shared;
|
||||||
|
|
Loading…
Reference in New Issue