fp_readv Kernel Service

Purpose

Performs a read operation on an open file with arguments passed in iovec elements.

Syntax

#include <sys/types.h>
#include <sys/errno.h>

int fp_readv
(
fp, iov, iovcnt, ext,
seg
, countp)
struct file * fp;
struct iovec * iov;
ssize_t  iovcnt;
ext_t   ext;
int  seg;
ssize_t countp;  

Parameters

Item Description
fp Points to a file structure returned by the fp_open kernel service.
iov Points to an array of iovec elements. Each iovec element describes a buffer where data to be read from the file is to be stored.
iovcnt Specifies the number of iovec elements in the array pointed to by the iov parameter.
ext Specifies an extension argument required by some device drivers. Its content, form, and use are determined by the individual driver.
seg Indicates in which part of memory the array specified by the iov parameter is located:
SYS_ADSPACE
The array specified by the iov parameter is in kernel memory.
USER_ADSPACE
The array specified by the iov parameter is in application memory.
countp Points to the location where the count of bytes actually read from the file is to be returned.

Description

The fp_readv kernel service is an internal interface to the function provided by the readv subroutine.

Execution Environment

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

Return Values

Item Description
0 Indicates a successful operation.

If an error occurs, one of the values from the /usr/include/sys/errno.h file is returned.