diff options
author | Markus Armbruster <armbru@redhat.com> | 2011-09-06 18:59:00 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-09-12 15:17:22 +0200 |
commit | 25ad22bc4e9c946df694fa7343027b1050b2946b (patch) | |
tree | 40653ee590c807635b36dcfb895471ef188b1b8f /hw/scsi-disk.c | |
parent | 7d4b4ba5c2bae99d44f265884b567ae63947bb4a (diff) |
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/scsi-disk.c')
-rw-r--r-- | hw/scsi-disk.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) |