__pag_setname System Call

Purpose

Invokes the kcred_setpagname kernel service and returns the PAG type identifier.

Syntax

int __pag_setname (name, flags)
char *name;
int flags;

Description

The __pag_setname system call invokes the kcred_setpagname kernel service to register the name of a PAG and returns the PAG type identifier. The value of the func parameter to kcred_setpagname will be NULL. The other parameters to this system call are the same as with the underlying kernel service. This system call requires the SYS_CONFIG privilege.

Parameters

Item Description
name A char * value giving the symbolic name of the requested PAG.
flags Either PAG_UNIQUEVALUE or PAG_MULTIVALUED 1 .

Return Values

A return value greater than or equal to 0 is the PAG type associated with the name parameter. This value may be used with other PAG-related system calls which require a numerical PAG identifier. If unsuccessful, -1 is returned and the errno global variable is set to indicate the cause of the error.

Error Codes

Item Description
ENOSPC The PAG name table is full.
EEXIST The named PAG type already exists in the table, and the flags and func parameters do not match their previous values.
EPERM The calling process does not have the SYS_CONFIG privilege.