ufdgetf Kernel Service

Purpose

Returns a pointer to a file structure associated with a file descriptor.

Syntax

#include <sys/file.h>

int ufdgetf( fd,  fpp)
int fd;
struct file **fpp;

Parameters

Item Description
fd Identifies the file descriptor. The descriptor must be for an open file.
fpp Points to a location to store the file pointer.

Description

The ufdgetf kernel service returns a pointer to a file structure associated with a file descriptor. The calling routine must have a use count on the file descriptor. To obtain a use count on the file descriptor, the caller must first call the ufdhold kernel service.

Execution Environment

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

Return Values

Item Description
0 Indicates successful completion.
EBADF Indicates that the fd parameter is not a file descriptor for an open file.