aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorVolker RĂ¼melin <vr_qemu@t-online.de>2021-05-25 20:14:41 +0200
committerGerd Hoffmann <kraxel@redhat.com>2021-05-26 11:33:19 +0200
commit9d74e6c3e763ef4095c8a5f853e175b4a9c710a2 (patch)
treefef3a0640c7e6fd8688484c28e25636148af1e05 /hw
parent314f9064b67f117f6a82b1a1f1c70cd75a88e943 (diff)
pckbd: clear outport_present in outer pre_load()
The variable outport_present is a flag to show if the outport subsection was loaded. Clear the outport_present flag in the outer pre_load() function. This method is recommended in the QEMU manual for developers in the chapter "Migration, Subsections". Signed-off-by: Volker RĂ¼melin <vr_qemu@t-online.de> Message-Id: <20210525181441.27768-12-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/input/pckbd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index de867abc06..baba62f357 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -457,7 +457,6 @@ static void kbd_reset(void *opaque)
s->mode = KBD_MODE_KBD_INT | KBD_MODE_MOUSE_INT;
s->status = KBD_STAT_CMD | KBD_STAT_UNLOCKED;
s->outport = KBD_OUT_RESET | KBD_OUT_A20 | KBD_OUT_ONES;
- s->outport_present = false;
s->pending = 0;
kbd_deassert_irq(s);
if (s->throttle_timer) {
@@ -564,6 +563,7 @@ static int kbd_pre_load(void *opaque)
{
KBDState *s = opaque;
+ s->outport_present = false;
s->extended_state_loaded = false;
return 0;
}
@@ -574,7 +574,6 @@ static int kbd_post_load(void *opaque, int version_id)
if (!s->outport_present) {
s->outport = kbd_outport_default(s);
}
- s->outport_present = false;
s->pending = s->pending_tmp;
if (!s->extended_state_loaded) {
s->obsrc = s->status & KBD_STAT_OBF ?