diff options
Diffstat (limited to 'lib/libc')
85 files changed, 235 insertions, 220 deletions
diff --git a/lib/libc/compat-43/sigpause.2 b/lib/libc/compat-43/sigpause.2 index 619406b29269..6aa52522cd47 100644 --- a/lib/libc/compat-43/sigpause.2 +++ b/lib/libc/compat-43/sigpause.2 @@ -61,7 +61,7 @@ signals are to be blocked. always terminates by being interrupted, returning -1 with .Va errno set to -.Dv EINTR +.Er EINTR .Sh SEE ALSO .Xr kill 2 , .Xr sigaction 2 , diff --git a/lib/libc/compat-43/sigvec.2 b/lib/libc/compat-43/sigvec.2 index de665e49c57e..1ec52ae59d65 100644 --- a/lib/libc/compat-43/sigvec.2 +++ b/lib/libc/compat-43/sigvec.2 @@ -204,7 +204,7 @@ of the signal are ignored and discarded. If a signal is caught during the system calls listed below, the call is normally restarted. The call can be forced to terminate prematurely with an -.Dv EINTR +.Er EINTR error return by setting the .Dv SV_INTERRUPT bit in @@ -296,7 +296,7 @@ or .Xr signal 3 , .Xr sigsetops 3 , .Xr tty 4 -.Sh EXAMPLE +.Sh EXAMPLES On the .Tn VAX\-11 The handler routine can be declared: diff --git a/lib/libc/gen/basename.3 b/lib/libc/gen/basename.3 index 7ed2b1fbd7c4..c6192d9f2da7 100644 --- a/lib/libc/gen/basename.3 +++ b/lib/libc/gen/basename.3 @@ -95,5 +95,5 @@ The .Fn basename function first appeared in .Ox 2.2 . -.Sh AUTHOR +.Sh AUTHORS Todd C. Miller <Todd.Miller@courtesan.com> diff --git a/lib/libc/gen/dirname.3 b/lib/libc/gen/dirname.3 index f209019ee63f..df74907a155a 100644 --- a/lib/libc/gen/dirname.3 +++ b/lib/libc/gen/dirname.3 @@ -102,5 +102,5 @@ The .Fn dirname function first appeared in .Ox 2.2 . -.Sh AUTHOR +.Sh AUTHORS Todd C. Miller <Todd.Miller@courtesan.com> diff --git a/lib/libc/gen/dllockinit.3 b/lib/libc/gen/dllockinit.3 index ca3c837a3521..69ed9b71224a 100644 --- a/lib/libc/gen/dllockinit.3 +++ b/lib/libc/gen/dllockinit.3 @@ -111,4 +111,5 @@ with all arguments .Sh HISTORY The .Nm -function first appeared in FreeBSD 4.0. +function first appeared in +.Fx 4.0 . diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3 index 9cac9513692e..4489c03c5db9 100644 --- a/lib/libc/gen/fts.3 +++ b/lib/libc/gen/fts.3 @@ -56,7 +56,7 @@ .Fn fts_close "FTS *ftsp" .Sh DESCRIPTION The -.Nm fts +.Nm functions are provided for traversing .Tn UNIX file hierarchies. @@ -66,7 +66,7 @@ function returns a .Dq handle on a file hierarchy, which is then supplied to the other -.Nm fts +.Nm functions. The function .Fn fts_read @@ -262,13 +262,13 @@ field are undefined. .It Fa fts_number This field is provided for the use of the application program and is not modified by the -.Nm fts +.Nm functions. It is initialized to 0. .It Fa fts_pointer This field is provided for the use of the application program and is not modified by the -.Nm fts +.Nm functions. It is initialized to .Dv NULL . @@ -368,7 +368,7 @@ followed immediately whether or not is also specified. .It Dv FTS_LOGICAL This option causes the -.Nm fts +.Nm routines to return .Fa FTSENT structures for the targets of symbolic links @@ -387,14 +387,14 @@ be provided to the function. .It Dv FTS_NOCHDIR As a performance optimization, the -.Nm fts +.Nm functions change directories as they walk the file hierarchy. This has the side-effect that an application cannot rely on being in any particular directory during the traversal. The .Dv FTS_NOCHDIR option turns off this optimization, and the -.Nm fts +.Nm functions will not change the current directory. Note that applications should not themselves change their current directory and try to access files unless @@ -410,7 +410,7 @@ structures reference file characteristic information (the field) for each file visited. This option relaxes that requirement as a performance optimization, allowing the -.Nm fts +.Nm functions to set the .Fa fts_info field to @@ -420,7 +420,7 @@ and leave the contents of the field undefined. .It Dv FTS_PHYSICAL This option causes the -.Nm fts +.Nm routines to return .Fa FTSENT structures for symbolic links themselves instead @@ -446,13 +446,13 @@ or .Ql .. encountered in the file hierarchy are ignored. This option causes the -.Nm fts +.Nm routines to return .Fa FTSENT structures for them. .It Dv FTS_XDEV This option prevents -.Nm fts +.Nm from descending into directories that have a different device number than the file from which the descent began. .El @@ -751,7 +751,7 @@ The options were invalid. .Xr qsort 3 .Sh STANDARDS The -.Nm fts +.Nm utility is expected to be included in a future .St -p1003.1-88 revision. diff --git a/lib/libc/gen/getvfsbyname.3 b/lib/libc/gen/getvfsbyname.3 index 41167bda1fba..df7511e834f2 100644 --- a/lib/libc/gen/getvfsbyname.3 +++ b/lib/libc/gen/getvfsbyname.3 @@ -71,12 +71,7 @@ flag bits that are used to initialize a new mount point using the filesystem .El .Sh RETURN VALUES -If the call to -.Nm getvfsbyname -is successful, 0 is returned. -Otherwise \-1 is returned and -.Va errno -is set appropriately. +.Rv -std getvfsbyname .Sh ERRORS The following errors may be reported: .Bl -tag -width Er diff --git a/lib/libc/gen/getvfsent.3 b/lib/libc/gen/getvfsent.3 index 67862b5661a9..8555ca234403 100644 --- a/lib/libc/gen/getvfsent.3 +++ b/lib/libc/gen/getvfsent.3 @@ -154,6 +154,7 @@ may be set to one of the values documented for .Xr mount 2 , .Xr mount 8 .Sh AUTHORS +.An -nosplit The loadable filesystem support was written by .An Garrett A. Wollman , based on generic loadable kernel module support by diff --git a/lib/libc/gen/glob.3 b/lib/libc/gen/glob.3 index 954dba2580f3..b2f2b80e0136 100644 --- a/lib/libc/gen/glob.3 +++ b/lib/libc/gen/glob.3 @@ -47,7 +47,7 @@ .Fd #include <glob.h> .Ft int .Fn glob "const char *pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t *pglob" -.Ft void +.Ft void .Fn globfree "glob_t *pglob" .Sh DESCRIPTION The @@ -99,7 +99,7 @@ field, and a pointer to a list of pointers to pathnames into the .Fa gl_pathv field. The first pointer after the last pathname is -.Dv NULL . +.Dv NULL . If the pattern does not match any pathnames, the returned number of matched paths is set to zero. .Pp @@ -220,33 +220,33 @@ This extension is provided to allow programs such as .Xr restore 8 to provide globbing from directories stored on tape. .It Dv GLOB_BRACE -Pre-process the pattern string to expand -.Ql {pat,pat,...} -strings like +Pre-process the pattern string to expand +.Ql {pat,pat,...} +strings like .Xr csh 1 . -The pattern +The pattern .Ql {} is left unexpanded for historical reasons (and -.Xr csh 1 -does the same thing to +.Xr csh 1 +does the same thing to ease typing -of -.Xr find 1 +of +.Xr find 1 patterns). .It Dv GLOB_MAGCHAR Set by the .Fn glob function if the pattern included globbing characters. -See the description of the usage of the +See the description of the usage of the .Fa gl_matchc structure member for more details. .It Dv GLOB_NOMAGIC -Is the same as -.Dv GLOB_NOCHECK +Is the same as +.Dv GLOB_NOCHECK but it only appends the .Fa pattern if it does not contain any of the special characters ``*'', ``?'' or ``[''. -.Dv GLOB_NOMAGIC +.Dv GLOB_NOMAGIC is provided to simplify implementing the historic .Xr csh 1 globbing behavior and should probably not be used anywhere else. @@ -266,7 +266,7 @@ If, during the search, a directory is encountered that cannot be opened or read and .Fa errfunc is -.Pf non- Dv NULL , +.Pf non- Dv NULL , .Fn glob calls .Fa (*errfunc)(path, errno) . @@ -281,9 +281,9 @@ is not a directory, resulting in a call to .Fa errfunc . The error routine can suppress this action by testing for -.Dv ENOENT +.Er ENOENT and -.Dv ENOTDIR ; +.Er ENOTDIR ; however, the .Dv GLOB_ERR flag will still cause an immediate @@ -333,16 +333,16 @@ contain the values described below: .Bl -tag -width GLOB_NOCHECK .It Fa gl_pathc contains the total number of matched pathnames so far. -This includes other matches from previous invocations of +This includes other matches from previous invocations of .Fn glob -if +if .Dv GLOB_APPEND was specified. .It Fa gl_matchc contains the number of matched pathnames in the current invocation of .Fn glob . .It Fa gl_flags -contains a copy of the +contains a copy of the .Fa flags parameter with the bit .Dv GLOB_MAGCHAR @@ -352,7 +352,7 @@ contained any of the special characters ``*'', ``?'' or ``['', cleared if not. .It Fa gl_pathv contains a pointer to a -.Dv NULL Ns -terminated +.Dv NULL Ns -terminated list of matched pathnames. However, if .Fa gl_pathc @@ -416,9 +416,9 @@ that the flags .Dv GLOB_QUOTE, and .Dv GLOB_TILDE, -and the fields +and the fields .Fa gl_matchc -and +and .Fa gl_flags should not be used by applications striving for strict .Tn POSIX diff --git a/lib/libc/gen/msgrcv.3 b/lib/libc/gen/msgrcv.3 index 21c9c3e87827..5662c3962ee4 100644 --- a/lib/libc/gen/msgrcv.3 +++ b/lib/libc/gen/msgrcv.3 @@ -198,7 +198,7 @@ is set in .Sh BUGS .Tn NetBSD and -.Tn FreeBSD +.Fx do not define the .Er EIDRM error value, which should be used in diff --git a/lib/libc/gen/msgsnd.3 b/lib/libc/gen/msgsnd.3 index 9d445d51b18c..28c3a425b4ff 100644 --- a/lib/libc/gen/msgsnd.3 +++ b/lib/libc/gen/msgsnd.3 @@ -161,7 +161,7 @@ The system call was interrupted by the delivery of a signal. .Sh BUGS .Tn NetBSD and -.Tn FreeBSD +.Fx do not define the .Er EIDRM error value, which should be used diff --git a/lib/libc/gen/popen.3 b/lib/libc/gen/popen.3 index bfb635093854..c05978e88b84 100644 --- a/lib/libc/gen/popen.3 +++ b/lib/libc/gen/popen.3 @@ -123,7 +123,7 @@ function waits for the associated process to terminate and returns the exit status of the command as returned by .Fn wait4 . -.Sh RETURN VALUE +.Sh RETURN VALUES The .Fn popen function returns @@ -196,7 +196,6 @@ and a .Fn pclose function appeared in .At v7 . -.br +.Pp Bidirectional functionality was added in -.Tn FreeBSD -2.2.6. +.Fx 2.2.6 . diff --git a/lib/libc/gen/setproctitle.3 b/lib/libc/gen/setproctitle.3 index da204f2c7c01..eed8f810af9b 100644 --- a/lib/libc/gen/setproctitle.3 +++ b/lib/libc/gen/setproctitle.3 @@ -93,6 +93,7 @@ first appeared in Other operating systems have similar functions. .Sh AUTHORS +.An -nosplit .An Peter Wemm Aq peter@FreeBSD.org stole the idea from the .Sy "Sendmail 8.7.3" diff --git a/lib/libc/gen/shm_open.3 b/lib/libc/gen/shm_open.3 index d8af8794529e..81e85e848d1e 100644 --- a/lib/libc/gen/shm_open.3 +++ b/lib/libc/gen/shm_open.3 @@ -47,13 +47,13 @@ .Fn shm_unlink "const char *path" .Sh DESCRIPTION The -.Nm shm_open +.Fn shm_open function opens (or optionally creates) a .Tn POSIX shared memory object named .Fa path . The -.Nm shm_unlink +.Fn shm_unlink function removes a shared memory object named .Fa path . .Pp @@ -63,9 +63,9 @@ implementation, .Tn POSIX shared memory objects are implemented as ordinary files. The -.Nm shm_open +.Fn shm_open and -.Nm shm_unlink +.Fn shm_unlink act as wrappers around the .Xr open 2 and @@ -87,7 +87,7 @@ In addition, the implementation causes .Fn mmap of a descriptor returned by -.Nm shm_open +.Fn shm_open to behave as if the .Dv MAP_NOSYNC flag had been specified to @@ -96,11 +96,11 @@ flag had been specified to .Xr fcntl 2 . ) .Pp The -.Nm shm_unlink +.Fn shm_unlink function makes no effort to ensure that .Fa path refers to a shared memory object. -.Sh PORTABILITY +.Sh COMPATIBILITY The .Fa path argument does not necessarily represent a pathname (although it does in this @@ -173,16 +173,16 @@ specifies an access mode of .Xr unlink 2 .Sh STANDARDS The -.Nm shm_open +.Fn shm_open and -.Nm shm_unlink +.Fn shm_unlink functions are believed to conform to .St -p1003.1b . .Sh HISTORY The -.Nm shm_open +.Fn shm_open and -.Nm shm_unlink +.Fn shm_unlink functions first appeared in .Fx 5.0 . .Sh AUTHORS @@ -191,4 +191,3 @@ functions first appeared in .Pp .An Matthew Dillon Aq dillon@FreeBSD.org .Pq Dv MAP_NOSYNC - diff --git a/lib/libc/gen/siginterrupt.3 b/lib/libc/gen/siginterrupt.3 index 4c3873299566..102c04e93b1e 100644 --- a/lib/libc/gen/siginterrupt.3 +++ b/lib/libc/gen/siginterrupt.3 @@ -58,7 +58,7 @@ System call restart has been the default behavior since and is the default behaviour for .Xr signal 3 on -.Tn FreeBSD . +.Fx . .Pp If the flag is true (1), then restarting of system calls is disabled. @@ -67,7 +67,7 @@ and no data has been transferred, the system call will return \-1 with the global variable .Va errno set to -.Dv EINTR . +.Er EINTR . Interrupted system calls that have started transferring data will return the amount of data actually transferred. System call interrupt is the signal behavior found on @@ -110,5 +110,5 @@ A \-1 value indicates that an invalid signal number has been supplied. .Sh HISTORY The .Fn siginterrupt -function appeared in +function appeared in .Bx 4.3 . diff --git a/lib/libc/gen/signal.3 b/lib/libc/gen/signal.3 index e0dc9e6583d4..f453ed8f26c9 100644 --- a/lib/libc/gen/signal.3 +++ b/lib/libc/gen/signal.3 @@ -46,10 +46,12 @@ .\" fix it. .Ft void \*(lp* .Fn signal "int sig" "void \*(lp*func\*(rp\*(lpint\*(rp\*(rp\*(rp\*(lpint" - -or in FreeBSD's equivalent but easier to read typedef'd version: +.Pp +or in +.Fx Ns 's +equivalent but easier to read typedef'd version: .Ft typedef "void \*(lp*sig_t\*(rp \*(lpint\*(rp" -.Ft sig_t +.Ft sig_t .Fn signal "int sig" "sig_t func" .Sh DESCRIPTION This @@ -230,6 +232,6 @@ or .Xr tty 4 .Sh HISTORY This -.Nm signal -facility appeared in +.Fn signal +facility appeared in .Bx 4.0 . diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3 index 5ed1261283b5..6169e260016a 100644 --- a/lib/libc/gen/sysctl.3 +++ b/lib/libc/gen/sysctl.3 @@ -57,7 +57,7 @@ The information available from .Fn sysctl consists of integers, strings, and tables. Information may be retrieved and set from the command interface -using the +using the .Xr sysctl 8 utility. .Pp @@ -91,18 +91,20 @@ The size of the buffer is given by the location specified by .Fa oldlenp before the call, and that location gives the amount of data copied after a successful call -and after a call that returns with the error code ENOMEM. +and after a call that returns with the error code +.Er ENOMEM . If the amount of data available is greater than the size of the buffer supplied, the call supplies as much data as fits in the buffer provided -and returns with the error code ENOMEM. +and returns with the error code +.Er ENOMEM . If the old value is not desired, .Fa oldp and .Fa oldlenp should be set to NULL. .Pp -The size of the available data can be determined by calling +The size of the available data can be determined by calling .Fn sysctl with a NULL parameter for .Fa oldp . @@ -177,9 +179,9 @@ Each time it runs, .Fn sysctl gets the list of debugging variables from the kernel and displays their current values. -The system defines twenty +The system defines twenty .Ns ( Va struct ctldebug ) -variables named +variables named .Nm debug0 through .Nm debug19 . @@ -238,7 +240,6 @@ The machine class. The machine model .It Li HW_NCPU The number of cpus. -.ne 1i .It Li HW_BYTEORDER The byteorder (4,321, or 1,234). .It Li HW_PHYSMEM @@ -294,7 +295,6 @@ information. .It KERN\_VERSION string no .It KERN\_VNODE struct vnode no .El -.ne 1i .Pp .Bl -tag -width "123456" .It Li KERN_ARGMAX @@ -381,8 +381,9 @@ The third and fourth level names are as follows: Return profiling information about the kernel. If the kernel is not compiled for profiling, attempts to retrieve any of the KERN_PROF values will -fail with EOPNOTSUPP. -The third level names for the string and integer profiling information +fail with +.Er EOPNOTSUPP . +The third level names for the string and integer profiling information is detailed below. The changeable column shows whether a process with appropriate privilege may change the value. @@ -411,7 +412,6 @@ describing destination of calls and their counts. .It Li GPROF_GMONPARAM Structure giving the sizes of the above arrays. .El -.ne 1i .It Li KERN_QUANTUM The maximum period of time, in microseconds, for which a process is allowed to run without being preempted if other processes are in the run queue. @@ -481,7 +481,6 @@ Get or set various global information about the IPv4 The third level name is the protocol. The fourth level name is the variable name. The currently defined protocols and names are: -.ne 1i .Bl -column ProtocolXX VariableXX TypeXX ChangeableXX .It Pa Protocol Variable Type Changeable .It icmp bmcastecho integer yes @@ -495,7 +494,7 @@ The currently defined protocols and names are: The variables are as follows: .Bl -tag -width "123456" .It Li icmp.bmcastecho -Returns 1 if an ICMP echo request to a broadcast or multicast address is +Returns 1 if an ICMP echo request to a broadcast or multicast address is to be answered. .It Li icmp.maskrepl Returns 1 if ICMP network mask requests are to be answered. @@ -617,7 +616,6 @@ The version of POSIX 1003.2 with which the system attempts to comply. .It Li USER_RE_DUP_MAX The maximum number of repeated occurrences of a regular expression permitted when using interval notation. -.ne 1i .It Li USER_STREAM_MAX The minimum maximum number of streams that a process may have open at any one time. @@ -642,7 +640,7 @@ privilege may change the value. .It VM\_V\_FREE\_RESERVED integer yes .It VM\_V\_FREE\_TARGET integer yes .It VM\_V\_INACTIVE\_TARGET integer yes -.It VM\_V\_PAGEOUT\_FREE\_MIN integer yes +.It VM\_V\_PAGEOUT\_FREE\_MIN integer yes .El .Pp .Bl -tag -width "123456" diff --git a/lib/libc/gen/tcsetpgrp.3 b/lib/libc/gen/tcsetpgrp.3 index 4f4b48b6c02e..a7d3409f598b 100644 --- a/lib/libc/gen/tcsetpgrp.3 +++ b/lib/libc/gen/tcsetpgrp.3 @@ -47,7 +47,7 @@ .Fn tcsetpgrp "int fd" "pid_t pgrp_id" .Sh DESCRIPTION If the process has a controlling terminal, the -.Nm tcsetpgrp +.Fn tcsetpgrp function sets the foreground process group ID associated with the terminal device to .Fa pgrp_id . @@ -60,16 +60,12 @@ The value of .Fa pgrp_id must be the same as the process group ID of a process in the same session as the calling process. -.Pp -Upon successful completion, -.Nm tcsetpgrp -returns a value of zero. +.Sh RETURN VALUES +.Rv -std tcsetpgrp .Sh ERRORS -If an error occurs, -.Nm tcsetpgrp -returns -1 and the global variable -.Va errno -is set to indicate the error, as follows: +The +.Fn tcsetpgrp +function will fail if: .Bl -tag -width Er .It Bq Er EBADF The @@ -97,7 +93,7 @@ session as the calling process. .Xr tcgetpgrp 3 .Sh STANDARDS The -.Nm tcsetpgprp +.Fn tcsetpgrp function is expected to be compliant with the .St -p1003.1-88 specification. diff --git a/lib/libc/gen/timezone.3 b/lib/libc/gen/timezone.3 index f50782734fb1..a30cb978f91d 100644 --- a/lib/libc/gen/timezone.3 +++ b/lib/libc/gen/timezone.3 @@ -44,12 +44,12 @@ .Ft char * .Fn timezone "int zone" "int dst" .Sh DESCRIPTION -.ft B +.Bf Sy This interface is for compatibility only; it is impossible to reliably map timezone's arguments to a time zone abbreviation. See .Xr ctime 3 . -.ft P +.Ef .Pp The .Fn timezone diff --git a/lib/libc/gen/unvis.3 b/lib/libc/gen/unvis.3 index f5bb169168dd..62ff378acf9c 100644 --- a/lib/libc/gen/unvis.3 +++ b/lib/libc/gen/unvis.3 @@ -160,7 +160,7 @@ if (unvis(&out, (char)0, &state, UNVIS_END) == UNVIS_VALID) .Xr vis 1 .Sh HISTORY The -.Nm unvis +.Fn unvis function first appeared in .Bx 4.4 . diff --git a/lib/libc/i386/sys/i386_get_ldt.2 b/lib/libc/i386/sys/i386_get_ldt.2 index 5aec1bf56a19..d6743c4e3a34 100644 --- a/lib/libc/i386/sys/i386_get_ldt.2 +++ b/lib/libc/i386/sys/i386_get_ldt.2 @@ -98,7 +98,7 @@ or The caller attempted to use a descriptor that would circumvent protection or cause a failure. .El -.Sh REFERENCES +.Sh SEE ALSO i386 Microprocessor Programmer's Reference Manual, Intel .Sh WARNING You can really hose your process using this. diff --git a/lib/libc/locale/rune.3 b/lib/libc/locale/rune.3 index d1e9fef180c4..087ef4ca896e 100644 --- a/lib/libc/locale/rune.3 +++ b/lib/libc/locale/rune.3 @@ -214,18 +214,18 @@ The .Fn setrunelocale function returns one of the following values: .Bl -tag -width Er -.It Dv 0 +.It Er 0 .Fn setrunelocale was successful. -.It Er EFAULT +.It Bq Er EFAULT .Fa locale was .Dv NULL . -.It Er ENOENT +.It Bq Er ENOENT The locale could not be found. -.It Er EFTYPE +.It Bq Er EFTYPE The file found was not a valid file. -.It Er EINVAL +.It Bq Er EINVAL The encoding indicated by the locale was unknown. .El .Pp diff --git a/lib/libc/net/ethers.3 b/lib/libc/net/ethers.3 index 46f0e4fc02cb..638925e001d1 100644 --- a/lib/libc/net/ethers.3 +++ b/lib/libc/net/ethers.3 @@ -193,6 +193,6 @@ functions returns values that are stored in static memory areas which may be overwritten the next time they are called. .Sh HISTORY This particular implementation of the -.Nm ethers +.Nm library functions were written for and first appeared in .Fx 2.1 . diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3 index 1a0b5f4cd10f..797c83d6ca37 100644 --- a/lib/libc/net/getaddrinfo.3 +++ b/lib/libc/net/getaddrinfo.3 @@ -411,7 +411,7 @@ Similarly, if it resolves to IPv6, socket is used. Observe that there is no hardcoded reference to particular address family. The code works even if -.Nm getaddrinfo +.Fn getaddrinfo returns addresses that are not IPv4/v6. .Bd -literal -offset indent struct addrinfo hints, *res, *res0; diff --git a/lib/libc/net/getservent.3 b/lib/libc/net/getservent.3 index f7c1dcb8ddda..06b2d5044be2 100644 --- a/lib/libc/net/getservent.3 +++ b/lib/libc/net/getservent.3 @@ -128,7 +128,6 @@ is encountered. If a protocol name is also supplied (non- .Dv NULL ) , searches must also match the protocol. -.ne 1i .Sh FILES .Bl -tag -width /etc/services -compact .It Pa /etc/services diff --git a/lib/libc/net/inet.3 b/lib/libc/net/inet.3 index 2c7069de39e7..b04d3838bda2 100644 --- a/lib/libc/net/inet.3 +++ b/lib/libc/net/inet.3 @@ -235,17 +235,17 @@ for malformed requests. .Re .Sh STANDARDS The -.Nm inet_ntop +.Fn inet_ntop and -.Nm inet_pton +.Fn inet_pton functions conform to .St -xns5.2d2.0 . Note that -.Nm inet_pton +.Fn inet_pton does not accept 1-, 2-, or 3-part dotted addresses; all four parts must be specified. This is a narrower input set than that accepted by -.Nm inet_aton . +.Fn inet_aton . .Sh HISTORY These functions appeared in diff --git a/lib/libc/net/rcmd.3 b/lib/libc/net/rcmd.3 index 63f7fb549358..899bd9e55d75 100644 --- a/lib/libc/net/rcmd.3 +++ b/lib/libc/net/rcmd.3 @@ -258,7 +258,7 @@ It returns -1 on error with the global value .Va errno set according to the reason for failure. The error code -.Dv EAGAIN +.Er EAGAIN is overloaded to mean ``All network ports in use.'' .Sh SEE ALSO .Xr rlogin 1 , diff --git a/lib/libc/nls/catopen.3 b/lib/libc/nls/catopen.3 index 272fe7e0d319..68cf8930935b 100644 --- a/lib/libc/nls/catopen.3 +++ b/lib/libc/nls/catopen.3 @@ -123,7 +123,7 @@ remains valid in a process until that process closes it, or until a successful call to one of the .Xr exec 3 function. -.Sh RETURN VALUE +.Sh RETURN VALUES Upon successful completion, .Fn catopen returns a message catalog descriptor. diff --git a/lib/libc/rpc/bindresvport.3 b/lib/libc/rpc/bindresvport.3 index c68a91bc67b0..b71339822dc4 100644 --- a/lib/libc/rpc/bindresvport.3 +++ b/lib/libc/rpc/bindresvport.3 @@ -7,7 +7,7 @@ .Sh NAME .Nm bindresvport , .Nm bindresvport_sa -.Ndbind a socket to a privileged IP port +.Nd bind a socket to a privileged IP port .Sh SYNOPSIS .Fd #include <rpc/rpc.h> .Ft int diff --git a/lib/libc/rpc/getrpcent.3 b/lib/libc/rpc/getrpcent.3 index eef8067456b1..208e5d0ea104 100644 --- a/lib/libc/rpc/getrpcent.3 +++ b/lib/libc/rpc/getrpcent.3 @@ -57,7 +57,7 @@ The .Fn getrpcent function reads the next line of the file, opening the file if necessary. The -.Nm getrpcent +.Fn setrpcent function opens and rewinds the file. If the .Fa stayopen flag is non-zero, diff --git a/lib/libc/stdio/fclose.3 b/lib/libc/stdio/fclose.3 index 16cec8b107b0..26ff25dad2a5 100644 --- a/lib/libc/stdio/fclose.3 +++ b/lib/libc/stdio/fclose.3 @@ -81,7 +81,9 @@ or does not handle NULL arguments; they will result in a segmentation violation. This is intentional - it makes it easier to make sure programs written -under FreeBSD are bug free. +under +.Fx +are bug free. This behaviour is an implementation detail, and programs should not rely upon it. .Sh SEE ALSO diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index 088e9e38a13b..c64038f7ff38 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -558,7 +558,6 @@ a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result. .Pp .Sh EXAMPLES -.br To print a date and time in the form `Sunday, July 3, 10:02', where .Em weekday diff --git a/lib/libc/stdio/stdio.3 b/lib/libc/stdio/stdio.3 index f623ec7b6968..e0b1659e19c2 100644 --- a/lib/libc/stdio/stdio.3 +++ b/lib/libc/stdio/stdio.3 @@ -159,7 +159,7 @@ Alternatively, these defaults may be modified via the function. .Pp The -.Nm stdio +.Nm library is a part of the library .Nm libc and routines are automatically loaded as needed by the C compiler. @@ -223,7 +223,7 @@ library and system functions, especially .Xr vfork 2 . .Sh STANDARDS The -.Nm stdio +.Nm library conforms to .St -ansiC . .Sh LIST OF FUNCTIONS diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3 index f6d1209c79e6..4753dfb6c578 100644 --- a/lib/libc/stdlib/getenv.3 +++ b/lib/libc/stdlib/getenv.3 @@ -150,7 +150,9 @@ assigning a differently sized .Ar value to the same .Ar name -will result in a memory leak. The FreeBSD semantics for these functions +will result in a memory leak. The +.Fx +semantics for these functions (namely, that the contents of .Ar value are copied and that old values remain accessible indefinitely) make this diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3 index ec504fec91ba..161492437189 100644 --- a/lib/libc/stdlib/getopt.3 +++ b/lib/libc/stdlib/getopt.3 @@ -172,7 +172,7 @@ function multiple times. This is an extension to the .St -p1003.2 specification. -.Sh EXAMPLE +.Sh EXAMPLES .Bd -literal -compact int bflag, ch, fd; diff --git a/lib/libc/stdlib/getsubopt.3 b/lib/libc/stdlib/getsubopt.3 index 550cfb377d8d..1efd64ef1a48 100644 --- a/lib/libc/stdlib/getsubopt.3 +++ b/lib/libc/stdlib/getsubopt.3 @@ -95,7 +95,7 @@ The argument will be set to point to the ``value'' portion of the token, or .Dv NULL if no ``value'' portion was present. -.Sh EXAMPLE +.Sh EXAMPLES .Bd -literal -compact char *tokens[] = { #define ONE 0 diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index 4f6b9ef5f13e..03feaa37a01b 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -123,7 +123,8 @@ The .Fn reallocf function call is identical to the realloc function call, except that it will free the passed pointer when the requested memory cannot be allocated. -This is a FreeBSD +This is a +.Fx specific API designed to ease the problems with traditional coding styles for realloc causing memory leaks in libraries. .Pp diff --git a/lib/libc/stdlib/strtod.3 b/lib/libc/stdlib/strtod.3 index c9a60192f0ec..6a2dc52b1577 100644 --- a/lib/libc/stdlib/strtod.3 +++ b/lib/libc/stdlib/strtod.3 @@ -90,12 +90,12 @@ is stored in the location referenced by If the correct value would cause overflow, plus or minus .Dv HUGE_VAL is returned (according to the sign of the value), and -.Dv ERANGE +.Er ERANGE is stored in .Va errno . If the correct value would cause underflow, zero is returned and -.Dv ERANGE +.Er ERANGE is stored in .Va errno . .Sh ERRORS diff --git a/lib/libc/stdtime/strptime.3 b/lib/libc/stdtime/strptime.3 index bab8954e8d59..f04521998196 100644 --- a/lib/libc/stdtime/strptime.3 +++ b/lib/libc/stdtime/strptime.3 @@ -87,8 +87,7 @@ The function has been contributed by Powerdog Industries. .Pp This man page was written by -.ie t J\(:org Wunsch. -.el Joerg Wunsch. +.An J\(:org Wunsch . .Sh HISTORY The .Fn strptime diff --git a/lib/libc/stdtime/time2posix.3 b/lib/libc/stdtime/time2posix.3 index 8930c319ad77..edef39779ff8 100644 --- a/lib/libc/stdtime/time2posix.3 +++ b/lib/libc/stdtime/time2posix.3 @@ -87,21 +87,23 @@ and its conversion to, and back from, the POSIX representation over the leap second inserted at the end of June, 1993. -.ta \w'93/06/30 'u +\w'23:59:59 'u +\w'A+0 'u +\w'X=time2posix(T) 'u -DATE TIME T X=time2posix(T) posix2time(X) -93/06/30 23:59:59 A+0 B+0 A+0 -93/06/30 23:59:60 A+1 B+1 A+1 or A+2 -93/07/01 00:00:00 A+2 B+1 A+1 or A+2 -93/07/01 00:00:01 A+3 B+2 A+3 - +.Bl -column "93/06/30" "23:59:59" "A+0" "X=time2posix(T)" +.It Sy DATE TIME T X=time2posix(T) posix2time(X) +.It 93/06/30 23:59:59 A+0 B+0 A+0 +.It 93/06/30 23:59:60 A+1 B+1 A+1 or A+2 +.It 93/07/01 00:00:00 A+2 B+1 A+1 or A+2 +.It 93/07/01 00:00:01 A+3 B+2 A+3 +.El +.Pp A leap second deletion would look like... - -DATE TIME T X=time2posix(T) posix2time(X) -??/06/30 23:59:58 A+0 B+0 A+0 -??/07/01 00:00:00 A+1 B+2 A+1 -??/07/01 00:00:01 A+2 B+3 A+2 +.Bl -column "??/06/30" "23:59:58" "A+0" "X=time2posix(T)" +.It Sy DATE TIME T X=time2posix(T) posix2time(X) +.It ??/06/30 23:59:58 A+0 B+0 A+0 +.It ??/07/01 00:00:00 A+1 B+2 A+1 +.It ??/07/01 00:00:01 A+2 B+3 A+2 +.El .Pp - [Note: posix2time(B+1) => A+0 or A+1] +.D1 No "[Note: posix2time(B+1) => A+0 or A+1]" .Pp If leap-second support is not enabled, local time_t's and diff --git a/lib/libc/string/memset.3 b/lib/libc/string/memset.3 index 6e786700c84f..2a1253ed6f76 100644 --- a/lib/libc/string/memset.3 +++ b/lib/libc/string/memset.3 @@ -58,7 +58,7 @@ bytes of value .Fa c (converted to an unsigned char) to the string .Fa b . -.Sh RETURNS +.Sh RETURN VALUES The .Fn memset function returns its first argument. diff --git a/lib/libc/string/strtok.3 b/lib/libc/string/strtok.3 index b56941db4bb3..525ff9cddea1 100644 --- a/lib/libc/string/strtok.3 +++ b/lib/libc/string/strtok.3 @@ -108,7 +108,7 @@ after replacing the token itself with a .Dv NUL character. When no more tokens remain, a null pointer is returned. -.Sh EXAMPLE +.Sh EXAMPLES The following uses .Fn strtok_r to parse two strings using separate contexts: @@ -163,7 +163,7 @@ such a sequence of calls would always return .Dv NULL . .Sh AUTHORS .An Wes Peters, Softweyr LLC: Aq wes@softweyr.com -.br +.Pp Based on the .Fx 3.0 implementation. diff --git a/lib/libc/sys/aio_cancel.2 b/lib/libc/sys/aio_cancel.2 index a8f17404dedf..dc55c84085c3 100644 --- a/lib/libc/sys/aio_cancel.2 +++ b/lib/libc/sys/aio_cancel.2 @@ -48,7 +48,7 @@ is specified, only that specific asynchronous I/O request is cancelled. .Pp Normal asynchronous notification occurs for cancelled requests. Requests complete with an error result of -.Dv ECANCELED . +.Er ECANCELED . .Sh RESTRICTIONS The .Fn aio_cancel @@ -102,6 +102,7 @@ The first functional implemenation of appeared in .Fx 4.0 . .Sh AUTHORS +.An -nosplit This manual page was originally written by .An Wes Peters Aq wes@softweyr.com . diff --git a/lib/libc/sys/aio_error.2 b/lib/libc/sys/aio_error.2 index 4753afd3c106..a204d474c6db 100644 --- a/lib/libc/sys/aio_error.2 +++ b/lib/libc/sys/aio_error.2 @@ -46,7 +46,7 @@ associated with the structure pointed to by If the asynchronous I/O request has completed successfully, .Fn aio_error returns 0. If the request has not yet completed, -.Dv EINPROGRESS +.Er EINPROGRESS is returned. If the request has completed unsuccessfully the error status is returned as described in .Xr read 2 , diff --git a/lib/libc/sys/aio_return.2 b/lib/libc/sys/aio_return.2 index 40e7a2e101fa..a6bca22dfb7f 100644 --- a/lib/libc/sys/aio_return.2 +++ b/lib/libc/sys/aio_return.2 @@ -48,7 +48,7 @@ should only be called once, to obtain the final status of an asynchronous I/O operation once .Xr aio_error 2 returns something other than -.Dv EINPROGRESS . +.Er EINPROGRESS . .Sh RETURN VALUES If the asynchronous I/O request has completed, the status is returned as described in diff --git a/lib/libc/sys/aio_waitcomplete.2 b/lib/libc/sys/aio_waitcomplete.2 index 3120780806bb..ccc91d6954c2 100644 --- a/lib/libc/sys/aio_waitcomplete.2 +++ b/lib/libc/sys/aio_waitcomplete.2 @@ -118,7 +118,9 @@ completed. .Sh STANDARDS The .Fn aio_waitcomplete -function is a FreeBSD-specific extension. +function is a +.Fx Ns -specific +extension. .Sh HISTORY The .Fn aio_waitcomplete diff --git a/lib/libc/sys/chmod.2 b/lib/libc/sys/chmod.2 index e8edf5900e8e..f2e1d08e5a73 100644 --- a/lib/libc/sys/chmod.2 +++ b/lib/libc/sys/chmod.2 @@ -213,7 +213,10 @@ The .Fn chmod function call is expected to conform to .St -p1003.1-90 , -except for the return of EFTYPE and the use of S_ISTXT. +except for the return of +.Er EFTYPE +and the use of +.Dv S_ISTXT . .Sh HISTORY A .Fn chmod diff --git a/lib/libc/sys/chroot.2 b/lib/libc/sys/chroot.2 index 11a144a339be..6d9f7642af8c 100644 --- a/lib/libc/sys/chroot.2 +++ b/lib/libc/sys/chroot.2 @@ -75,13 +75,17 @@ If .Ql kern.chroot_allow_open_directories is set to zero, .Fn chroot -will always fail with EPERM if there are any directories open. +will always fail with +.Er EPERM +if there are any directories open. .Pp If .Ql kern.chroot_allow_open_directories is set to one (the default), .Fn chroot -will fail with EPERM if there are any directories open and the +will fail with +.Er EPERM +if there are any directories open and the process is already subject to a .Fn chroot call. diff --git a/lib/libc/sys/clock_gettime.2 b/lib/libc/sys/clock_gettime.2 index e8421592e71f..8b5e2443c6ba 100644 --- a/lib/libc/sys/clock_gettime.2 +++ b/lib/libc/sys/clock_gettime.2 @@ -93,7 +93,7 @@ The resolution (granularity) of a clock is returned by the .Fn clock_getres call. This value is placed in a (non-NULL) .Fa *tp . -.Sh RETURN +.Sh RETURN VALUES A 0 return value indicates that the call succeeded. A -1 return value indicates an error occurred, and in this case an error code is stored into the global variable diff --git a/lib/libc/sys/connect.2 b/lib/libc/sys/connect.2 index bb2ab8c8ef9b..7e4880a9993c 100644 --- a/lib/libc/sys/connect.2 +++ b/lib/libc/sys/connect.2 @@ -146,7 +146,7 @@ has not yet been completed. .Pp The following errors are specific to connecting names in the UNIX domain. These errors may not apply in future versions of the UNIX IPC domain. -.Bl -tag -width EADDRNOTAVAILABB +.Bl -tag -width Er .It Bq Er ENOTDIR A component of the path prefix is not a directory. .It Bq Er ENAMETOOLONG diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2 index dffa6ae51d83..113e83be2b68 100644 --- a/lib/libc/sys/execve.2 +++ b/lib/libc/sys/execve.2 @@ -144,7 +144,6 @@ the effective user ID is recorded as the saved set-user-ID, and the effective group ID is recorded as the saved set-group-ID. These values may be used in changing the effective IDs later (see .Xr setuid 2 ) . -.ne 1i .Pp The set-ID bits are not honored if the respective file system has the .Ar nosuid @@ -242,7 +241,6 @@ permission, but has an invalid magic number in its header. .It Bq Er ETXTBSY The new process file is a pure procedure (shared text) file that is currently open for writing or reading by some process. -.ne 1i .It Bq Er ENOMEM The new process requires more virtual memory than is allowed by the imposed maximum diff --git a/lib/libc/sys/fcntl.2 b/lib/libc/sys/fcntl.2 index 07477409ad51..49522c77c414 100644 --- a/lib/libc/sys/fcntl.2 +++ b/lib/libc/sys/fcntl.2 @@ -157,7 +157,6 @@ upon availability of data to be read. .Pp Several commands are available for doing advisory file locking; they all operate on the following structure: -.ne 7v .Bd -literal struct flock { off_t l_start; /* starting offset */ diff --git a/lib/libc/sys/getfh.2 b/lib/libc/sys/getfh.2 index d3f78886d85a..d0ec2ede2d0f 100644 --- a/lib/libc/sys/getfh.2 +++ b/lib/libc/sys/getfh.2 @@ -60,31 +60,31 @@ is set to indicate the error. .Fn Getfh fails if one or more of the following are true: .Bl -tag -width Er -.It Bq ENOTDIR +.It Bq Er ENOTDIR A component of the path prefix of .Fa path is not a directory. -.It Bq ENAMETOOLONG +.It Bq Er ENAMETOOLONG The length of a component of .Fa path exceeds 255 characters, or the length of .Fa path exceeds 1023 characters. -.It Bq ENOENT +.It Bq Er ENOENT The file referred to by .Fa path does not exist. -.It Bq EACCES +.It Bq Er EACCES Search permission is denied for a component of the path prefix of .Fa path . -.It Bq ELOOP +.It Bq Er ELOOP Too many symbolic links were encountered in translating .Fa path . -.It Bq EFAULT +.It Bq Er EFAULT .Fa Fhp points to an invalid address. -.It Bq EIO +.It Bq Er EIO An .Tn I/O error occurred while reading from or writing to the file system. diff --git a/lib/libc/sys/getfsstat.2 b/lib/libc/sys/getfsstat.2 index c9d1bd530261..de2bb80d2d55 100644 --- a/lib/libc/sys/getfsstat.2 +++ b/lib/libc/sys/getfsstat.2 @@ -155,10 +155,10 @@ is set to indicate the error. .Fn Getfsstat fails if one or more of the following are true: .Bl -tag -width Er -.It EFAULT +.It Bq Er EFAULT .Fa Buf points to an invalid address. -.It EIO +.It Bq Er EIO An .Tn I/O error occurred while reading from or writing to the filesystem. diff --git a/lib/libc/sys/gettimeofday.2 b/lib/libc/sys/gettimeofday.2 index 36dfe60251bf..d42772488fba 100644 --- a/lib/libc/sys/gettimeofday.2 +++ b/lib/libc/sys/gettimeofday.2 @@ -107,7 +107,7 @@ from setting arbitrary time stamps on files. The system time can still be adjusted backwards using the .Xr adjtime 2 system call even when the system is secure. -.Sh RETURN +.Sh RETURN VALUES A 0 return value indicates that the call succeeded. A -1 return value indicates an error occurred, and in this case an error code is stored into the global variable diff --git a/lib/libc/sys/intro.2 b/lib/libc/sys/intro.2 index 5be9768775f5..e15afc0dacb4 100644 --- a/lib/libc/sys/intro.2 +++ b/lib/libc/sys/intro.2 @@ -391,7 +391,6 @@ entry failed because the user's quota of disk blocks was exhausted, or the allocation of an inode for a newly created file failed because the user's quota of inodes was exhausted. -.ne 1i .It Er 70 ESTALE Em "Stale NFS file handle" . An attempt was made to access an open file (on an .Tn NFS @@ -489,7 +488,6 @@ A session leader with a controlling terminal is a controlling process. .It Controlling terminal A terminal that is associated with a session is known as the controlling terminal for that session and its members. -.ne 1i .It "Terminal Process Group ID" A terminal may be acquired by a session leader as its controlling terminal. Once a terminal is associated with a session, any of the process groups @@ -567,7 +565,6 @@ for the super-user.) A process is recognized as a .Em super-user process and is granted special privileges if its effective user ID is 0. -.ne 1i .It Special Processes The processes with process IDs of 0, 1, and 2 are special. Process 0 is the scheduler. Process 1 is the initialization process diff --git a/lib/libc/sys/kldnext.2 b/lib/libc/sys/kldnext.2 index 20984d21f573..cef9d0aae385 100644 --- a/lib/libc/sys/kldnext.2 +++ b/lib/libc/sys/kldnext.2 @@ -55,7 +55,9 @@ is set to indicate the error. .Sh ERRORS The only error set by .Fn kldnext -is ENOENT, which is set when +is +.Er ENOENT , +which is set when .Va fileid refers to a kld file that does not exist (isn't loaded). .Sh SEE ALSO diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2 index 15f4fd344167..d5a931c1d538 100644 --- a/lib/libc/sys/kqueue.2 +++ b/lib/libc/sys/kqueue.2 @@ -387,7 +387,7 @@ The .Fn kevent function fails if: .Bl -tag -width Er -.It Bq Er EACCESS +.It Bq Er EACCES The process does not have permission to register a filter. .It Bq Er EFAULT There was an error reading or writing the diff --git a/lib/libc/sys/link.2 b/lib/libc/sys/link.2 index 34c36dcaad80..7cabd2b15ac6 100644 --- a/lib/libc/sys/link.2 +++ b/lib/libc/sys/link.2 @@ -132,7 +132,6 @@ are on different file systems. The directory in which the entry for the new link is being placed cannot be extended because there is no space left on the file system containing the directory. -.ne 3v .It Bq Er EDQUOT The directory in which the entry for the new link is being placed cannot be extended because the diff --git a/lib/libc/sys/mkfifo.2 b/lib/libc/sys/mkfifo.2 index bf0e84d308bd..aeed3d97db98 100644 --- a/lib/libc/sys/mkfifo.2 +++ b/lib/libc/sys/mkfifo.2 @@ -67,7 +67,7 @@ indicates an error, and an error code is stored in .Fn Mkfifo will fail and no fifo will be created if: .Bl -tag -width Er -.It Bq Er ENOTSUPP +.It Bq Er ENOTSUP The kernel has not been configured to support fifo's. .It Bq Er ENOTDIR A component of the path prefix is not a directory. diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2 index b02fec03da6a..ab9455dfd262 100644 --- a/lib/libc/sys/mmap.2 +++ b/lib/libc/sys/mmap.2 @@ -282,14 +282,14 @@ of slightly less than 2G, 4GB, 6GB and 8GB. The limit is imposed for a variety of reasons. Most of them have to do with -.Tn FreeBSD +.Fx not wanting to use 64 bit offsets in the VM system due to the extreme performance penalty. So -.Tn FreeBSD +.Fx uses 32bit page indexes and this gives -.Tn FreeBSD +.Fx a maximum of 8TB filesizes. It's actually bugs in the filesystem code that causes the limit to be further restricted to diff --git a/lib/libc/sys/modnext.2 b/lib/libc/sys/modnext.2 index 2e301f82e8ad..399836a6eb21 100644 --- a/lib/libc/sys/modnext.2 +++ b/lib/libc/sys/modnext.2 @@ -65,7 +65,9 @@ is set to indicate the error. .Sh ERRORS The only error set by .Fn modnext -is ENOENT, which is set when +is +.Er ENOENT , +which is set when .Va modid refers to a kernel module that does not exist (isn't loaded). .Sh SEE ALSO diff --git a/lib/libc/sys/mount.2 b/lib/libc/sys/mount.2 index 5685646e67bd..b6682a9b101f 100644 --- a/lib/libc/sys/mount.2 +++ b/lib/libc/sys/mount.2 @@ -216,7 +216,7 @@ points outside the process's allocated address space. The following errors can occur for a .Em ufs filesystem mount: -.Bl -tag -width [ENOTBLK] +.Bl -tag -width Er .It Bq Er ENODEV A component of ufs_args .Ar fspec @@ -251,7 +251,7 @@ points outside the process's allocated address space. The following errors can occur for a .Em nfs filesystem mount: -.Bl -tag -width [ENOTBLK] +.Bl -tag -width Er .It Bq Er ETIMEDOUT .Em Nfs timed out trying to contact the server. @@ -263,7 +263,7 @@ points outside the process's allocated address space. The following errors can occur for a .Em mfs filesystem mount: -.Bl -tag -width [ENOTBLK] +.Bl -tag -width Er .It Bq Er EMFILE No space remains in the mount table. .It Bq Er EINVAL @@ -283,7 +283,7 @@ points outside the process's allocated address space. The .Fn unmount function may fail with one of the following errors: -.Bl -tag -width [ENOTBLK] +.Bl -tag -width Er .It Bq Er EPERM The caller is not the super-user. .It Bq Er ENOTDIR diff --git a/lib/libc/sys/nfssvc.2 b/lib/libc/sys/nfssvc.2 index 17f4a9974a5c..a852365fb2f8 100644 --- a/lib/libc/sys/nfssvc.2 +++ b/lib/libc/sys/nfssvc.2 @@ -108,7 +108,11 @@ If the mount point is using Kerberos, then the .Xr mount_nfs 8 daemon will return from .Fn nfssvc -with errno == ENEEDAUTH whenever the client side requires an ``rcmd'' +with +.Va errno +== +.Er ENEEDAUTH +whenever the client side requires an ``rcmd'' authentication ticket for the user. .Xr Mount_nfs 8 will attempt to get the Kerberos ticket, and if successful will call @@ -161,7 +165,10 @@ Whenever an .Xr nfsd 8 daemon receives a Kerberos authentication ticket, it will return from .Fn nfssvc -with errno == ENEEDAUTH. +with +.Va errno +== +.Er ENEEDAUTH . The .Xr nfsd 8 will attempt to authenticate the ticket and generate a set of credentials @@ -246,7 +253,7 @@ system call is designed specifically for the support daemons and as such is specific to their requirements. It should really return values to indicate the need for authentication support, since -.Dv ENEEDAUTH +.Er ENEEDAUTH is not really an error. Several fields of the argument structures are assumed to be valid and sometimes to be unchanged from a previous call, such that diff --git a/lib/libc/sys/pathconf.2 b/lib/libc/sys/pathconf.2 index 3f5e1cbe04ac..25d30b32f4c0 100644 --- a/lib/libc/sys/pathconf.2 +++ b/lib/libc/sys/pathconf.2 @@ -129,9 +129,10 @@ argument is invalid. The implementation does not support an association of the variable name with the associated file. .El +.Pp .Fn Pathconf will fail if: -.Bl -tag -width ENAMETOOLONGAA +.Bl -tag -width Er .It Bq Er ENOTDIR A component of the path prefix is not a directory. .It Bq Er ENAMETOOLONG @@ -147,7 +148,7 @@ Too many symbolic links were encountered in translating the pathname. An I/O error occurred while reading from or writing to the file system. .El .Pp -.Bl -tag -width [EFAULT] +.Bl -tag -width Er .Fn Fpathconf will fail if: .It Bq Er EBADF diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 index 837dde5fbbc7..e3e11695c6d8 100644 --- a/lib/libc/sys/ptrace.2 +++ b/lib/libc/sys/ptrace.2 @@ -78,7 +78,7 @@ and data, which is why there are two requests: conceptually, reads from the instruction space and .Dv PT_READ_D reads from the data space. In the current -.Tn FreeBSD +.Fx implementation, these two requests are completely identical. The .Fa addr diff --git a/lib/libc/sys/rfork.2 b/lib/libc/sys/rfork.2 index 60f906ebb3ab..7b6ff7e77a6e 100644 --- a/lib/libc/sys/rfork.2 +++ b/lib/libc/sys/rfork.2 @@ -147,16 +147,15 @@ There is insufficient swap space for the new process. .Xr minherit 2 , .Xr vfork 2 .Sh BUGS -FreeBSD does not yet implement a native +.Fx +does not yet implement a native .Fn clone library call, and the current pthreads implementation does not use -.Fn -rfork +.Fn rfork with RFMEM. A native port of the linux threads library, .Pa /usr/ports/devel/linuxthreads , contains a working -.Fn -clone +.Fn clone call that utilizes RFMEM. .Sh HISTORY The diff --git a/lib/libc/sys/rtprio.2 b/lib/libc/sys/rtprio.2 index 81bb8ebc709c..55c10d6b7d11 100644 --- a/lib/libc/sys/rtprio.2 +++ b/lib/libc/sys/rtprio.2 @@ -102,6 +102,7 @@ may only change the idle priority of the current process. .It Bq Er ESRCH The specified process was not found. .Sh AUTHORS +.An -nosplit The original author was .An Henrik Vestergaard Draboel Aq hvd@terry.ping.dk . This implementation in diff --git a/lib/libc/sys/sched_get_priority_max.2 b/lib/libc/sys/sched_get_priority_max.2 index e98fa38d42b2..c141da42dd7d 100644 --- a/lib/libc/sys/sched_get_priority_max.2 +++ b/lib/libc/sys/sched_get_priority_max.2 @@ -75,13 +75,13 @@ The standard time sharing scheduler; .It Bq Er SCHED_RR Round-robin scheduling across same priority processes. .El -.Sh RETURN +.Sh RETURN VALUES If successful, the .Fn sched_get_priority_max and .Fn sched_get_priority_min functions shall return the appropriate maximum or minimum values, -respectively. If unsuccessful, the shall return a value of -1 and set +respectively. If unsuccessful, they shall return a value of -1 and set .Fa errno to indicate the error. .Pp diff --git a/lib/libc/sys/sched_setparam.2 b/lib/libc/sys/sched_setparam.2 index 879a2505ba61..ed2405871879 100644 --- a/lib/libc/sys/sched_setparam.2 +++ b/lib/libc/sys/sched_setparam.2 @@ -133,7 +133,7 @@ returned. In this implementation, the function will fail if .Fa pid is negative. -.Sh RETURN +.Sh RETURN VALUES The function will return zero if it completes successfully, or it will return a value of -1 and set .Va errno diff --git a/lib/libc/sys/sched_setscheduler.2 b/lib/libc/sys/sched_setscheduler.2 index b8be52325929..6679699f7f46 100644 --- a/lib/libc/sys/sched_setscheduler.2 +++ b/lib/libc/sys/sched_setscheduler.2 @@ -128,7 +128,7 @@ returned. In this implementation, the function will fail if .Fa pid is negative. -.Sh RETURN +.Sh RETURN VALUES The function will return zero if it completes successfully, or it will return a value of -1 and set .Va errno diff --git a/lib/libc/sys/sched_yield.2 b/lib/libc/sys/sched_yield.2 index 4f3fc4e07f74..473648846377 100644 --- a/lib/libc/sys/sched_yield.2 +++ b/lib/libc/sys/sched_yield.2 @@ -40,7 +40,7 @@ The .Fn sched_yield function forces the running process to relinquish the processor until it again becomes the head of its process list. It takes no arguments. -.Sh RETURN +.Sh RETURN VALUES The .Fn sched_yield function will return zero if it completes successfully, or it diff --git a/lib/libc/sys/semop.2 b/lib/libc/sys/semop.2 index 19a91a842498..80498c9df387 100644 --- a/lib/libc/sys/semop.2 +++ b/lib/libc/sys/semop.2 @@ -118,14 +118,16 @@ value, one of the following happens: .It If IPC_NOWAIT was specified, then .Fn semop -returns immediately with a return value of EAGAIN. +returns immediately with a return value of +.Er EAGAIN . .It If some other process has removed the semaphore with the IPC_RMID option of .Fn semctl , then .Fn semop -returns immediately with a return value of EINVAL. +returns immediately with a return value of +.Er EINVAL . .It Otherwise, the calling process is put to sleep until the semaphore's value is greater than or equal to the absolute value of diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2 index a451ee89d04f..5619891c36ce 100644 --- a/lib/libc/sys/sendfile.2 +++ b/lib/libc/sys/sendfile.2 @@ -99,7 +99,9 @@ and the error .Er EAGAIN is returned. .Sh IMPLEMENTATION NOTES -The FreeBSD implementation of +The +.Fx +implementation of .Fn sendfile is "zero-copy", meaning that it has been optimized so that copying of the file data is avoided. .Pp diff --git a/lib/libc/sys/setresuid.2 b/lib/libc/sys/setresuid.2 index 8ae21174ce7e..d73f7264f102 100644 --- a/lib/libc/sys/setresuid.2 +++ b/lib/libc/sys/setresuid.2 @@ -37,11 +37,11 @@ .Fn setresuid "uid_t ruid" "uid_t euid" "uid_t suid" .Sh DESCRIPTION The -.Nm setresuid +.Fn setresuid system call sets the real, effective and saved user IDs of the current process. The analogous -.Nm setresgid +.Fn setresgid sets the real, effective and saved group IDs. .Pp Privileged processes may set these IDs @@ -59,7 +59,7 @@ and the global variable is set to indicate the error. .Sh ERRORS .Bl -tag -width Er -.It Er EPERM +.It Bq Er EPERM The calling process was not privileged and tried to change one or more IDs to a value which was not the current real ID, the current effective ID diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2 index 641f543990bc..41e73955ef80 100644 --- a/lib/libc/sys/sigaction.2 +++ b/lib/libc/sys/sigaction.2 @@ -196,7 +196,7 @@ a .Xr wait 2 (or equivalent), it blocks until all of the calling process's child processes terminate, and then returns a value of -1 with errno set to -.Dv ECHILD . +.Er ECHILD . .It Dv SA_ONSTACK If this bit is set, the system will deliver the signal to the process on a @@ -224,7 +224,7 @@ or If a signal is caught during the system calls listed below, the call may be forced to terminate with the error -.Dv EINTR , +.Er EINTR , the call may return with a data transfer shorter than requested, or the call may be restarted. Restart of pending calls is requested diff --git a/lib/libc/sys/sigaltstack.2 b/lib/libc/sys/sigaltstack.2 index 33830149bb30..b7f8d3a810c7 100644 --- a/lib/libc/sys/sigaltstack.2 +++ b/lib/libc/sys/sigaltstack.2 @@ -85,7 +85,7 @@ Trying to disable an active stack will cause to return -1 with .Va errno set to -.Dv EINVAL . +.Er EINVAL . A disabled stack will cause all signals to be taken on the regular user stack. If the stack is later re-enabled then all signals that were specified diff --git a/lib/libc/sys/sigsuspend.2 b/lib/libc/sys/sigsuspend.2 index 85ace2ec8a08..b3984bef60c7 100644 --- a/lib/libc/sys/sigsuspend.2 +++ b/lib/libc/sys/sigsuspend.2 @@ -70,7 +70,7 @@ function always terminates by being interrupted, returning -1 with .Va errno set to -.Dv EINTR . +.Er EINTR . .Sh SEE ALSO .Xr sigaction 2 , .Xr sigprocmask 2 , diff --git a/lib/libc/sys/socket.2 b/lib/libc/sys/socket.2 index b6e5a65877bf..5e37c55627dc 100644 --- a/lib/libc/sys/socket.2 +++ b/lib/libc/sys/socket.2 @@ -188,7 +188,7 @@ within a reasonable length of time, then the connection is considered broken and calls will indicate an error with -1 returns and with -.Dv ETIMEDOUT +.Er ETIMEDOUT as the specific code in the global variable .Va errno . diff --git a/lib/libc/sys/socketpair.2 b/lib/libc/sys/socketpair.2 index 7b97170a68d0..c06d7edc1bce 100644 --- a/lib/libc/sys/socketpair.2 +++ b/lib/libc/sys/socketpair.2 @@ -72,7 +72,7 @@ Too many descriptors are in use by this process. The specified address family is not supported on this machine. .It Bq Er EPROTONOSUPPORT The specified protocol is not supported on this machine. -.It Bq Er EOPNOSUPPORT +.It Bq Er EOPNOTSUPP The specified protocol does not support creation of socket pairs. .It Bq Er EFAULT The address diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2 index ef3a858958da..e611913cc4c9 100644 --- a/lib/libc/sys/stat.2 +++ b/lib/libc/sys/stat.2 @@ -233,7 +233,7 @@ Search permission is denied for a component of the path prefix. .It Bq Er ELOOP Too many symbolic links were encountered in translating the pathname. .It Bq Er EFAULT -.Fa Sb +.Fa sb or .Em name points to an invalid address. @@ -241,14 +241,14 @@ points to an invalid address. An I/O error occurred while reading from or writing to the file system. .El .Pp -.Bl -tag -width [EFAULT] +.Bl -tag -width Er .Fn Fstat will fail if: .It Bq Er EBADF .Fa fd is not a valid open file descriptor. .It Bq Er EFAULT -.Fa Sb +.Fa sb points to an invalid address. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. diff --git a/lib/libc/sys/statfs.2 b/lib/libc/sys/statfs.2 index 82cd9810f8cd..faafea05bbce 100644 --- a/lib/libc/sys/statfs.2 +++ b/lib/libc/sys/statfs.2 @@ -166,7 +166,7 @@ error occurred while reading from or writing to the file system. .Pp .Fn Fstatfs fails if one or more of the following are true: -.Bl -tag -width ENAMETOOLONGA +.Bl -tag -width Er .It Bq Er EBADF .Fa Fd is not a valid open file descriptor. diff --git a/lib/libc/sys/truncate.2 b/lib/libc/sys/truncate.2 index b9a494e39882..7456adce6993 100644 --- a/lib/libc/sys/truncate.2 +++ b/lib/libc/sys/truncate.2 @@ -101,7 +101,7 @@ points outside the process's allocated address space. .Pp .Fn Ftruncate succeeds unless: -.Bl -tag -width [ENOTDIR] +.Bl -tag -width Er .It Bq Er EBADF The .Fa fd diff --git a/lib/libc/sys/undelete.2 b/lib/libc/sys/undelete.2 index 9eb71e76410a..5be51a28d458 100644 --- a/lib/libc/sys/undelete.2 +++ b/lib/libc/sys/undelete.2 @@ -57,7 +57,7 @@ any objects in a lower layer of the union stack to become visible once more. .Pp Eventually, the -.Nm undelete +.Fn undelete functionality may be expanded to other filesystems able to recover deleted files such as the log-structured filesystem. .Sh RETURN VALUES @@ -102,5 +102,5 @@ points outside the process's allocated address space. .Xr mount_union 8 .Sh HISTORY An -.Nm undelete +.Fn undelete function call first appeared in 4.4BSD-Lite. diff --git a/lib/libc/sys/wait.2 b/lib/libc/sys/wait.2 index ff6b8478cf29..c1c0ed09959c 100644 --- a/lib/libc/sys/wait.2 +++ b/lib/libc/sys/wait.2 @@ -242,7 +242,7 @@ If there are no children not previously awaited, -1 is returned with .Va errno set to -.Bq Er ECHILD . +.Er ECHILD . Otherwise, if .Dv WNOHANG is specified and there are |