diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-05-03 14:34:45 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-05-07 08:44:21 +0200 |
commit | 3c3d8a95cafb6b38515497688db5a26db67fe6ce (patch) | |
tree | b13d6816159d7823eca892fb439d7a8ef873e090 /hw/scsi-bus.c | |
parent | 065c25996b6275e306704816c6075d6c0ff66e84 (diff) |
scsi: do not require a minimum allocation length for INQUIRY
The requirements on the INQUIRY buffer size are not in my copy of SPC
(SPC-4 r27) and not observed by LIO. Rip them out.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi-bus.c')
-rw-r--r-- | hw/scsi-bus.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 46cd1f9324..4090b9f1ab 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -367,10 +367,6 @@ static bool scsi_target_emulate_inquiry(SCSITargetReq *r) if (r->req.cmd.buf[1] & 0x1) { /* Vital product data */ uint8_t page_code = r->req.cmd.buf[2]; - if (r->req.cmd.xfer < 4) { - return false; - } - r->buf[r->len++] = page_code ; /* this page */ r->buf[r->len++] = 0x00; @@ -398,10 +394,6 @@ static bool scsi_target_emulate_inquiry(SCSITargetReq *r) } /* PAGE CODE == 0 */ - if (r->req.cmd.xfer < 5) { - return false; - } - r->len = MIN(r->req.cmd.xfer, 36); memset(r->buf, 0, r->len); if (r->req.lun != 0) { |