]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
scsi-disk: Inquiry with allocation length of CDB < 36 (v4)
authorArtyom Tarasenko <atar4qemu@googlemail.com>
Sun, 13 Dec 2009 10:32:36 +0000 (11:32 +0100)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 20 Dec 2009 09:35:28 +0000 (11:35 +0200)
commitb60c2c74f39e7aa6b84beb945fee544871d1661f
tree95440ddd83722c62328f5cd70654642d02957373
parentfe1b69708c72b163d3acdf2bb012e169d2d3dda0
scsi-disk: Inquiry with allocation length of CDB < 36 (v4)

According to the SCSI-2 specification,
http://ldkelley.com/SCSI2/SCSI2/SCSI2/SCSI2-08.html#8.2.5 ,
"if the allocation length of the command descriptor block (CDB) is too
small to transfer all of the parameters, the additional length shall
not be adjusted to reflect the truncation."
The 36 mandatory bytes of response are written to outbuf, and then
only the length requested in CDB is transferred.

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/scsi-disk.c