stmfAddToHostGroupList - add an initiator port to a list of existing host groups
cc [ flag... ] file... –lstmf [ library... ] #include <libstmf.h> int stmfAddToHostGroupList(stmfGroupList *hostGroupList, stmfDevid *initiatorName, void **errData);
The host group list to which the specified initiatorName is to be added.
The device identifier of the initiator port to be added to the specified host group.
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.
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.
The following values are returned:
The specified initiatorName is invalid.
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.
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.
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.
The API call was successful.
See attributes(5) for descriptions of the following attributes: