summaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2012-06-19 18:43:09 +0300
committerJuan Quintela <quintela@redhat.com>2012-06-29 13:18:21 +0200
commit6607ae235bbc8c8c23159c21f545e7622489a236 (patch)
tree1139888b50b29d219e0c7418d62aaa3dfb60227d /savevm.c
parent0ff1f9f585712684dc46cb6cb6a46a8cc160b2ae (diff)
Add MigrationParams structure
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/savevm.c b/savevm.c
index faa81457d5..d1d90200e1 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1561,7 +1561,8 @@ bool qemu_savevm_state_blocked(Error **errp)
return false;
}
-int qemu_savevm_state_begin(QEMUFile *f, int blk_enable, int shared)
+int qemu_savevm_state_begin(QEMUFile *f,
+ const MigrationParams *params)
{
SaveStateEntry *se;
int ret;
@@ -1569,8 +1570,8 @@ int qemu_savevm_state_begin(QEMUFile *f, int blk_enable, int shared)
QTAILQ_FOREACH(se, &savevm_handlers, entry) {
if(se->set_params == NULL) {
continue;
- }
- se->set_params(blk_enable, shared, se->opaque);
+ }
+ se->set_params(params, se->opaque);
}
qemu_put_be32(f, QEMU_VM_FILE_MAGIC);
@@ -1708,13 +1709,17 @@ void qemu_savevm_state_cancel(QEMUFile *f)
static int qemu_savevm_state(QEMUFile *f)
{
int ret;
+ MigrationParams params = {
+ .blk = 0,
+ .shared = 0
+ };
if (qemu_savevm_state_blocked(NULL)) {
ret = -EINVAL;
goto out;
}
- ret = qemu_savevm_state_begin(f, 0, 0);
+ ret = qemu_savevm_state_begin(f, &params);
if (ret < 0)
goto out;