Invokes the kcred_setpagname kernel service and returns the PAG type identifier.
int __pag_setname (name, flags) char *name; int flags;
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.
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.
ENOSPC | The PAG name table is full. |
EINVAL | The named PAG type already exists in the table, and the flags and func parameters do not match their earlier values. |
EPERM | The calling process does not have the SYS_CONFIG privilege. |
__pag_getid System Call, __pag_getname System Call, __pag_getvalue System Call, __pag_setvalue System Call, kcred_getpagid Kernel Service, kcred_getpagname Kernel Service, and kcred_setpagname Kernel Service.