---
name: "starget_for_each_device"
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/starget_for_each_device"
---

# starget\_for\_each\_device(9)

helper to walk all devices of a target

## NAME

starget\_for\_each\_device - helper to walk all devices of a target

## SYNOPSIS

**void starget\_for\_each\_device(struct scsi\_target \*** *starget***, void \*** *data***, void (\****fn***) (struct scsi\_device \*, void \*));**

## ARGUMENTS

*starget*

target whose devices we want to iterate over.

*data*

Opaque passed to each function call.

*fn*

Function to call on each device

## DESCRIPTION

This traverses over each device of *starget*. The devices have a reference that must be released by scsi\_host\_put when breaking out of the loop.

## AUTHORS

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

Author.

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

Author.

## COPYRIGHT
