aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2012-06-28 15:31:37 +0200
committerJuan Quintela <quintela@redhat.com>2012-07-20 08:19:27 +0200
commit16310a3cca7320edb9341c976f7819de0a8c27e0 (patch)
tree6caba265f6f9cf0462522f0179adb40724ae7bf9 /savevm.c
parentd1315aac6e4df1f472a6f87ef6e310b8c109f498 (diff)
downloadqemu-16310a3cca7320edb9341c976f7819de0a8c27e0.zip
qemu-16310a3cca7320edb9341c976f7819de0a8c27e0.tar.gz
qemu-16310a3cca7320edb9341c976f7819de0a8c27e0.tar.bz2
savevm: split save_live into stage2 and stage3
We split it into 2 functions, foo_live_iterate, and foo_live_complete. At this point, we only remove the bits that are for the other stage, functionally this is equivalent to previous code. Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/savevm.c b/savevm.c
index 0b80a94..6e82b2d 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1236,7 +1236,7 @@ int register_savevm_live(DeviceState *dev,
se->vmsd = NULL;
se->no_migrate = 0;
/* if this is a live_savem then set is_ram */
- if (ops->save_live_state != NULL) {
+ if (ops->save_live_setup != NULL) {
se->is_ram = 1;
}
@@ -1620,7 +1620,7 @@ int qemu_savevm_state_iterate(QEMUFile *f)
int ret = 1;
QTAILQ_FOREACH(se, &savevm_handlers, entry) {
- if (!se->ops || !se->ops->save_live_state) {
+ if (!se->ops || !se->ops->save_live_iterate) {
continue;
}
if (se->ops && se->ops->is_active) {
@@ -1636,7 +1636,7 @@ int qemu_savevm_state_iterate(QEMUFile *f)
qemu_put_byte(f, QEMU_VM_SECTION_PART);
qemu_put_be32(f, se->section_id);
- ret = se->ops->save_live_state(f, QEMU_VM_SECTION_PART, se->opaque);
+ ret = se->ops->save_live_iterate(f, se->opaque);
trace_savevm_section_end(se->section_id);
if (ret <= 0) {
@@ -1665,7 +1665,7 @@ int qemu_savevm_state_complete(QEMUFile *f)
cpu_synchronize_all_states();
QTAILQ_FOREACH(se, &savevm_handlers, entry) {
- if (!se->ops || !se->ops->save_live_state) {
+ if (!se->ops || !se->ops->save_live_complete) {
continue;
}
if (se->ops && se->ops->is_active) {
@@ -1678,7 +1678,7 @@ int qemu_savevm_state_complete(QEMUFile *f)
qemu_put_byte(f, QEMU_VM_SECTION_END);
qemu_put_be32(f, se->section_id);
- ret = se->ops->save_live_state(f, QEMU_VM_SECTION_END, se->opaque);
+ ret = se->ops->save_live_complete(f, se->opaque);
trace_savevm_section_end(se->section_id);
if (ret < 0) {
return ret;