---
name: "scsi_mode_sense"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/scsi_mode_sense"
---

# scsi\_mode\_sense(9)

issue a mode sense, falling back from 10 to six bytes if necessary.

## NAME

scsi\_mode\_sense - issue a mode sense, falling back from 10 to six bytes if necessary.

## SYNOPSIS

**int scsi\_mode\_sense(struct scsi\_device \*** *sdev***, int** *dbd***, int** *modepage***, unsigned char \*** *buffer***, int** *len***, int** *timeout***, int** *retries***, struct scsi\_mode\_data \*** *data***, struct scsi\_sense\_hdr \*** *sshdr***);**

## ARGUMENTS

*sdev*

SCSI device to be queried

*dbd*

set if mode sense will allow block descriptors to be returned

*modepage*

mode page being requested

*buffer*

request buffer (may not be smaller than eight bytes)

*len*

length of request buffer.

*timeout*

command timeout

*retries*

number of retries before failing

*data*

returns a structure abstracting the mode header data

*sshdr*

place to put sense data (or NULL if no sense to be collected). must be SCSI\_SENSE\_BUFFERSIZE big.

## DESCRIPTION

Returns zero if unsuccessful, or the header offset (either 4 or 8 depending on whether a six or ten byte command was issued) if successful.

## AUTHORS

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

Author.

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

Author.

## COPYRIGHT
