提交 b2056c16 编写于 作者: B blueswir1

misc scsi disk/cdrom fixes/improvements 2/4

Implement cdrom load/eject functionality (Start Stop Unit command)
Signed-off-by: NJuergen Lock <nox@jelal.kn-bremen.de>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6952 c046a42c-6fe2-441c-8c8c-71466251a162
上级 ee16b24a
......@@ -725,6 +725,10 @@ static int32_t scsi_send_command(SCSIDevice *d, uint32_t tag,
break;
case 0x1b:
DPRINTF("Start Stop Unit\n");
if (bdrv_get_type_hint(s->bdrv) == BDRV_TYPE_CDROM &&
(buf[4] & 2))
/* load/eject medium */
bdrv_eject(s->bdrv, !(buf[4] & 1));
break;
case 0x1e:
DPRINTF("Prevent Allow Medium Removal (prevent = %d)\n", buf[4] & 3);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册