__pag_getname System Call
Purpose
Retrieves the name of a PAG type.
Syntax
int __pag_getname (type, buf, size)
int type;
char *buf;
int size;Description
The __pag_getname system call retrieves the name of a PAG type given its integer value by invoking the kcred_getpagname kernel service with the given parameters.
Parameters
| Item | Description |
|---|---|
| type | A numerical PAG identifier. |
| buf | A char * value that points to an array at least PAG_NAME_LENGTH_MAX+1 bytes in length. |
| size | An int value that gives the size of buf in bytes. |
Return Values
If successful, 0 is returned and the buf parameter contains the PAG name associated with the type parameter. 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 |
|---|---|
| EINVAL | The value of the type parameter is less than 0 or greater than the maximum PAG identifier. |
| ENOENT | There is no PAG associated with the type parameter. |
| ENOSPC | The value of the size parameter is insuffient to hold the PAG name and its terminating NULL character. |