Invokes the kcred_setpagname kernel service and returns the PAG type identifier.
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.
Item | Description |
---|---|
name | A char * value giving the symbolic name of the requested PAG. |
flags | Either PAG_UNIQUEVALUE or PAG_MULTIVALUED 1 . |
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.
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. |