'\" t .\" Title: scsi_test_unit_ready .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: SCSI mid layer .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "SCSI_TEST_UNIT_READY" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "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_test_unit_ready \- test if unit is ready .SH "SYNOPSIS" .HP \w'int\ scsi_test_unit_ready('u .BI "int scsi_test_unit_ready(struct\ scsi_device\ *\ " "sdev" ", int\ " "timeout" ", int\ " "retries" ", struct\ scsi_sense_hdr\ *\ " "sshdr_external" ");" .SH "ARGUMENTS" .PP \fIsdev\fR .RS 4 scsi device to change the state of\&. .RE .PP \fItimeout\fR .RS 4 command timeout .RE .PP \fIretries\fR .RS 4 number of retries before failing .RE .PP \fIsshdr_external\fR .RS 4 Optional pointer to struct scsi_sense_hdr for returning sense\&. Make sure that this is cleared before passing in\&. .RE .SH "DESCRIPTION" .PP Returns zero if unsuccessful or an error if TUR failed\&. For removable media, UNIT_ATTENTION sets \->changed flag\&. .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