Skip to content
Snippets Groups Projects
Commit f68d98b2 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

scsi: provide general-purpose functions to manage sense data


Extract the common parts of scsi_sense_buf_to_errno, scsi_convert_sense
and scsi_target_send_command's REQUEST SENSE handling into two new
functions scsi_parse_sense_buf and scsi_build_sense_buf.

Fix a bug in scsi_target_send_command along the way; the length was
written in buf[10] rather than buf[7].

Reported-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Fixes: b07fbce6 ("scsi-bus: correct responses for INQUIRY and REQUEST SENSE")
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 7299e1a4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment