scsi_test_unit_ready (9) - Linux Man Pages

scsi_test_unit_ready: 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 [at] hansenpartnership.com>

Author.

Rob Landley <rob [at] landley.net>

Author.

COPYRIGHT