mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
savevm: split save_live_setup from save_live_state
This patch splits stage 1 to its own function for both save_live users, ram and block. It is just a copy of the function, removing the parts of the other stages. Optimizations would came later. Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
6bd6878133
commit
d1315aac6e
4 changed files with 99 additions and 34 deletions
4
savevm.c
4
savevm.c
|
@ -1573,7 +1573,7 @@ int qemu_savevm_state_begin(QEMUFile *f,
|
|||
QTAILQ_FOREACH(se, &savevm_handlers, entry) {
|
||||
int len;
|
||||
|
||||
if (!se->ops || !se->ops->save_live_state) {
|
||||
if (!se->ops || !se->ops->save_live_setup) {
|
||||
continue;
|
||||
}
|
||||
if (se->ops && se->ops->is_active) {
|
||||
|
@ -1593,7 +1593,7 @@ int qemu_savevm_state_begin(QEMUFile *f,
|
|||
qemu_put_be32(f, se->instance_id);
|
||||
qemu_put_be32(f, se->version_id);
|
||||
|
||||
ret = se->ops->save_live_state(f, QEMU_VM_SECTION_START, se->opaque);
|
||||
ret = se->ops->save_live_setup(f, se->opaque);
|
||||
if (ret < 0) {
|
||||
qemu_savevm_state_cancel(f);
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue