fp_close Kernel Service

Purpose

Closes a file.

Syntax

#include <sys/types.h> #include <sys/errno.h> int fp_close ( fp) struct file *fp;

Parameter

Item Description
fp Points to a file structure returned by the fp_open, fp_getf, or fp_opendev kernel service.

Description

The fp_close kernel service is a common service for closing files used by both the file system and routines outside the file system.

Execution Environment

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

Return Values

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.