svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
HBA_GetAdapterName(3hbaapi)
Common Fibre Channel HBA Information Library Functions
HBA_GetAdapterName(3HBAAPI)
NAME
HBA_GetAdapterName - retrieve the name of a specific HBA
SYNOPSIS
cc [ flag... ] file... -lHBAAPI [ library... ]
#include <hbaapi.h>
HBA_STATUS HBA_GetAdapterName(HBA_UINT32 adapterindex,
char *adaptername);
PARAMETERS
adapterindex the index of the adapter, between 0 and one less than
the value returned by HBA_GetNumberOfAdapters(3HBAAPI).
adaptername the buffer where the name of the adapter will be
stored. The recommended size is 256 bytes.
DESCRIPTION
The HBA_GetAdapterName() function stores the name of the adapter speci‐
fied by adapterindex in the buffer pointed to by adaptername. The call‐
er is responsible for allocating space for the name.
RETURN VALUES
Upon successful completion, HBA_STATUS_OK is returned. Otherwise, an
error value is returned and the content of adaptername is undefined.
ERRORS
See libhbaapi(3LIB) for general error status values.
EXAMPLES
Example 1 Return adapter name.
Given an hbacount >= 0 and < total number of adapters on the system,
the following example returns the adaptername for that adapter.
if ((status = HBA_GetAdapterName(hbaCount, adaptername)) !=
HBA_STATUS_OK) {
fprintf(stderr, "HBA %d name not available for "
"reason %d\n", hbaCount, status);
continue;
}
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 _ Interface StabilityCommitted _ T{ Standard: FC-HBA Ver‐
sion 4 (API version 2) T} _ MT-LevelSafe _ Standard FC-MI 1.92 (API
version 1)
SEE ALSO
HBA_GetNumberOfAdapters(3HBAAPI), libhbaapi(3LIB), attributes(7)
T11 FC-MI Specification
BUGS
The HBA_GetAdapterName() function does not take a name length argument
to define how large the buffer is, yet the specification does not indi‐
cate a maximum name length. Failure to pass in a large enough buffer
will result in a buffer over-run, which may lead to segmentation faults
or other failures. Callers should be sure to allocate a large buffer to
ensure the Vendor library will not overrun during the copy.
Oracle Solaris 11.4 1 Sep 2003
HBA_GetAdapterName(3HBAAPI)