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