xref: /titanic_52/usr/src/man/man3stmf/stmfCreateLu.3stmf (revision 6a5408e613dc0b372f722907d6c0b18e99c182dd)
te
Copyright (c) 2009, Sun Microsystems Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
stmfCreateLu 3STMF "8 May 2009" "SunOS 5.11" "SCSI Target Mode Framework Library Functions"
NAME
stmfCreateLu - create a logical unit
SYNOPSIS

cc [ flag... ] file... -lstmf [ library... ]
#include <libstmf.h>

int stmfCreateLu(luResource hdl, stmfGuid *luGuid);
PARAMETERS

hdl

The logical unit resource returned from a previous call to stmfCreateLuResource(3STMF).

luGuid

If non-null, it must contain a pointer to an stmfGuid structure allocated by the caller. On successful return from this API, it will contain the guid of the newly created logical unit. If luGuid is NULL, this argument is ignored.

DESCRIPTION

The stmfCreateLu function creates a logical unit in stmf using the properties of hdl. See stmfSetLuProp(3STMF) for a complete description of properties and their possible values.

RETURN VALUES

The following values are returned:

STMF_STATUS_SUCCESS

The API call was successful.

STMF_ERROR_FILE_IN_USE

The filename specified by the STMF_LU_PROP_DATA_FILENAME or STMF_LU_PROP_META_FILENAME was in use.

STMF_ERROR_GUID_IN_USE

The guid specified by the STMF_LU_PROP_GUID property is already being used.

STMF_ERROR_INVALID_BLKSIZE

The blocksize specified by STMF_LU_PROP_BLOCK_SIZE is invalid.

STMF_ERROR_WRITE_CACHE_SET

The requested write cache setting could not be provided.

STMF_ERROR_SIZE_OUT_OF_RANGE

The specified logical unit size is not supported.

STMF_ERROR_META_FILE_NAME

The specified meta file could not be accessed.

STMF_ERROR_DATA_FILE_NAME

The specified data file could not be accessed.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
Interface StabilityCommitted
MT-LevelSafe
SEE ALSO

libstmf(3LIB), stmfCreateLuResource(3STMF), stmfSetLuProp(3STMF), attributes(5)