From 25ad22bc4e9c946df694fa7343027b1050b2946b Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 6 Sep 2011 18:59:00 +0200 Subject: 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 Signed-off-by: Kevin Wolf --- hw/scsi-disk.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/scsi-disk.c') 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) -- cgit 1.4.1