diff options
author | Hannes Reinecke <hare@suse.de> | 2014-10-29 13:00:04 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-10-31 11:28:59 +0100 |
commit | 1894df02811f6b79ea3ffbf1084599d96f316173 (patch) | |
tree | a1a5a4c5101cff0f2003ed37aff630e39b3272b8 /include/hw/scsi/scsi.h | |
parent | 98001e7b085b19b2b03ca5fdf44d063c204cc325 (diff) |
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/scsi.h')
-rw-r--r-- | include/hw/scsi/scsi.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h index 6bc841ab8b..fd48177fa6 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); |