svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
IMA_LuReadCapacity(3ima)
IMA_LuReadCapacity(3IMA) iSCSI Management API IMA_LuReadCapacity(3IMA)
NAME
IMA_LuReadCapacity - Gets the SCSI READ CAPACITY data for the specified
logical unit
SYNOPSIS
cc [ flag... ] file... -lima [ library... ]
#include <ima.h>
IMA_STATUS IMA_LuReadCapacity(
/* in */ IMA_OID deviceOid,
/* in */ IMA_UINT cdbLength,
/* out */ IMA_BYTE *pOutputBuffer,
/* in, out */ IMA_UINT *pOutputBufferLength,
/* out */ IMA_BYTE *pSenseBuffer,
/* in, out */ IMA_UINT *pSenseBufferLength
);
PARAMETERS
deviceOid The object ID of the target or logical unit (LU)
whose READ CAPACITY data is being retrieved. If
the object ID specifies a target, then the READ
CAPACITY command will be sent to LUN 0 of the
target.
cdbLength The length in bytes of the READ CAPACITY CDB
that is sent to the target or LU. Valid values
of this CDB length are 10 and 16. Support of the
10 byte CDB is mandatory, while support for the
16 byte CDB is optional.
pOutputBuffer A pointer to the memory location, that, on suc‐
cessful completion of the READ CAPACITY command,
contains the data returned by the logical unit.
pOutputBufferLength On entry, this argument points to the length, in
bytes, of the memory area specified by the pOut‐
putBuffer argument. If returned successfully,
the pOutputBufferLength argument points to the
number of bytes that were actually placed into
the output buffer.
pSenseBuffer A pointer to a memory location, that, if the
READ CAPACITY command fails with a CHECK CONDI‐
TION status, contains the sense data received
from the logical unit. If the pSenseBuffer argu‐
ment is NULL, then no sense data is transferred
to the client if the READ CAPACITY command fails
with a CHECK CONDITION status.
pSenseBufferLength A pointer to the sense buffer length. On entry
to the function, this argument points to a vari‐
able containing the maximum length, in bytes, of
the pSenseBuffer argument. If the API returns
the value, IMA_ERROR_SCSI_STATUS_CHECK_CONDI‐
TION, then, on exit this argument contains the
number of sense data bytes returned in the
pSenseBuffer argument. If the pSenseBuffer argu‐
ment is NULL, then the value of the pSense‐
BufferLength argument is 0. If any other value
is returned by the API, then, on exit this value
remains the same as on entry.
DESCRIPTION
The IMA_LuReadCapacity() API gets the SCSI READ CAPACITY data for the
specified logical unit.
RETURN VALUES
IMA_ERROR_INVALID_PARAMETER
o Returned if the pOutputBuffer argument is NULL, or spec‐
ifies a memory area to which the pOutputBufferLength
argument bytes cannot be written.
o Returned if the pOutputBufferLength argument is 0.
o Returned if the pSenseBufferLength argument is greater
than zero, and the pSenseBuffer argument specifies a
memory area to which the pSenseBufferLength argument
bytes cannot be written.
IMA_ERROR_INVALID_OBJECT_TYPE
Returned if the deviceOid argument does not specify a valid object
type.
IMA_ERROR_INCORRECT_OBJECT_TYPE
Returned if the deviceOid argument does not specify a target or LU
object.
IMA_ERROR_OBJECT_NOT_FOUND
Returned if the deviceOid argument does not specify a target or LU
known to the system.
IMA_ERROR_SCSI_STATUS_CHECK_CONDITION
Returned if the SCSI READ CAPACITY command fails with a CHECK CON‐
DITION status. If this value is returned, then if the pSenseBuffer
argument is not NULL, it contains the sense data returned by the
logical unit.
IMA_ERROR_TARGET_TIMEOUT
Returned if the target associated with the specified LU failed to
respond to an iSCSI login request from an initiator.
IMA_ERROR_LOGIN_REJECTED
Returned if the target associated with the specified LU rejected an
iSCSI login request from an initiator.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitysystem/library/storage/snia-ima _ Interface
StabilityVolatile _ MT-LevelSafe
SEE ALSO
libima(3LIB), attributes(7), IMA_LuInquiry(3IMA), IMA_LuRe‐
portLuns(3IMA)
Oracle Solaris 11.4 27 Nov 2017 IMA_LuReadCapacity(3IMA)