Retrieves the contents of a named resource set from the system resource set registry.
Standard C library (libc.a)
#include <sys/rset.h>
int rs_getnamedrset (namespace, rsname, rset)
char *namespace, *rsname;
The rs_getnamedrset subroutine retrieves a resource set definition from the system registry. The namespace and rsname parameters identify the resource set to be retrieved. The rset parameter identifies where the retrieved resource set should be returned. The namespace and rsname parameters identify a previously registered resource set definition.
The calling process must have root authority or read access rights to the resource set definition in order to retrieve it.
The rset parameter must be allocated (using the rs_alloc subroutine) prior to calling the rs_getnamedrset subroutine.
Item | Description |
---|---|
namespace | Points to a null-terminated string corresponding to the name space within which rsname is found. |
rsname | Points to a null-terminated string corresponding to the previously registered name of a resource set. |
rset | Specifies the resource set handle for the resource set that the registered resource set is copied into. The registered resource set is specified by the rsname parameter. |
If successful , a value of 0 is returned. If unsuccessful, a value of -1 is returned and the errno global variable is set to indicate the error.
The rs_getnamedrset subroutine is unsuccessful if one or more of the following are true:
Item | Description |
---|---|
EINVAL | One of the following is true:
|
ENOENT | The rsname parameter could not be found in the name space identified by the namespace parameter. |
EPERM | The calling process has neither read permission on rsname nor root authority. |
EFAULT | Invalid address. |