summaryrefslogtreecommitdiffstats
path: root/hw/ide/core.c
diff options
context:
space:
mode:
authorMarkus Armbruster2011-09-06 18:59:00 +0200
committerKevin Wolf2011-09-12 15:17:22 +0200
commit25ad22bc4e9c946df694fa7343027b1050b2946b (patch)
tree40653ee590c807635b36dcfb895471ef188b1b8f /hw/ide/core.c
parentblock: New change_media_cb() parameter load (diff)
downloadqemu-25ad22bc4e9c946df694fa7343027b1050b2946b.tar.gz
qemu-25ad22bc4e9c946df694fa7343027b1050b2946b.tar.xz
qemu-25ad22bc4e9c946df694fa7343027b1050b2946b.zip
ide/atapi scsi-disk: Make monitor eject -f, then change work
change fails while the tray is locked by the guest. eject -f forces it open and removes any media. Unfortunately, the tray closes again instantly. Since the lock remains as it is, there is no way to insert another medium unless the guest voluntarily unlocks. Fix by leaving the tray open after monitor eject. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/core.c')
-rw-r--r--hw/ide/core.c1
1 files changed, 1 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;