cc [flags…] –I /usr/cluster/include file –L /usr/cluster/lib –l dsdev#include <rgm/libdsdev.h> const char *scds_get_zone_name(scds_handle_t handle);
The scds_get_zone_name() function returns a pointer to a character string. If the following conditions are met, this character string contains the name of the zone in which a resource group runs:
The scds_get_zone_name function is called from the global zone.
The Global_zone resource type property is set to TRUE.
See the rt_properties(5) man page for information about the Global_zone resource type property.
The resource is configured in a zone cluster.
In all other cases, including the following, the character string is NULL:
The resource group is configured in the global zone.
The Global_zone resource type property is set to FALSE, or the Global_zone_override resource property is set to FALSE.
To obtain the name of the zone in which a method is actually executing, use the zonename command. See the zonename (1) man page.
The pointer to the character string points to memory that belongs to the Data Service Development Library (DSDL). Do not modify this memory. A call to scds_close() invalidates this pointer.
The following parameters are supported:
The handle that is returned from scds_initialize(3HA).
The function succeeded.
See scha_calls(3HA) for a description of other error codes.
See attributes (5) for descriptions of the following attributes: