mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
migration: control whether snapshots are ovewritten
The traditional HMP "savevm" command will overwrite an existing snapshot if it already exists with the requested name. This new flag allows this to be controlled allowing for safer behaviour with a future QMP command. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20210204124834.774401-8-berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
committed by
Dr. David Alan Gilbert
parent
3d3e9b1f66
commit
f781f84189
@ -327,7 +327,7 @@ void replay_gdb_attached(void)
|
||||
*/
|
||||
if (replay_mode == REPLAY_MODE_PLAY
|
||||
&& !replay_snapshot) {
|
||||
if (!save_snapshot("start_debugging", NULL)) {
|
||||
if (!save_snapshot("start_debugging", true, NULL)) {
|
||||
/* Can't create the snapshot. Continue conventional debugging. */
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ void replay_vmstate_init(void)
|
||||
|
||||
if (replay_snapshot) {
|
||||
if (replay_mode == REPLAY_MODE_RECORD) {
|
||||
if (!save_snapshot(replay_snapshot, &err)) {
|
||||
if (!save_snapshot(replay_snapshot, true, &err)) {
|
||||
error_report_err(err);
|
||||
error_report("Could not create snapshot for icount record");
|
||||
exit(1);
|
||||
|
Reference in New Issue
Block a user