scsi: Fix data length == SCSI_SENSE_BUF_SIZE

Fix the edge case where the sense data length is exactly the same
as SCSI_SENSE_BUF_SIZE.
This makes SCSI requests work that use all of the available 95 byte
sense data.

Signed-off-by: Christian Hoff <christian.hoff@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Christian Hoff 2012-06-14 15:55:25 +02:00 committed by Paolo Bonzini
parent 619d7ae952
commit 335f560f9c

View file

@ -1389,7 +1389,7 @@ void scsi_req_complete(SCSIRequest *req, int status)
assert(req->status == -1);
req->status = status;
assert(req->sense_len < sizeof(req->sense));
assert(req->sense_len <= sizeof(req->sense));
if (status == GOOD) {
req->sense_len = 0;
}