Returns a pointer to a file structure associated with a file descriptor.
#include <sys/file.h>
int ufdgetf(fd, fpp) int fd; struct file **fpp;
fd | Identifies the file descriptor. The descriptor must be for an open file. |
fpp | Points to a location to store the file pointer. |
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.
The ufdget kernel service can be called from the process environment only.
0 | Indicates successful completion. |
EBADF | Indicates that the fd parameter is not a file descriptor for an open file. |
This kernel service is part of Base Operating System (BOS) Runtime.
The ufdhold kernel service.