[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Kernel and Subsystems, Volume 1
fp_open Kernel Service
Purpose
Opens special and regular files or directories.
Syntax
#include <sys/types.h>
#include <sys/errno.h>
int fp_open (path, oflags, cmode, ext, segflag, fpp)
char * path;
unsigned oflags;
unsigned cmode;
int ext;
unsigned segflag;
struct file ** fpp;
Parameters
path |
Points to the file name of the file to be opened. |
oflags |
Specifies open mode flags as described in the open subroutine. |
cmode |
Specifies the mode (permissions) value to be given to the file if
the file is to be created. |
ext |
Specifies an extension argument required by some device drivers.
Individual drivers determine its content, form, and use. |
segflag |
Specifies the flag indicating where the pointer specified by the path parameter is located:
- SYS_ADSPACE
- The pointer specified by the path parameter
is stored in kernel memory.
- USER_ADSPACE
- The pointer specified by the path parameter
is stored in application memory.
|
fpp |
Points to the location where the file structure pointer is to be
returned by the fp_open service. |
Description
The fp_open kernel service provides
a common service used by:
- The file system for the implementation of the open subroutine
- Kernel routines outside the file system that must
open files
Execution Environment
The fp_open kernel service can
be called from the process environment only.
Return Values
0 |
Indicates a successful operation. |
Also, the fpp parameter points
to an open file structure that is valid for use with the other Logical File
System services. If an error occurs, one of the values from the /usr/include/sys/errno.h file is returned. The discussion of the open subroutine contains
possible errno values.
Related Information
The open subroutine.
Logical File System Kernel
Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]