summaryrefslogtreecommitdiffstats
path: root/include/hw/scsi
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2014-10-29 13:00:04 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-10-31 11:28:59 +0100
commit1894df02811f6b79ea3ffbf1084599d96f316173 (patch)
treea1a5a4c5101cff0f2003ed37aff630e39b3272b8 /include/hw/scsi
parent98001e7b085b19b2b03ca5fdf44d063c204cc325 (diff)
downloadhqemu-1894df02811f6b79ea3ffbf1084599d96f316173.zip
hqemu-1894df02811f6b79ea3ffbf1084599d96f316173.tar.gz
scsi: Rename scsi_*_length() to scsi_*_xfer(), add scsi_cdb_length()
scsi_cdb_length() does not return the length of the cdb, but the transfersize encoded in the cdb. So rename it to scsi_cdb_xfer() and also rename all other related functions to end with _xfer. We can then add a new scsi_cdb_length() which actually does return the length of the cdb. With that DEBUG_SCSI can now display the correct CDB buffer. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw/scsi')
-rw-r--r--include/hw/scsi/scsi.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h
index 6bc841a..fd48177 100644
--- a/include/hw/scsi/scsi.h
+++ b/include/hw/scsi/scsi.h
@@ -239,8 +239,9 @@ extern const struct SCSISense sense_code_SPACE_ALLOC_FAILED;
#define SENSE_CODE(x) sense_code_ ## x
-uint32_t scsi_data_cdb_length(uint8_t *buf);
-uint32_t scsi_cdb_length(uint8_t *buf);
+uint32_t scsi_data_cdb_xfer(uint8_t *buf);
+uint32_t scsi_cdb_xfer(uint8_t *buf);
+int scsi_cdb_length(uint8_t *buf);
int scsi_sense_valid(SCSISense sense);
int scsi_build_sense(uint8_t *in_buf, int in_len,
uint8_t *buf, int len, bool fixed);
OpenPOWER on IntegriCloud