'\" t .\" Title: scsi_normalize_sense .\" Author: .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: SCSI mid layer .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "SCSI_NORMALIZE_SENSE" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "SCSI mid layer" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" scsi_normalize_sense \- normalize main elements from either fixed or descriptor sense data format into a common format\&. .SH "SYNOPSIS" .HP \w'int\ scsi_normalize_sense('u .BI "int scsi_normalize_sense(const\ u8\ *\ " "sense_buffer" ", int\ " "sb_len" ", struct\ scsi_sense_hdr\ *\ " "sshdr" ");" .SH "ARGUMENTS" .PP \fIsense_buffer\fR .RS 4 byte array containing sense data returned by device .RE .PP \fIsb_len\fR .RS 4 number of valid bytes in sense_buffer .RE .PP \fIsshdr\fR .RS 4 pointer to instance of structure that common elements are written to\&. .RE .SH "NOTES" .PP The \(lqmain elements\(rq from sense data are: response_code, sense_key, asc, ascq and additional_length (only for descriptor format)\&. .PP Typically this function can be called after a device has responded to a SCSI command with the CHECK_CONDITION status\&. .SH "RETURN VALUE" .PP 1 if valid sense data information found, else 0; .SH "AUTHORS" .PP \fBJames Bottomley\fR <\&James.Bottomley@hansenpartnership.com\&> .RS 4 Author. .RE .PP \fBRob Landley\fR <\&rob@landley.net\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br