summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/read.2
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-12-18 09:22:32 +0000
committerru <ru@FreeBSD.org>2002-12-18 09:22:32 +0000
commita4b155d7a2170a500eb79b46959eef4018441062 (patch)
treecb18f664ed0ee63bee30f6af9b148510b6e9663b /lib/libc/sys/read.2
parente7e659d1cc574138f455ed70d58a07294211ff5a (diff)
downloadFreeBSD-src-a4b155d7a2170a500eb79b46959eef4018441062.zip
FreeBSD-src-a4b155d7a2170a500eb79b46959eef4018441062.tar.gz
mdoc(7) police: Tidy up the syscall language.
Stop calling system calls "function calls". Use "The .Fn system call" a-la "The .Nm utility". When referring to a non-BSD implementation in the HISTORY section, call syscall a function, to be safe.
Diffstat (limited to 'lib/libc/sys/read.2')
-rw-r--r--lib/libc/sys/read.236
1 files changed, 22 insertions, 14 deletions
diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2
index 42d04ce..fc7d002 100644
--- a/lib/libc/sys/read.2
+++ b/lib/libc/sys/read.2
@@ -53,21 +53,27 @@
.Ft ssize_t
.Fn pread "int d" "void *buf" "size_t nbytes" "off_t offset"
.Sh DESCRIPTION
-.Fn Read
+The
+.Fn read
+system call
attempts to read
.Fa nbytes
of data from the object referenced by the descriptor
.Fa d
into the buffer pointed to by
.Fa buf .
-.Fn Readv
+The
+.Fn readv
+system call
performs the same action, but scatters the input data
into the
.Fa iovcnt
buffers specified by the members of the
.Fa iov
array: iov[0], iov[1], ..., iov[iovcnt\|\-\|1].
-.Fn Pread
+The
+.Fn pread
+system call
performs the same function, but reads from the specified position in
the file without modifying the file pointer.
.Pp
@@ -88,7 +94,9 @@ Each
.Fa iovec
entry specifies the base address and length of an area
in memory where data should be placed.
-.Fn Readv
+The
+.Fn readv
+system call
will always fill an area completely before proceeding
to the next.
.Pp
@@ -125,10 +133,12 @@ Otherwise, a -1 is returned and the global variable
.Va errno
is set to indicate the error.
.Sh ERRORS
-.Fn Read ,
+The
+.Fn read ,
.Fn readv ,
and
.Fn pread
+system calls
will succeed unless:
.Bl -tag -width Er
.It Bq Er EBADF
@@ -178,7 +188,7 @@ points outside the process's allocated address space.
.Pp
The
.Fn pread
-call may also return the following errors:
+system call may also return the following errors:
.Bl -tag -width Er
.It Bq Er EINVAL
The specified file offset is invalid.
@@ -196,26 +206,24 @@ The file descriptor is associated with a pipe, socket, or FIFO.
.Sh STANDARDS
The
.Fn read
-function call is expected to conform to
+system call is expected to conform to
.St -p1003.1-90 .
The
.Fn readv
and
.Fn pread
-functions are expected to conform to
+system calls are expected to conform to
.St -xpg4.2 .
.Sh HISTORY
The
.Fn pread
-function call
-appeared in
+function appeared in
.At V.4 .
The
.Fn readv
-function call
-appeared in
+system call appeared in
.Bx 4.2 .
-A
+The
.Fn read
-function call appeared in
+function appeared in
.At v6 .
OpenPOWER on IntegriCloud