Go to main content

man pages section 3: Extended Library Functions, Volume 4

Exit Print View

Updated: July 2017
 
 

stmfAddToHostGroupList(3STMF)

Name

stmfAddToHostGroupList - add an initiator port to a list of existing host groups

Synopsis

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

int stmfAddToHostGroupList(stmfGroupList *hostGroupList,
      stmfDevid *initiatorName, void **errData);

Parameters

hostGroupList

The host group list to which the specified initiatorName is to be added.

initiatorName

The device identifier of the initiator port to be added to the specified host group.

errData

A pointer to a pointer to void. On failure, this may contain appropriate information depending on the error value returned. For Some types of failure it is set to NULL.

Description

The stmfAddToHostGroupList() function adds an initiator port to a list of host groups. The host groups mentioned in the list should already exist in the system.

If any one of the given host groups in the list fails the system validity checks or if adding the specified initiator to any of the host groups causes conflict, the initiator will not be added to any of the host groups. Depending on the type of error, the parameter errData may get populated with the details of the error that caused the failure. The caller should call stmfFreeMemory(3STMF) when that data are no longer needed.

Return Values

The following values are returned:

STMF_ERROR_MEMBER_NOT_FOUND

The specified initiatorName is invalid.

STMF_ERROR_GROUP_NOT_FOUND

One or more specified host group names mentioned in the hostGroupList is invalid. This failure also populates errData with a pointer to a pointer to a stmfGroupList structure with the invalid host groups information.

STMF_ERROR_EXISTS

One or more specified host group names mentioned in the hostGroupList is not found in the system. This failure also populates errData with a pointer to a pointer to a stmfGroupList structure with information about the host groups that caused the error.

STMF_ERROR_VE_CONFLICT

The specified initiatorName could not be added to the hostGroupsList because such addition would cause unresolvable conflicts with existing view entries in the system. This failure also populates errData with a pointer to a pointer to a stmfViewList structure with a list of views that caused the conflict.

STMF_STATUS_SUCCESS

The API call was successful.

Attributes

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

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
Safe

See Also

libstmf(3LIB), stmfFreeMemory(3STMF) , attributes(5)