mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
migration: Pass Error ** argument to {save,load}_vmstate
This way we use the "normal" way of printing errors for hmp commands. Signed-off-by: Juan Quintela <quintela@redhat.com> Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
This commit is contained in:
parent
2bf3aa85f0
commit
927d663819
5 changed files with 43 additions and 33 deletions
|
@ -62,14 +62,18 @@ void replay_vmstate_register(void)
|
|||
|
||||
void replay_vmstate_init(void)
|
||||
{
|
||||
Error *err = NULL;
|
||||
|
||||
if (replay_snapshot) {
|
||||
if (replay_mode == REPLAY_MODE_RECORD) {
|
||||
if (save_vmstate(replay_snapshot) != 0) {
|
||||
if (save_vmstate(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) != 0) {
|
||||
if (load_vmstate(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