Displaying 2 results from an estimated 2 matches for "data_xfer_len".
Did you mean:
data_xfer_len++
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...x03 && command != 0x12) /* REQUEST SENSE and INQUIRY */
- goto fail;
+ return cmdlen;
+}
+
+int32_t scsi_emulate_command(BlockDriverState *bdrv,
+ int lun, uint8_t *cdb, int datalen,
+ uint8_t *outbuf, uint32_t *out_len)
+{
+ uint64_t nb_sectors;
+ uint32_t data_xfer_len = 0;
+ int status = STATUS_GOOD;
+ int is_write;
+ uint8_t command;
+ uint32_t cluster_size = 1;
+
+ command = cdb[0];
+
+ is_write = 0;
+
+ if (!bdrv && command != 0x12 && command != 0x03) {
+ *out_len = 0;
+ return SENSE_LUN_NOT_SUPPORTED;
}
+
+ if (bd...
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...x03 && command != 0x12) /* REQUEST SENSE and INQUIRY */
- goto fail;
+ return cmdlen;
+}
+
+int32_t scsi_emulate_command(BlockDriverState *bdrv,
+ int lun, uint8_t *cdb, int datalen,
+ uint8_t *outbuf, uint32_t *out_len)
+{
+ uint64_t nb_sectors;
+ uint32_t data_xfer_len = 0;
+ int status = STATUS_GOOD;
+ int is_write;
+ uint8_t command;
+ uint32_t cluster_size = 1;
+
+ command = cdb[0];
+
+ is_write = 0;
+
+ if (!bdrv && command != 0x12 && command != 0x03) {
+ *out_len = 0;
+ return SENSE_LUN_NOT_SUPPORTED;
}
+
+ if (bd...