mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
replay: fix replay shutdown
This patch fixes shutdown of the replay process, which is terminated with the assert when shutdown event is read from the log. replay_finish_event reads new data_kind and therefore the value of data_kind should be preserved to be valid at qemu_system_shutdown_request call. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Message-Id: <156404427238.18669.12378772823692338069.stgit@pasha-Precision-3630-Tower> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
dcb1578069
commit
e957ad8aef
1 changed files with 4 additions and 4 deletions
|
@ -45,14 +45,14 @@ bool replay_next_event_is(int event)
|
||||||
}
|
}
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (event == replay_state.data_kind) {
|
unsigned int data_kind = replay_state.data_kind;
|
||||||
|
if (event == data_kind) {
|
||||||
res = true;
|
res = true;
|
||||||
}
|
}
|
||||||
switch (replay_state.data_kind) {
|
switch (data_kind) {
|
||||||
case EVENT_SHUTDOWN ... EVENT_SHUTDOWN_LAST:
|
case EVENT_SHUTDOWN ... EVENT_SHUTDOWN_LAST:
|
||||||
replay_finish_event();
|
replay_finish_event();
|
||||||
qemu_system_shutdown_request(replay_state.data_kind -
|
qemu_system_shutdown_request(data_kind - EVENT_SHUTDOWN);
|
||||||
EVENT_SHUTDOWN);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* clock, time_t, checkpoint and other events */
|
/* clock, time_t, checkpoint and other events */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue