mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
migration: Create include for migration snapshots
Start removing migration code from sysemu/sysemu.h. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
e1a3ecee3b
commit
5e22479ae2
7 changed files with 34 additions and 12 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "qapi/qmp/qstring.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "migration/snapshot.h"
|
||||
|
||||
static void replay_pre_save(void *opaque)
|
||||
{
|
||||
|
@ -66,13 +67,13 @@ void replay_vmstate_init(void)
|
|||
|
||||
if (replay_snapshot) {
|
||||
if (replay_mode == REPLAY_MODE_RECORD) {
|
||||
if (save_vmstate(replay_snapshot, &err) != 0) {
|
||||
if (save_snapshot(replay_snapshot, &err) != 0) {
|
||||
error_report_err(err);
|
||||
error_report("Could not create snapshot for icount record");
|
||||
exit(1);
|
||||
}
|
||||
} else if (replay_mode == REPLAY_MODE_PLAY) {
|
||||
if (load_vmstate(replay_snapshot, &err) != 0) {
|
||||
if (load_snapshot(replay_snapshot, &err) != 0) {
|
||||
error_report_err(err);
|
||||
error_report("Could not load snapshot for icount replay");
|
||||
exit(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue