diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-08-22 09:31:36 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-09-19 14:09:11 +0200 |
commit | 37b6045c455275af37f0433b05b0dad123e14daf (patch) | |
tree | da8026fa13e3e8654ac4c1ae01238161adc44584 /hw | |
parent | 14b207487f38b7913134a4b6675d515e87d85a42 (diff) | |
download | qemu-37b6045c455275af37f0433b05b0dad123e14daf.zip qemu-37b6045c455275af37f0433b05b0dad123e14daf.tar.gz qemu-37b6045c455275af37f0433b05b0dad123e14daf.tar.bz2 |
scsi: rename scsi_build_sense to scsi_convert_sense
After introducing the scsi/ subdirectory, there will be a scsi_build_sense
function that is the same as scsi_req_build_sense but without needing
a SCSIRequest. The existing scsi_build_sense function gets in the way,
remove it.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/scsi/scsi-bus.c | 10 | ||||
-rw-r--r-- | hw/scsi/scsi-disk.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index ade31c1..fac360e 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -790,7 +790,7 @@ int scsi_req_get_sense(SCSIRequest *req, uint8_t *buf, int len) return 0; } - ret = scsi_build_sense(req->sense, req->sense_len, buf, len, true); + ret = scsi_convert_sense(req->sense, req->sense_len, buf, len, true); /* * FIXME: clearing unit attention conditions upon autosense should be done @@ -811,7 +811,7 @@ int scsi_req_get_sense(SCSIRequest *req, uint8_t *buf, int len) int scsi_device_get_sense(SCSIDevice *dev, uint8_t *buf, int len, bool fixed) { - return scsi_build_sense(dev->sense, dev->sense_len, buf, len, fixed); + return scsi_convert_sense(dev->sense, dev->sense_len, buf, len, fixed); } void scsi_req_build_sense(SCSIRequest *req, SCSISense sense) @@ -1531,12 +1531,12 @@ const struct SCSISense sense_code_SPACE_ALLOC_FAILED = { }; /* - * scsi_build_sense + * scsi_convert_sense * * Convert between fixed and descriptor sense buffers */ -int scsi_build_sense(uint8_t *in_buf, int in_len, - uint8_t *buf, int len, bool fixed) +int scsi_convert_sense(uint8_t *in_buf, int in_len, + uint8_t *buf, int len, bool fixed) { bool fixed_in; SCSISense sense; diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index cf38f93..990ba04 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -1987,8 +1987,8 @@ static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf) break; case REQUEST_SENSE: /* Just return "NO SENSE". */ - buflen = scsi_build_sense(NULL, 0, outbuf, r->buflen, - (req->cmd.buf[1] & 1) == 0); + buflen = scsi_convert_sense(NULL, 0, outbuf, r->buflen, + (req->cmd.buf[1] & 1) == 0); if (buflen < 0) { goto illegal_request; } |