SysTutorials

Linux Manual Pages › Section 9

shost_for_each_device(9)

shost_for_each_device – iterate over all devices of a host

Synopsis

shost_for_each_device(sdev, shost);

Arguments

sdev

the struct scsi_device to use as a cursor

shost

the struct scsi_host to iterate over

Description

Iterator that returns each device attached to shost. This loop takes a reference on each device and releases it at the end. If you break out of the loop, you must call scsi_device_put(sdev).

Authors

James Bottomley <James.Bottomley [at] hansenpartnership.com>

Author.

Rob Landley <rob [at] landley.net>

Author.

Copyright