[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 2

rs_getnamedrset Subroutine

Purpose

Retrieves the contents of a named resource set from the system resource set registry.

Library

Standard C library (libc.a)

Syntax

#include <sys/rset.h>
int rs_getnamedrset (namespace, rsname, rset)
char *namespace, *rsname;

Description

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.

Parameters

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.

Return Values

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.

Error Codes

The rs_getnamedrset subroutine is unsuccessful if one or more of the following are true:

EINVAL One of the following is true:
  • The rsname parameter is a null pointer.
  • The namespace parameter is a null pointer.
  • The rsname or namespace parameters point to an invalid name. The name length is 0 or greater than the RSET_NAME_SIZE constant (defined in rset.h), or the rsname parameter contains invalid characters.
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.

Related Information

rs_alloc Subroutine, rs_registername Subroutine, rs_getnameattr Subroutine, and rs_discardname Subroutine.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]