提交 bde25388 编写于 作者: L Luiz Capitulino

ide: drop ide_tray_state_post_load()

This is used to sync the physical tray state after migration when
using CD-ROM passthrough. However, migrating when using passthrough
is broken anyway and shouldn't be supported...

So, drop this function as it causes a problem with the DEVICE_TRAY_MOVED
event, which is going to be introduced by the next commit.
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
Acked-by: NKevin Wolf <kwolf@redhat.com>
上级 d88b1819
......@@ -2077,15 +2077,6 @@ static bool ide_drive_pio_state_needed(void *opaque)
|| (s->bus->error_status & BM_STATUS_PIO_RETRY);
}
static int ide_tray_state_post_load(void *opaque, int version_id)
{
IDEState *s = opaque;
bdrv_eject(s->bs, s->tray_open);
bdrv_lock_medium(s->bs, s->tray_locked);
return 0;
}
static bool ide_tray_state_needed(void *opaque)
{
IDEState *s = opaque;
......@@ -2125,7 +2116,6 @@ static const VMStateDescription vmstate_ide_tray_state = {
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
.post_load = ide_tray_state_post_load,
.fields = (VMStateField[]) {
VMSTATE_BOOL(tray_open, IDEState),
VMSTATE_BOOL(tray_locked, IDEState),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册