From 5a4b111b5dc45e2389097393522fc07361c18777 Mon Sep 17 00:00:00 2001 From: gbe Date: Sat, 19 Dec 2020 14:54:28 +0000 Subject: [PATCH] libc: Fix most issues reported by mandoc - varios "new sentence, new line" warnings - varios "sections out of conventional order" warnings - varios "unusual Xr order" warnings - varios "missing section argument" warnings - varios "no blank before trailing delimiter" warnings - varios "normalizing date format" warnings MFC after: 1 month --- lib/libc/locale/setlocale.3 | 18 +++++++-------- lib/libc/net/gethostbyname.3 | 40 +++++++++++++++++----------------- lib/libc/stdlib/system.3 | 2 +- lib/libc/sys/_umtx_op.2 | 4 ++-- lib/libc/sys/copy_file_range.2 | 10 +++------ lib/libc/sys/execve.2 | 2 +- lib/libc/sys/fhlink.2 | 4 ++-- lib/libc/sys/open.2 | 2 +- lib/libc/sys/pdfork.2 | 2 +- lib/libc/sys/ptrace.2 | 14 +++++------- lib/libc/sys/revoke.2 | 2 +- lib/libc/sys/rtprio.2 | 5 ++++- lib/libc/sys/sendfile.2 | 8 +++---- lib/libc/sys/thr_exit.2 | 2 +- lib/libc/sys/thr_new.2 | 2 +- lib/libc/sys/thr_self.2 | 2 +- lib/libc/sys/thr_set_name.2 | 2 +- lib/libc/sys/thr_suspend.2 | 1 - lib/libc/sys/thr_wake.2 | 2 +- lib/libc/x86/sys/pkru.3 | 2 +- 20 files changed, 61 insertions(+), 65 deletions(-) diff --git a/lib/libc/locale/setlocale.3 b/lib/libc/locale/setlocale.3 index bef7b0bdd17..acaba2f0a66 100644 --- a/lib/libc/locale/setlocale.3 +++ b/lib/libc/locale/setlocale.3 @@ -157,6 +157,15 @@ if the given combination of and .Fa locale makes no sense. +.Sh FILES +.Bl -tag -width /usr/share/locale/locale/category -compact +.It Pa $PATH_LOCALE/ Ns Em locale/category +.It Pa /usr/share/locale/ Ns Em locale/category +locale file for the locale +.Em locale +and the category +.Em category . +.El .Sh EXAMPLES The following code illustrates how a program can initialize the international environment for one language, while selectively @@ -176,15 +185,6 @@ following manner before using any of the locale-specific information: .Bd -literal setlocale(LC_ALL, ""); .Ed -.Sh FILES -.Bl -tag -width /usr/share/locale/locale/category -compact -.It Pa $PATH_LOCALE/ Ns Em locale/category -.It Pa /usr/share/locale/ Ns Em locale/category -locale file for the locale -.Em locale -and the category -.Em category . -.El .Sh ERRORS No errors are defined. .Sh SEE ALSO diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3 index 591024f5936..8a624e90cbd 100644 --- a/lib/libc/net/gethostbyname.3 +++ b/lib/libc/net/gethostbyname.3 @@ -303,7 +303,26 @@ for example, a mail-forwarder may be registered for this domain. .Xr hosts 5 , .Xr hostname 7 , .Xr named 8 -.Sh CAVEAT +.Sh HISTORY +The +.Fn herror +function appeared in +.Bx 4.3 . +The +.Fn endhostent , +.Fn gethostbyaddr , +.Fn gethostbyname , +.Fn gethostent , +and +.Fn sethostent +functions appeared in +.Bx 4.2 . +The +.Fn gethostbyname2 +function first appeared in +.Tn BIND +version 4.9.4. +.Sh CAVEATS The .Fn gethostent function @@ -343,25 +362,6 @@ The .Fn endhostent function closes the file. -.Sh HISTORY -The -.Fn herror -function appeared in -.Bx 4.3 . -The -.Fn endhostent , -.Fn gethostbyaddr , -.Fn gethostbyname , -.Fn gethostent , -and -.Fn sethostent -functions appeared in -.Bx 4.2 . -The -.Fn gethostbyname2 -function first appeared in -.Tn BIND -version 4.9.4. .Sh BUGS These functions use a thread-specific data storage; if the data is needed for future use, it should be diff --git a/lib/libc/stdlib/system.3 b/lib/libc/stdlib/system.3 index 4fd61bcda23..718c4687471 100644 --- a/lib/libc/stdlib/system.3 +++ b/lib/libc/stdlib/system.3 @@ -108,4 +108,4 @@ because all meta-characters supported by would be honored. User supplied parameters should always be carefully santized before they appear in -.Fa string. +.Fa string . diff --git a/lib/libc/sys/_umtx_op.2 b/lib/libc/sys/_umtx_op.2 index 8b10e4ec7e1..ecd46b7d024 100644 --- a/lib/libc/sys/_umtx_op.2 +++ b/lib/libc/sys/_umtx_op.2 @@ -1180,7 +1180,7 @@ request: .It Dv UMTX_SHM_CREAT Creates the anonymous shared memory object, which can be looked up with the specified key -.Fa uaddr. +.Fa uaddr . If the object associated with the .Fa uaddr key already exists, it is returned instead of creating a new object. @@ -1198,7 +1198,7 @@ the specified key an error is returned, and no new object is created. .It Dv UMTX_SHM_DESTROY De-associate the shared object with the specified key -.Fa uaddr. +.Fa uaddr . The object is destroyed after the last open file descriptor is closed and the last mapping for it is destroyed. .It Dv UMTX_SHM_ALIVE diff --git a/lib/libc/sys/copy_file_range.2 b/lib/libc/sys/copy_file_range.2 index 2f42c78b57f..a3f714f0e7e 100644 --- a/lib/libc/sys/copy_file_range.2 +++ b/lib/libc/sys/copy_file_range.2 @@ -117,7 +117,6 @@ with .Dv SEEK_DATA arguments and this system call for the data ranges found. -.Pp .Sh RETURN VALUES If it succeeds, the call returns the number of bytes copied, which can be fewer than @@ -144,11 +143,9 @@ will fail if: .Bl -tag -width Er .It Bq Er EBADF If -.Fa -infd +.Fa infd is not open for reading or -.Fa -outfd +.Fa outfd is not open for writing, or opened for writing with .Dv O_APPEND , or if @@ -175,8 +172,7 @@ are reset to the initial values for the system call. and .Fa outfd refer to the same file and the byte ranges overlap or -.Fa -flags +.Fa flags is not zero. .It Bq Er EIO An I/O error occurred while reading/writing the files. diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2 index 5c5b07b30e3..a8f5aa14854 100644 --- a/lib/libc/sys/execve.2 +++ b/lib/libc/sys/execve.2 @@ -348,7 +348,7 @@ system call conforms to The Open Group Extended API Set 2 specification. The .Fn execve system call appeared in -.At V7 . +.At v7 . The .Fn fexecve system call appeared in diff --git a/lib/libc/sys/fhlink.2 b/lib/libc/sys/fhlink.2 index 0cf00de84b4..da35d2b103e 100644 --- a/lib/libc/sys/fhlink.2 +++ b/lib/libc/sys/fhlink.2 @@ -272,6 +272,6 @@ is not nor a file descriptor associated with a directory. .El .Sh SEE ALSO -.Xr fhstat 2 , -.Xr fhreadlink 2 , .Xr fhopen 2 , +.Xr fhreadlink 2 , +.Xr fhstat 2 diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 index f54873563f0..d0918fb02ee 100644 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -339,7 +339,7 @@ returns if any intermediate component of the specified relative path does not reside in the directory hierarchy beneath the topping directory. Comparing to -.Dv O_BENEATH, +.Dv O_BENEATH , absolute paths or even the temporal escape from beneath of the topping directory is not allowed. .Pp diff --git a/lib/libc/sys/pdfork.2 b/lib/libc/sys/pdfork.2 index 56a2c880fc1..b96e876a84e 100644 --- a/lib/libc/sys/pdfork.2 +++ b/lib/libc/sys/pdfork.2 @@ -161,8 +161,8 @@ for .Xr fork 2 , .Xr fstat 2 , .Xr kill 2 , -.Xr poll 2 , .Xr kqueue 2 , +.Xr poll 2 , .Xr wait4 2 , .Xr capsicum 4 , .Xr procdesc 4 diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 index 6608c115827..8e9c5d8ab87 100644 --- a/lib/libc/sys/ptrace.2 +++ b/lib/libc/sys/ptrace.2 @@ -577,7 +577,7 @@ Only valid when or .Dv PL_FLAG_SCX is set in -.Va pl_flags. +.Va pl_flags . .It Va pl_syscall_narg The number of arguments passed to the current system call not counting the system call identifier. @@ -588,7 +588,7 @@ Only valid when or .Dv PL_FLAG_SCX is set in -.Va pl_flags. +.Va pl_flags . .El .It Dv PT_GETNUMLWPS This request returns the number of kernel threads associated with the @@ -622,7 +622,7 @@ The and .Fa data arguments are used the same as for -.Dv PT_CONTINUE. +.Dv PT_CONTINUE . .It Dv PT_TO_SCX This request will set the .Dv PTRACE_SCX @@ -632,7 +632,7 @@ The and .Fa data arguments are used the same as for -.Dv PT_CONTINUE. +.Dv PT_CONTINUE . .It Dv PT_SYSCALL This request will set the .Dv PTRACE_SYSCALL @@ -643,7 +643,7 @@ The and .Fa data arguments are used the same as for -.Dv PT_CONTINUE. +.Dv PT_CONTINUE . .It Dv PT_GET_SC_ARGS For the thread which is stopped in either .Dv PL_FLAG_SCE @@ -698,7 +698,6 @@ value. If the system call completed in an unusual fashion, .Va sr_error is set to a negative value: -.Pp .Bl -tag -width Dv EJUSTRETURN -compact .It Dv ERESTART System call will be restarted. @@ -830,7 +829,6 @@ The .Fa data argument is ignored. .El -.Pp .Sh x86 MACHINE-SPECIFIC REQUESTS .Bl -tag -width "Dv PT_GETXSTATE_INFO" .It Dv PT_GETXMMREGS @@ -860,7 +858,7 @@ machine instruction .Dv FXRSTOR . .Pp As with -.Dv PT_GETXMMREGS, +.Dv PT_GETXMMREGS , this request is only valid for i386 programs. .Pp The diff --git a/lib/libc/sys/revoke.2 b/lib/libc/sys/revoke.2 index 18b8741e86f..bb232d9d048 100644 --- a/lib/libc/sys/revoke.2 +++ b/lib/libc/sys/revoke.2 @@ -31,7 +31,7 @@ .\" @(#)revoke.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd Jan 25, 2016 +.Dd January 25, 2016 .Dt REVOKE 2 .Os .Sh NAME diff --git a/lib/libc/sys/rtprio.2 b/lib/libc/sys/rtprio.2 index 246aa549b76..3c11d25d94b 100644 --- a/lib/libc/sys/rtprio.2 +++ b/lib/libc/sys/rtprio.2 @@ -135,7 +135,10 @@ field ranges between 0 and .Pq usually 31 . 0 is the highest possible priority. .Pp -Realtime and idle priority is inherited through fork() and exec(). +Realtime and idle priority is inherited through +.Fn fork +and +.Fn exec . .Pp A realtime thread can only be preempted by a thread of equal or higher priority, or by an interrupt; idle priority threads will run only diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2 index 6bac3e22ef2..63e9b707f53 100644 --- a/lib/libc/sys/sendfile.2 +++ b/lib/libc/sys/sendfile.2 @@ -381,14 +381,14 @@ does not support The socket peer has closed the connection. .El .Sh SEE ALSO -.Xr loader.conf 5 , .Xr netstat 1 , .Xr open 2 , .Xr send 2 , .Xr socket 2 , .Xr writev 2 , -.Xr sysctl 8 , -.Xr tuning 7 +.Xr loader.conf 5 , +.Xr tuning 7 , +.Xr sysctl 8 .Rs .%A K. Elmeleegy .%A A. Chanda @@ -442,4 +442,4 @@ it will return and set .Va errno to -.Er EINVAL. +.Er EINVAL . diff --git a/lib/libc/sys/thr_exit.2 b/lib/libc/sys/thr_exit.2 index 9765fb7d60d..8040e0ccbf6 100644 --- a/lib/libc/sys/thr_exit.2 +++ b/lib/libc/sys/thr_exit.2 @@ -72,12 +72,12 @@ A return from the function indicates that the calling thread was the last one in the process. .Sh SEE ALSO .Xr _exit 2 , +.Xr _umtx_op 2 , .Xr thr_kill 2 , .Xr thr_kill2 2 , .Xr thr_new 2 , .Xr thr_self 2 , .Xr thr_set_name 2 , -.Xr _umtx_op 2 , .Xr pthread_exit 3 .Sh STANDARDS The diff --git a/lib/libc/sys/thr_new.2 b/lib/libc/sys/thr_new.2 index 735dc2879a1..408ec2a2774 100644 --- a/lib/libc/sys/thr_new.2 +++ b/lib/libc/sys/thr_new.2 @@ -225,6 +225,7 @@ There was not enough kernel memory to allocate the new thread structures. .El .Sh SEE ALSO .Xr ps 1 , +.Xr _umtx_op 2 , .Xr execve 2 , .Xr racct 2 , .Xr thr_exit 2 , @@ -232,7 +233,6 @@ There was not enough kernel memory to allocate the new thread structures. .Xr thr_kill2 2 , .Xr thr_self 2 , .Xr thr_set_name 2 , -.Xr _umtx_op 2 , .Xr pthread_create 3 .Sh STANDARDS The diff --git a/lib/libc/sys/thr_self.2 b/lib/libc/sys/thr_self.2 index 7c8a0fcecc9..423efa4beca 100644 --- a/lib/libc/sys/thr_self.2 +++ b/lib/libc/sys/thr_self.2 @@ -71,12 +71,12 @@ The memory pointed to by the argument is not valid. .El .Sh SEE ALSO +.Xr _umtx_op 2 , .Xr thr_exit 2 , .Xr thr_kill 2 , .Xr thr_kill2 2 , .Xr thr_new 2 , .Xr thr_set_name 2 , -.Xr _umtx_op 2 , .Xr pthread_getthreadid_np 3 , .Xr pthread_self 3 .Sh STANDARDS diff --git a/lib/libc/sys/thr_set_name.2 b/lib/libc/sys/thr_set_name.2 index 82abff96ab5..f63cc4d467e 100644 --- a/lib/libc/sys/thr_set_name.2 +++ b/lib/libc/sys/thr_set_name.2 @@ -78,12 +78,12 @@ does not exist in the current process. .El .Sh SEE ALSO .Xr ps 1 , +.Xr _umtx_op 2 , .Xr thr_exit 2 , .Xr thr_kill 2 , .Xr thr_kill2 2 , .Xr thr_new 2 , .Xr thr_self 2 , -.Xr _umtx_op 2 , .Xr pthread_set_name_np 3 , .Xr ddb 4 , .Xr ktr 9 diff --git a/lib/libc/sys/thr_suspend.2 b/lib/libc/sys/thr_suspend.2 index 6b90d90a142..da981bcb36e 100644 --- a/lib/libc/sys/thr_suspend.2 +++ b/lib/libc/sys/thr_suspend.2 @@ -98,7 +98,6 @@ As with called from another thread, the next .Nm call does not result in suspension. -.Pp .Sh RETURN VALUES .Rv -std thr_suspend .Sh ERRORS diff --git a/lib/libc/sys/thr_wake.2 b/lib/libc/sys/thr_wake.2 index e6d81480078..b8862b4a3f9 100644 --- a/lib/libc/sys/thr_wake.2 +++ b/lib/libc/sys/thr_wake.2 @@ -74,7 +74,7 @@ If .Fa id is not equal to the current thread identifier, the specified thread is woken up if suspended by the -.Xr thr_suspend +.Xr thr_suspend 2 system call. If the thread is not suspended at the time of the .Nm diff --git a/lib/libc/x86/sys/pkru.3 b/lib/libc/x86/sys/pkru.3 index 4ebf155b927..fc9a7ba8ca8 100644 --- a/lib/libc/x86/sys/pkru.3 +++ b/lib/libc/x86/sys/pkru.3 @@ -95,7 +95,7 @@ syscall. Per-key permissions are managed using the user-mode instructions .Em RDPKRU and -.Em WRPKRU. +.Em WRPKRU . The system provides convenient library helpers for both the syscall and the instructions, described below. .Pp -- 2.42.0