---
name: "scsi_device_lookup_by_target"
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_device_lookup_by_target"
---

# scsi\_device\_lookup\_by\_target(9)

find a device given the target

## NAME

scsi\_device\_lookup\_by\_target - find a device given the target

## SYNOPSIS

**struct scsi\_device \* scsi\_device\_lookup\_by\_target(struct scsi\_target \*** *starget***, u64** *lun***);**

## ARGUMENTS

*starget*

SCSI target pointer

*lun*

SCSI Logical Unit Number

## DESCRIPTION

Looks up the scsi\_device with the specified *lun* for a given *starget*. The returned scsi\_device has an additional reference that needs to be released with scsi\_device\_put once you're done with it.

## AUTHORS

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

Author.

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

Author.

## COPYRIGHT
