Markup, grammar, and spelling fixes.

This commit is contained in:
ru 2004-06-30 20:09:10 +00:00
parent bc73e6133f
commit 95168a499a
20 changed files with 121 additions and 82 deletions

View File

@ -138,8 +138,14 @@ The following flags
alter this: alter this:
.Bl -tag -width VIS_WHITEX .Bl -tag -width VIS_WHITEX
.It Dv VIS_GLOB .It Dv VIS_GLOB
Also encode magic characters ('*', '?', '[' and '#') recognized by Also encode magic characters
.Xr glob 3 .Ql ( * ,
.Ql \&? ,
.Ql \&[
and
.Ql # )
recognized by
.Xr glob 3 .
.It Dv VIS_SP .It Dv VIS_SP
Also encode space. Also encode space.
.It Dv VIS_TAB .It Dv VIS_TAB

View File

@ -126,10 +126,10 @@ See the specific manual pages for more information.
.Xr isgraph 3 , .Xr isgraph 3 ,
.Xr isideogram 3 , .Xr isideogram 3 ,
.Xr islower 3 , .Xr islower 3 ,
.Xr isrune 3 ,
.Xr isphonogram 3 , .Xr isphonogram 3 ,
.Xr isprint 3 , .Xr isprint 3 ,
.Xr ispunct 3 , .Xr ispunct 3 ,
.Xr isrune 3 ,
.Xr isspace 3 , .Xr isspace 3 ,
.Xr isspecial 3 , .Xr isspecial 3 ,
.Xr isupper 3 , .Xr isupper 3 ,

View File

@ -51,7 +51,7 @@
.Sh DESCRIPTION .Sh DESCRIPTION
The basic elements of some written natural languages, such as Chinese, The basic elements of some written natural languages, such as Chinese,
cannot be represented uniquely with single C cannot be represented uniquely with single C
.Va char Ns s . .Vt char Ns s .
The C standard supports two different ways of dealing with The C standard supports two different ways of dealing with
extended natural language encodings: extended natural language encodings:
wide characters and wide characters and
@ -59,10 +59,10 @@ multibyte characters.
Wide characters are an internal representation Wide characters are an internal representation
which allows each basic element to map which allows each basic element to map
to a single object of type to a single object of type
.Va wchar_t . .Vt wchar_t .
Multibyte characters are used for input and output Multibyte characters are used for input and output
and code each basic element as a sequence of C and code each basic element as a sequence of C
.Va char Ns s . .Vt char Ns s .
Individual basic elements may map into one or more Individual basic elements may map into one or more
(up to (up to
.Dv MB_LEN_MAX ) .Dv MB_LEN_MAX )
@ -75,7 +75,7 @@ The locale category
.Dv LC_CTYPE .Dv LC_CTYPE
specifically controls this interpretation. specifically controls this interpretation.
The The
.Va wchar_t .Vt wchar_t
type is wide enough to hold the largest value type is wide enough to hold the largest value
in the wide character representations for all locales. in the wide character representations for all locales.
.Pp .Pp
@ -89,17 +89,17 @@ but are lumped with a neighboring character.
There is always a distinguished There is always a distinguished
.Sq initial .Sq initial
shift state. shift state.
Some functions (e.g. Some functions (e.g.,
.Fn mblen , .Xr mblen 3 ,
.Fn mbtowc .Xr mbtowc 3
and and
.Fn wctomb ) .Xr wctomb 3 )
maintain static shift state internally, whereas maintain static shift state internally, whereas
others store in an others store it in an
.Vt mbstate_t .Vt mbstate_t
object passed by the caller. object passed by the caller.
Shift states are undefined after a call to Shift states are undefined after a call to
.Fn setlocale .Xr setlocale 3
with the with the
.Dv LC_CTYPE .Dv LC_CTYPE
or or
@ -118,22 +118,22 @@ Null bytes are not permitted within multibyte characters.
The C library provides the following functions for dealing with The C library provides the following functions for dealing with
multibyte characters: multibyte characters:
.Bl -column "Description" .Bl -column "Description"
.It Sy "Function Description" .It Sy "Function Description"
.It "mblen get number of bytes in a character" .It Xr mblen 3 Ta "get number of bytes in a character"
.It "mbrlen get number of bytes in a character (restartable)" .It Xr mbrlen 3 Ta "get number of bytes in a character (restartable)"
.It "mbrtowc convert a character to a wide-character code (restartable)" .It Xr mbrtowc 3 Ta "convert a character to a wide-character code (restartable)"
.It "mbsrtowcs convert a character string to a wide-character string (restartable)" .It Xr mbsrtowcs 3 Ta "convert a character string to a wide-character string (restartable)"
.It "mbstowcs convert a character string to a wide-character string" .It Xr mbstowcs 3 Ta "convert a character string to a wide-character string"
.It "mbtowc convert a character to a wide-character code" .It Xr mbtowc 3 Ta "convert a character to a wide-character code"
.It "wcrtomb convert a wide-character code to a character (restartable)" .It Xr wcrtomb 3 Ta "convert a wide-character code to a character (restartable)"
.It "wcstombs convert a wide-character string to a character string" .It Xr wcstombs 3 Ta "convert a wide-character string to a character string"
.It "wcsrtombs convert a wide-character string to a character string (restartable)" .It Xr wcsrtombs 3 Ta "convert a wide-character string to a character string (restartable)"
.It "wctomb convert a wide-character code to a character" .It Xr wctomb 3 Ta "convert a wide-character code to a character"
.El .El
.Sh SEE ALSO .Sh SEE ALSO
.Xr mklocale 1 , .Xr mklocale 1 ,
.Xr stdio 3 ,
.Xr setlocale 3 , .Xr setlocale 3 ,
.Xr stdio 3 ,
.Xr big5 5 , .Xr big5 5 ,
.Xr euc 5 , .Xr euc 5 ,
.Xr gb18030 5 , .Xr gb18030 5 ,

View File

@ -458,7 +458,7 @@ are documented in
Although the current implementation is otherwise thread-safe, using Although the current implementation is otherwise thread-safe, using
it in conjunction with it in conjunction with
.Fn gethostby* .Fn gethostby*
(see (see
.Xr gethostbyname 3 ) .Xr gethostbyname 3 )
or or
.Xr yp 8 .Xr yp 8

View File

@ -243,7 +243,11 @@ call fails if:
was not large enough to store the presentation form of the address. was not large enough to store the presentation form of the address.
.It Bq Er EAFNOSUPPORT .It Bq Er EAFNOSUPPORT
.Fa *src .Fa *src
was not an AF_INET or AF_INET6 family address. was not an
.Dv AF_INET
or
.Dv AF_INET6
family address.
.El .El
.Sh SEE ALSO .Sh SEE ALSO
.Xr addr2ascii 3 , .Xr addr2ascii 3 ,

View File

@ -399,7 +399,7 @@ to a buffer pointed to by
.Sh RETURN VALUES .Sh RETURN VALUES
The The
.Fn res_init .Fn res_init
function will return 0 on success, or -1 in a threaded program if function will return 0 on success, or \-1 in a threaded program if
per-thread storage could not be allocated. per-thread storage could not be allocated.
.Sh IMPLEMENTATION NOTES .Sh IMPLEMENTATION NOTES
This implementation of the resolver is thread-safe, but it will not This implementation of the resolver is thread-safe, but it will not

View File

@ -37,6 +37,8 @@
.Nm mac_get_file , .Nm mac_get_file ,
.Nm mac_get_link , .Nm mac_get_link ,
.Nm mac_get_fd , .Nm mac_get_fd ,
.Nm mac_get_peer ,
.Nm mac_get_pid ,
.Nm mac_get_proc .Nm mac_get_proc
.Nd get the label of a file, socket, socket peer or process .Nd get the label of a file, socket, socket peer or process
.Sh LIBRARY .Sh LIBRARY
@ -61,7 +63,7 @@ The
system call returns the label associated with a file specified by system call returns the label associated with a file specified by
pathname. pathname.
The The
.Fn mac_get_link .Fn mac_get_link
function is the same as function is the same as
.Fn mac_get_file , .Fn mac_get_file ,
except that it does not follow symlinks. except that it does not follow symlinks.
@ -86,7 +88,7 @@ The
and and
.Fn mac_get_proc .Fn mac_get_proc
system calls return the process label associated with an arbitrary system calls return the process label associated with an arbitrary
process id, or the current process. process ID, or the current process.
.Pp .Pp
Label storage for use with these calls must first be allocated and Label storage for use with these calls must first be allocated and
prepared using the prepared using the

View File

@ -84,7 +84,7 @@ implementation, they must be freed using
as as
.Xr mac_free 3 .Xr mac_free 3
is used only to free memory used for type is used only to free memory used for type
.Dv mac_t . .Vt mac_t .
.Sh ERRORS .Sh ERRORS
.Bl -tag -width Er .Bl -tag -width Er
.It Bq Er ENOMEM .It Bq Er ENOMEM

View File

@ -549,10 +549,9 @@ to represent the hex digits, and the letter
to separate the mantissa and exponent. to separate the mantissa and exponent.
.Pp .Pp
Note that there may be multiple valid ways to represent floating-point Note that there may be multiple valid ways to represent floating-point
numbers in this hexadecimal format. For example, numbers in this hexadecimal format.
.Li 0x3.24p+0 For example,
and .Li 0x3.24p+0 , 0x6.48p-1
.Li 0x6.48p-1
and and
.Li 0xc.9p-2 .Li 0xc.9p-2
are all equivalent. are all equivalent.

View File

@ -34,7 +34,7 @@
.\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd April 19, 1994 .Dd January 13, 2004
.Dt FFS 3 .Dt FFS 3
.Os .Os
.Sh NAME .Sh NAME

View File

@ -120,7 +120,7 @@ is zero,
will return immediately even if there is a will return immediately even if there is a
.Fa timeout .Fa timeout
specified unlike specified unlike
.Xr select 2 . .Xr select 2 .
If If
.Fa timeout .Fa timeout
is a non-NULL pointer, it specifies a maximum interval to wait is a non-NULL pointer, it specifies a maximum interval to wait
@ -345,7 +345,7 @@ The file referenced by the descriptor was renamed.
.It NOTE_REVOKE .It NOTE_REVOKE
Access to the file was revoked via Access to the file was revoked via
.Xr revoke 2 .Xr revoke 2
or the underlying filesystem was unmounted. or the underlying file system was unmounted.
.El .El
.Pp .Pp
On return, On return,
@ -530,7 +530,7 @@ It is currently not possible to watch a
that resides on anything but that resides on anything but
a UFS file system. a UFS file system.
.Pp .Pp
The The
.Dv EVFILT_NETDEV .Dv EVFILT_NETDEV
filter is currently only implemented for devices that use the filter is currently only implemented for devices that use the
.Xr miibus 4 .Xr miibus 4

View File

@ -82,24 +82,24 @@ The
.Fn nmount .Fn nmount
system call behaves similarly to system call behaves similarly to
.Fn mount , .Fn mount ,
except that the mount options (filesystem type name, device to mount, except that the mount options (file system type name, device to mount,
mount-point name, etc.) are passed as an array of name-value pairs mount-point name, etc.) are passed as an array of name-value pairs
in the array in the array
.Fa iov , .Fa iov ,
containing containing
.Fa niov .Fa niov
elements. elements.
The following options are required by all filesystems: The following options are required by all file systems:
.Bl -item -offset indent -compact .Bl -item -offset indent -compact
.It .It
.Li fstype Ta filesystem type name (e.g. Dq Li procfs ) .Li fstype Ta file system type name (e.g., Dq Li procfs )
.It .It
.Li fspath Ta mount point pathname (e.g. Dq Li /proc ) .Li fspath Ta mount point pathname (e.g., Dq Li /proc )
.El .El
.Pp .Pp
Depending on the filesystem type, other options may be Depending on the file system type, other options may be
recognized or required; recognized or required;
for example, most disk-based filesystems require a for example, most disk-based file systems require a
.Dq Li from .Dq Li from
option containing the pathname of a special device option containing the pathname of a special device
in addition to the options listed above. in addition to the options listed above.

View File

@ -65,11 +65,15 @@ succeeding locations will be examined.
The The
.Fa flags .Fa flags
argument may be specified as follows: argument may be specified as follows:
.Bd -literal .Pp
MS_ASYNC Return immediately .Bl -tag -width ".Dv MS_INVALIDATE" -compact
MS_SYNC Perform synchronous writes .It Dv MS_ASYNC
MS_INVALIDATE Invalidate all cached data Return immediately
.Ed .It Dv MS_SYNC
Perform synchronous writes
.It Dv MS_INVALIDATE
Invalidate all cached data
.El
.Sh RETURN VALUES .Sh RETURN VALUES
.Rv -std msync .Rv -std msync
.Sh ERRORS .Sh ERRORS
@ -80,7 +84,8 @@ will fail if:
.Bl -tag -width Er .Bl -tag -width Er
.It Bq Er EBUSY .It Bq Er EBUSY
Some or all of the pages in the specified region are locked and Some or all of the pages in the specified region are locked and
MS_INVALIDATE is specified. .Dv MS_INVALIDATE
is specified.
.It Bq Er EINVAL .It Bq Er EINVAL
The The
.Fa addr .Fa addr

View File

@ -246,7 +246,7 @@ or
.Dv O_EXLOCK .Dv O_EXLOCK
is specified but the underlying file system does not support locking. is specified but the underlying file system does not support locking.
.It Bq Er EOPNOTSUPP .It Bq Er EOPNOTSUPP
The named file is a special file mounted through a filesystem that The named file is a special file mounted through a file system that
does not support access to it (e.g. NFS). does not support access to it (e.g. NFS).
.It Bq Er EWOULDBLOCK .It Bq Er EWOULDBLOCK
.Dv O_NONBLOCK .Dv O_NONBLOCK

View File

@ -176,7 +176,7 @@ The specified time limit is negative.
.Sh SEE ALSO .Sh SEE ALSO
.Xr accept 2 , .Xr accept 2 ,
.Xr connect 2 , .Xr connect 2 ,
.Xr kqueue 2 , .Xr kqueue 2 ,
.Xr read 2 , .Xr read 2 ,
.Xr recv 2 , .Xr recv 2 ,
.Xr select 2 , .Xr select 2 ,

View File

@ -34,7 +34,8 @@ issue a series of
system calls to control the execution of the process, as well as access system calls to control the execution of the process, as well as access
process memory and register state. process memory and register state.
For the duration of the tracing session, the traced process will be For the duration of the tracing session, the traced process will be
"re-parented", with its parent process id (and resulting behavior) .Dq re-parented ,
with its parent process ID (and resulting behavior)
changed to the tracing process. changed to the tracing process.
It is permissible for a tracing process to attach to more than one It is permissible for a tracing process to attach to more than one
other process at a time. other process at a time.
@ -61,7 +62,7 @@ as a result of attaching, system calls, or stepping by the tracing
process. process.
The tracing process may choose to intercept the signal, using it to The tracing process may choose to intercept the signal, using it to
observe process behavior (such as observe process behavior (such as
.Dv SIGTRAP ), .Dv SIGTRAP ) ,
or forward the signal to the process if appropriate. or forward the signal to the process if appropriate.
The The
.Fn ptrace .Fn ptrace

View File

@ -165,10 +165,10 @@ The file was marked for non-blocking I/O,
and no data were ready to be read. and no data were ready to be read.
.It Bq Er EISDIR .It Bq Er EISDIR
The file descriptor is associated with a directory residing The file descriptor is associated with a directory residing
on a filesystem that does not allow regular read operations on on a file system that does not allow regular read operations on
directories (e.g. NFS). directories (e.g. NFS).
.It Bq Er EOPNOTSUPP .It Bq Er EOPNOTSUPP
The file descriptor is associated with a filesystem and file type that The file descriptor is associated with a file system and file type that
do not allow regular read operations on it. do not allow regular read operations on it.
.It Bq Er EOVERFLOW .It Bq Er EOVERFLOW
The file descriptor is associated with a regular file, The file descriptor is associated with a regular file,
@ -178,7 +178,7 @@ is greater than 0,
is before the end-of-file, and is before the end-of-file, and
.Fa offset .Fa offset
is greater than or equal to the offset maximum established is greater than or equal to the offset maximum established
for this filesystem. for this file system.
.El .El
.Pp .Pp
In addition, In addition,
@ -190,7 +190,7 @@ The
.Fa iovcnt .Fa iovcnt
argument argument
was less than or equal to 0, or greater than was less than or equal to 0, or greater than
.Li IOV_MAX . .Dv IOV_MAX .
.It Bq Er EINVAL .It Bq Er EINVAL
One of the One of the
.Fa iov_len .Fa iov_len

View File

@ -190,12 +190,16 @@ The remote host was down.
.It Bq Er ENETDOWN .It Bq Er ENETDOWN
The remote network was down. The remote network was down.
.It Bq Er EPERM .It Bq Er EPERM
The process using a SOCK_RAW socket was jailed and the source The process using a
address specified in the IP header did not match the IP .Dv SOCK_RAW
socket was jailed and the source
address specified in the IP header did not match the IP
address bound to the prison. address bound to the prison.
.It Bq Er EPIPE .It Bq Er EPIPE
The socket is unable to send anymore data (SBS_CANTSENDMORE has The socket is unable to send anymore data
been set on the socket). This typically means that the socket .Dv ( SBS_CANTSENDMORE
has been set on the socket).
This typically means that the socket
is not connected. is not connected.
.El .El
.Sh BUGS .Sh BUGS

View File

@ -89,9 +89,13 @@ variable pointed to by
The The
.Fa flags .Fa flags
argument has one possible value: argument has one possible value:
.Fa SF_NODISKIO . .Dv SF_NODISKIO .
This flag causes any sendfile call which would block on disk I/O to instead This flag causes any
return EBUSY. Busy servers may benefit by transferring requests that would .Fn sendfile
call which would block on disk I/O to instead
return
.Er EBUSY .
Busy servers may benefit by transferring requests that would
block to a separate I/O worker thread. block to a separate I/O worker thread.
.Pp .Pp
When using a socket marked for non-blocking I/O, When using a socket marked for non-blocking I/O,
@ -112,27 +116,30 @@ implementation of
is "zero-copy", meaning that it has been optimized so that copying of the file data is avoided. is "zero-copy", meaning that it has been optimized so that copying of the file data is avoided.
.Sh TUNING .Sh TUNING
Internally, this system call uses a special Internally, this system call uses a special
.Xr sendfile 2 .Fn sendfile
buffer buffer
.Pq Vt "struct sf_buf" .Pq Vt "struct sf_buf"
to handle sending file data to the client. to handle sending file data to the client.
If the sending socket is If the sending socket is
blocking, and there are not enough sendfile buffers available, blocking, and there are not enough
.Xr sendfile 2 .Fn sendfile
buffers available,
.Fn sendfile
will block and report a state of will block and report a state of
.Dq Li sfbufa . .Dq Li sfbufa .
If the sending socket is non-blocking and there are not enough If the sending socket is non-blocking and there are not enough
sendfile buffers available, the call will block and wait for the .Fn sendfile
buffers available, the call will block and wait for the
necessary buffers to become available before finishing the call. necessary buffers to become available before finishing the call.
.Pp .Pp
The number of The number of
.Vt sf_buf Ns 's .Vt sf_buf Ns 's
allocated should be proportional to the number of nmbclusters used to allocated should be proportional to the number of nmbclusters used to
send data to a client via send data to a client via
.Xr sendfile 2 . .Fn sendfile .
Tune accordingly to avoid blocking! Tune accordingly to avoid blocking!
Busy installations that make extensive use of Busy installations that make extensive use of
.Xr sendfile 2 .Fn sendfile
may want to increase these values to be inline with their may want to increase these values to be inline with their
.Va kern.ipc.nmbclusters .Va kern.ipc.nmbclusters
(see (see
@ -140,20 +147,25 @@ may want to increase these values to be inline with their
for details). for details).
.Pp .Pp
The number of The number of
.Xr sendfile 2 .Fn sendfile
buffers available is determined at boot time by either the buffers available is determined at boot time by either the
.Va kern.ipc.nsfbufs .Va kern.ipc.nsfbufs
.Xr loader.conf 5 .Xr loader.conf 5
variable or the variable or the
.Dv NSFBUFS .Dv NSFBUFS
kernel configuration tunable. kernel configuration tunable.
The number of sendfile buffers scales with The number of
.Fn sendfile
buffers scales with
.Va kern.maxusers . .Va kern.maxusers .
The
.Va kern.ipc.nsfbufsused .Va kern.ipc.nsfbufsused
and and
.Va kern.ipc.nsfbufspeak .Va kern.ipc.nsfbufspeak
read-only sysctl variables show current and peak read-only
.Xr sendfile 2 .Xr sysctl 8
variables show current and peak
.Fn sendfile
buffers usage respectively. buffers usage respectively.
These values may also be viewed through These values may also be viewed through
.Nm netstat Fl m . .Nm netstat Fl m .
@ -173,8 +185,11 @@ argument
is not a valid socket descriptor. is not a valid socket descriptor.
.It Bq Er EBUSY .It Bq Er EBUSY
Completing the entire transfer would have required disk I/O, so Completing the entire transfer would have required disk I/O, so
it was aborted. Partial data may have been sent. it was aborted.
(This error can only occur when SF_NODISKIO is specified.) Partial data may have been sent.
(This error can only occur when
.Dv SF_NODISKIO
is specified.)
.It Bq Er ENOTSOCK .It Bq Er ENOTSOCK
The The
.Fa s .Fa s
@ -208,7 +223,10 @@ An error occurred while reading from
.It Bq Er EFAULT .It Bq Er EFAULT
An invalid address was specified for an argument. An invalid address was specified for an argument.
.It Bq Er EINTR .It Bq Er EINTR
A signal interrupted sendfile before it could be completed. If specified, the number A signal interrupted
.Fn sendfile
before it could be completed.
If specified, the number
of bytes successfully sent will be returned in of bytes successfully sent will be returned in
.Fa *sbytes . .Fa *sbytes .
.It Bq Er EAGAIN .It Bq Er EAGAIN

View File

@ -116,11 +116,11 @@ All I/O to the file system is done synchronously.
No file system I/O is done synchronously. No file system I/O is done synchronously.
.It Dv MNT_SOFTDEP .It Dv MNT_SOFTDEP
Soft updates being done (see Soft updates being done (see
.Xr ffs 7). .Xr ffs 7 ) .
.It Dv MNT_SUIDDIR .It Dv MNT_SUIDDIR
Special handling of SUID bit on directories. Special handling of SUID bit on directories.
.It Dv MNT_UNION .It Dv MNT_UNION
Union with underlying filesystem. Union with underlying file system.
.It Dv MNT_NOSYMFOLLOW .It Dv MNT_NOSYMFOLLOW
Symbolic links are not followed. Symbolic links are not followed.
.It Dv MNT_NOCLUSTERR .It Dv MNT_NOCLUSTERR
@ -132,7 +132,7 @@ Write clustering is disabled.
.It Dv MNT_MULTILABEL .It Dv MNT_MULTILABEL
Mandatory Access Control (MAC) support for individual objects Mandatory Access Control (MAC) support for individual objects
(see (see
.Xr mac 4). .Xr mac 4 ) .
.It Dv MNT_ACLS .It Dv MNT_ACLS
Access Control List (ACL) support enabled. Access Control List (ACL) support enabled.
.It Dv MNT_LOCAL .It Dv MNT_LOCAL