__pag_getid System Call

Purpose

Invokes the kcred_getpagid kernel service and returns the PAG identifier for that PAG name.

Syntax

int __pag_getid (name)
char *name;

Description

Given a PAG type name, the __pag_getid invokes the kcred_getpagid kernel service and returns the PAG identifier for that PAG name.

Parameters

Item Description
name A char * value which references a NULL-terminated string of not more than PAG_NAME_LENGTH_MAX characters.

Return Values

If successful, a value greater than or equal to 0 is returned and represents the PAG type. This value may be used in subsequent calls to other PAG system calls that require a type parameter on input. If unsuccessful, -1 is returned and the errno global variable is set to a value reflecting the cause of the error.

Error Codes

Item Description
ENOENT The name parameter doesn't refer to an existing PAG type.
ENAMETOOLONG The name parameter refers to a string that is longer than PAG_NAME_LENGTH_MAX.