Re: [Qemu-devel] [PATCH] scsi: provide general-purpose functions to manage sense data

2017-12-18 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > 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

[Qemu-devel] [PATCH] scsi: provide general-purpose functions to manage sense data

2017-12-16 Thread Paolo Bonzini
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