---
name: "scsi_execute"
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_execute"
---

# scsi\_execute(9)

insert request and wait for the result

## NAME

scsi\_execute - insert request and wait for the result

## SYNOPSIS

**int scsi\_execute(struct scsi\_device \*** *sdev***, const unsigned char \*** *cmd***, int** *data\_direction***, void \*** *buffer***, unsigned** *bufflen***, unsigned char \*** *sense***, int** *timeout***, int** *retries***, u64** *flags***, int \*** *resid***);**

## ARGUMENTS

*sdev*

scsi device

*cmd*

scsi command

*data\_direction*

data direction

*buffer*

data buffer

*bufflen*

len of buffer

*sense*

optional sense buffer

*timeout*

request timeout in seconds

*retries*

number of times to retry request

*flags*

or into request flags;

*resid*

optional residual length

## DESCRIPTION

returns the req-\>errors value which is the scsi\_cmnd result field.

## AUTHORS

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

Author.

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

Author.

## COPYRIGHT
