aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/scsi-generic.c')
-rw-r--r--hw/scsi-generic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
index 88147b5df0..e23276f90c 100644
--- a/hw/scsi-generic.c
+++ b/hw/scsi-generic.c
@@ -352,6 +352,9 @@ static int scsi_length(uint8_t *cmd, int blocksize, int *cmdlen, uint32_t *len)
case 0:
*len = cmd[4];
*cmdlen = 6;
+ /* length 0 means 256 blocks */
+ if (*len == 0)
+ *len = 256;
break;
case 1:
case 2: