[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

fp_access Kernel Service


Checks for access permission to an open file.


#include <sys/types.h>
#include <sys/errno.h>

int fp_access ( fp, perm)
struct file *fp;
int perm;


fp Points to a file structure returned by the fp_open or fp_opendev kernel service.
perm Indicates which read, write, and execute permissions are to be checked. The /usr/include/sys/mode.h file contains pertinent values (IREAD, IWRITE, IEXEC).


The fp_access kernel service is used to see if either the read, write, or exec bit is set anywhere in a file's permissions mode. Set perm to one of the following constants from mode.h:


Execution Environment

The fp_access kernel service can be called from the process environment only.

Return Values

0 Indicates that the calling process has the requested permission.
EACCES Indicates all other conditions.

Implementation Specifics

The fp_access kernel service is part of Base Operating System (BOS) Runtime.

Related Information

The access subroutine.

Logical File System Kernel Services in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.

[ Previous | Next | Contents | Home | Search ]