---
name: "scsi_test_unit_ready"
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_test_unit_ready"
---

# scsi\_test\_unit\_ready(9)

test if unit is ready

## NAME

scsi\_test\_unit\_ready - test if unit is ready

## SYNOPSIS

**int scsi\_test\_unit\_ready(struct scsi\_device \*** *sdev***, int** *timeout***, int** *retries***, struct scsi\_sense\_hdr \*** *sshdr\_external***);**

## ARGUMENTS

*sdev*

scsi device to change the state of.

*timeout*

command timeout

*retries*

number of retries before failing

*sshdr\_external*

Optional pointer to struct scsi\_sense\_hdr for returning sense. Make sure that this is cleared before passing in.

## DESCRIPTION

Returns zero if unsuccessful or an error if TUR failed. For removable media, UNIT\_ATTENTION sets -\>changed flag.

## AUTHORS

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

Author.

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

Author.

## COPYRIGHT
