diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ide/core.c | 1 | ||||
-rw-r--r-- | hw/scsi-disk.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index 5def25c53d..9297b9e657 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -789,6 +789,7 @@ static void ide_cd_change_cb(void *opaque, bool load) IDEState *s = opaque; uint64_t nb_sectors; + s->tray_open = !load; bdrv_get_geometry(s->bs, &nb_sectors); s->nb_sectors = nb_sectors; diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index f5f1d82688..4a60820b18 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -1175,6 +1175,7 @@ static void scsi_destroy(SCSIDevice *dev) static void scsi_cd_change_media_cb(void *opaque, bool load) { + ((SCSIDiskState *)opaque)->tray_open = !load; } static bool scsi_cd_is_tray_open(void *opaque) |