---
name: "scsi_normalize_sense"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/scsi_normalize_sense"
---

# scsi\_normalize\_sense(9)

normalize main elements from either fixed or descriptor sense data format into a common format.

## NAME

scsi\_normalize\_sense - normalize main elements from either fixed or descriptor sense data format into a common format.

## SYNOPSIS

**int scsi\_normalize\_sense(const u8 \*** *sense\_buffer***, int** *sb\_len***, struct scsi\_sense\_hdr \*** *sshdr***);**

## ARGUMENTS

*sense\_buffer*

byte array containing sense data returned by device

*sb\_len*

number of valid bytes in sense\_buffer

*sshdr*

pointer to instance of structure that common elements are written to.

## NOTES

The “main elements” from sense data are: response\_code, sense\_key, asc, ascq and additional\_length (only for descriptor format).

Typically this function can be called after a device has responded to a SCSI command with the CHECK\_CONDITION status.

## RETURN VALUE

1 if valid sense data information found, else 0;

## AUTHORS

**James Bottomley** \<James.Bottomley@hansenpartnership.com\>

Author.

**Rob Landley** \<rob@landley.net\>

Author.

## COPYRIGHT
