scsi-disk: restruct emulation: core + TEST_UNIT_READY.
commitaa5dbdc190644cf36e4e7fbd68b4e40e13209039
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 26 Nov 2009 14:34:02 +0000 (26 15:34 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 3 Dec 2009 15:41:38 +0000 (3 09:41 -0600)
tree1246232387f24d7792cd2a643f86521cec892f91
parentec766865633be4a36803fa33ee518c4166cfc459
scsi-disk: restruct emulation: core + TEST_UNIT_READY.

Add new scsi_disk_emulate_command() function, which will -- when
finished -- handle all scsi disk command emulation except actual I/O
(READ+WRITE commands) which goes to the block layer.  The function
builds on top of the new SCSIRequest struct.

SCSI command emulation code is moved over from scsi_send_command() in
steps to ease review and make it easier to pin down regressions (if any)
using bisect.  This patch moves over TEST_UNIT_READY only.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/scsi-disk.c