Closes a file.
#include <sys/types.h> #include <sys/errno.h> int fp_close ( fp) struct file *fp;
Item | Description |
---|---|
fp | Points to a file structure returned by the fp_open, fp_getf, or fp_opendev kernel service. |
The fp_close kernel service is a common service for closing files used by both the file system and routines outside the file system.
The fp_close kernel service can be called from the process environment only.
Item | Description |
---|---|
0 | Indicates a successful operation. |
non-zero | The underlying file system implementation might report one of the values from the /usr/include/errno.h file, which is returned to the caller as a return value. However, the file is still closed. |