---
name: "scsi_add_lun"
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_add_lun"
---

# scsi\_add\_lun(9)

allocate and fully initialze a scsi\_device

## NAME

scsi\_add\_lun - allocate and fully initialze a scsi\_device

## SYNOPSIS

**int scsi\_add\_lun(struct scsi\_device \*** *sdev***, unsigned char \*** *inq\_result***, int \*** *bflags***, int** *async***);**

## ARGUMENTS

*sdev*

holds information to be stored in the new scsi\_device

*inq\_result*

holds the result of a previous INQUIRY to the LUN

*bflags*

black/white list flag

*async*

1 if this device is being scanned asynchronously

## DESCRIPTION

Initialize the scsi\_device *sdev*. Optionally set fields based on values in \**bflags*.

## RETURN

SCSI\_SCAN\_NO\_RESPONSE: could not allocate or setup a scsi\_device SCSI\_SCAN\_LUN\_PRESENT: a new scsi\_device was allocated and initialized

## AUTHORS

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

Author.

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

Author.

## COPYRIGHT
