[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/22] migration: Remove migration cancel() callback
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 15/22] migration: Remove migration cancel() callback |
Date: |
Wed, 23 Feb 2011 01:44:29 +0100 |
It is used only in one place
Signed-off-by: Juan Quintela <address@hidden>
---
migration.c | 9 ++++-----
migration.h | 1 -
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/migration.c b/migration.c
index 2b873fa..92bff01 100644
--- a/migration.c
+++ b/migration.c
@@ -131,12 +131,12 @@ free_migrate_state:
return -1;
}
+static void migrate_fd_cancel(MigrationState *s);
+
int do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
- MigrationState *s = current_migration;
-
- if (s && s->state == MIG_STATE_ACTIVE)
- s->cancel(s);
+ if (current_migration)
+ migrate_fd_cancel(current_migration);
return 0;
}
@@ -471,7 +471,6 @@ static MigrationState *migrate_create_state(Monitor *mon,
int64_t bandwidth_limi
{
MigrationState *s = qemu_mallocz(sizeof(*s));
- s->cancel = migrate_fd_cancel;
s->blk = blk;
s->shared = inc;
s->mon = NULL;
diff --git a/migration.h b/migration.h
index 58a6e06..6477b51 100644
--- a/migration.h
+++ b/migration.h
@@ -36,7 +36,6 @@ struct MigrationState
int (*get_error)(MigrationState*);
int (*close)(MigrationState*);
int (*write)(MigrationState*, const void *, size_t);
- void (*cancel)(MigrationState *s);
void *opaque;
int blk;
int shared;
--
1.7.4
- Re: [Qemu-devel] [PATCH 09/22] migration: Introduce MIG_STATE_NONE, (continued)
- [Qemu-devel] [PATCH 11/22] migration: Introduce migrate_fd_completed() for consistenncy, Juan Quintela, 2011/02/22
- [Qemu-devel] [PATCH 12/22] migration: Use migrate_fd_error() in last place that set status to ERROR, Juan Quintela, 2011/02/22
- [Qemu-devel] [PATCH 13/22] migration: Our release callback was just free, Juan Quintela, 2011/02/22
- [Qemu-devel] [PATCH 15/22] migration: Remove migration cancel() callback,
Juan Quintela <=
- [Qemu-devel] [PATCH 14/22] migration: Remove get_status() accessor, Juan Quintela, 2011/02/22
- [Qemu-devel] [PATCH 16/22] migration: Move exported functions to the end of the file, Juan Quintela, 2011/02/22
- [Qemu-devel] [PATCH 17/22] migration: use global variable directly, Juan Quintela, 2011/02/22
- [Qemu-devel] [PATCH 18/22] migration: another case of global variable assigned to local one, Juan Quintela, 2011/02/22
- [Qemu-devel] [PATCH 19/22] migration: convert current_migration from pointer to struct, Juan Quintela, 2011/02/22