man2: fix wrong/non-existent section references
cover man2: fix wrong/non-existent section references
Commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY:
Reorganize sections") results in many wrong section references.
This patch series tries to fix some of these issues in man2 section which I was able to find.
*** BLURB HERE ***
Kir Kolyshkin (16):
cacheflush.2: fix section reference
clone.2: fix wrong section reference
execve.2: fix wrong section reference
gethostname.2: fix section reference
getpriority.2: move info from NOTES to HISTORY
gettimeofday.2: fix wrong section reference
ioperm.2: fix wrong section reference
kill.2: fix wrong section reference
mkdir.2: fix wrong section reference
mmap.2: fix wrong section reference
nice.2: fix wrong section reference
open.2: fix wrong section reference
readdir.2: fix wrong section reference
semctl.2: fix wrong section reference
uname.2: fix wrong section reference
wait.2: fix wrong section reference
man/man2/cacheflush.2 | 2 +- man/man2/clone.2 | 2 +- man/man2/execve.2 | 2 +- man/man2/gethostname.2 | 2 +- man/man2/getpriority.2 | 32 ++++++++++++++++---------------- man/man2/gettimeofday.2 | 2 +- man/man2/ioperm.2 | 2 +- man/man2/kill.2 | 2 +- man/man2/mkdir.2 | 2 +- man/man2/mmap.2 | 2 +- man/man2/nice.2 | 2 +- man/man2/open.2 | 4 ++-- man/man2/readdir.2 | 2 +- man/man2/semctl.2 | 2 +- man/man2/uname.2 | 2 +- man/man2/wait.2 | 2 +- 16 files changed, 32 insertions(+), 32 deletions(-)
Signature · 1 line
2.45.2
PATCH 1/16 cacheflush.2: fix section reference
There is a reference to NOTES section, which no longer exists since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY:
Reorganize sections").
--- man/man2/cacheflush.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/cacheflush.2 +1 -1
@@ -18,7 +18,7 @@ .SH SYNOPSIS .P .IR Note : On some architectures, -there is no glibc wrapper for this system call; see NOTES. +there is no glibc wrapper for this system call; see VERSIONS. .SH DESCRIPTION .BR cacheflush () flushes the contents of the indicated cache(s) for the
Signature · 1 line
2.45.2
PATCH 2/16 clone.2: fix wrong section reference
In reply to Kir KolyshkinThe man page says:
Quoted 1 line
For the prototype of the raw
clone()system call, see NOTES
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), this prototype is in VERSIONS.
--- man/man2/clone.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/clone.2 +1 -1
@@ -58,7 +58,7 @@ .SH SYNOPSIS .BI " void *_Nullable " tls , .BI " pid_t *_Nullable " child_tid " \fR*/\fP );" .P -/* For the prototype of the raw clone() system call, see NOTES */ +/* For the prototype of the raw clone() system call, see VERSIONS. */ .P .BR "#include <linux/sched.h>" " /* Definition of " "struct clone_args" " */" .BR "#include <sched.h>" " /* Definition of " CLONE_* " constants */"
Signature · 1 line
2.45.2
PATCH 3/16 execve.2: fix wrong section reference
In reply to Kir KolyshkinThe man page says:
Quoted 3 lines
For portable use, optional-arg should either be absent, or be specified as a single word (i.e., it should not contain white space); see NOTES below.
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), the discussion about optional-arg is in VERSIONS.
--- man/man2/execve.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/execve.2 +1 -1
@@ -362,7 +362,7 @@ .SS Interpreter scripts For portable use, .I optional-arg should either be absent, or be specified as a single word (i.e., it -should not contain white space); see NOTES below. +should not contain white space); see VERSIONS below. .P Since Linux 2.6.28, .\" commit bf2a9a39639b8b51377905397a5005f444e9a892
Signature · 1 line
2.45.2
PATCH 4/16 gethostname.2: fix section reference
In reply to Kir KolyshkinThere is a reference to NOTES section, which no longer exists since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY:
Reorganize sections").
--- man/man2/gethostname.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/gethostname.2 +1 -1
@@ -69,7 +69,7 @@ .SH DESCRIPTION .I len bytes. If the null-terminated hostname is too large to fit, -then the name is truncated, and no error is returned (but see NOTES below). +then the name is truncated, and no error is returned (but see VERSIONS below). POSIX.1 says that if such truncation occurs, then it is unspecified whether the returned buffer includes a terminating null byte.
Signature · 1 line
2.45.2
PATCH 5/16 getpriority.2: move info from NOTES to HISTORY
In reply to Kir KolyshkinIn the spirit of commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections"), move the historical information about EPERM error from NOTES to HISTORY, and fix the section reference accordingly.
--- man/man2/getpriority.2 | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
man/man2/getpriority.2 +16 -16
@@ -138,7 +138,7 @@ .SH ERRORS and was not privileged (on Linux: did not have the .B CAP_SYS_NICE capability). -But see NOTES below. +But see HISTORY below. .TP .B ESRCH No process was located using the
@@ -151,21 +151,6 @@ .SH STANDARDS .SH HISTORY POSIX.1-2001, SVr4, 4.4BSD (these interfaces first appeared in 4.2BSD). -.SH NOTES -For further details on the nice value, see -.BR sched (7). -.P -.IR Note : -the addition of the "autogroup" feature in Linux 2.6.38 means that -the nice value no longer has its traditional effect in many circumstances. -For details, see -.BR sched (7). -.P -A child created by -.BR fork (2) -inherits its parent's nice value. -The nice value is preserved across -.BR execve (2). .P The details on the condition for .B EPERM
@@ -182,6 +167,21 @@ .SH NOTES 4.3BSD, FreeBSD 4.3, OpenBSD-2.5, ...) behave in the same manner as Linux 2.6.12 and later. .\" +.SH NOTES +For further details on the nice value, see +.BR sched (7). +.P +.IR Note : +the addition of the "autogroup" feature in Linux 2.6.38 means that +the nice value no longer has its traditional effect in many circumstances. +For details, see +.BR sched (7). +.P +A child created by +.BR fork (2) +inherits its parent's nice value. +The nice value is preserved across +.BR execve (2). .SS C library/kernel differences The getpriority system call returns nice values translated to the range 40..1, since a negative return value would be interpreted as an error.
Signature · 1 line
2.45.2
PATCH 6/16 gettimeofday.2: fix wrong section reference
In reply to Kir KolyshkinThe man page says:
Quoted 2 lines
The use of the timezone structure is obsolete; the tz argument should normally be specified as NULL. (See NOTES below.)
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), this information is in VERSIONS.
--- man/man2/gettimeofday.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/gettimeofday.2 +1 -1
@@ -105,7 +105,7 @@ .SH DESCRIPTION structure is obsolete; the .I tz argument should normally be specified as NULL. -(See NOTES below.) +See VERSIONS. .P Under Linux, there are some peculiar "warp clock" semantics associated with the
Signature · 1 line
2.45.2
PATCH 7/16 ioperm.2: fix wrong section reference
In reply to Kir KolyshkinThe man page says:
Quoted 2 lines
Permissions are inherited by the child created by fork (2) (but see HISTORY).
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), the discussion about permission inheritance is in VERSIONS.
--- man/man2/ioperm.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/ioperm.2 +1 -1
@@ -50,7 +50,7 @@ .SH DESCRIPTION .P Permissions are inherited by the child created by .BR fork (2) -(but see NOTES). +(but see HISTORY). Permissions are preserved across .BR execve (2); this is useful for giving port access permissions to unprivileged
Signature · 1 line
2.45.2
Alejandro Colomar
maintainerRe: [PATCH 07/16] ioperm.2: fix wrong section reference
Quoted 8 lines · Kir Kolyshkin
The man page says:
Quoted 2 lines
Permissions are inherited by the child created by fork (2) (but see HISTORY).
Since the commit
4131356cd("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), the discussion about permission inheritance is in VERSIONS.
The commit message is inconsistent. Here it says VERSIONS.
Quoted 12 lines
Fixes 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")Signed-off-by Kir Kolyshkin <[email protected]>--- man/man2/ioperm.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)man/man2/ioperm.2 +0
-0
man/man2/ioperm.2 .SH DESCRIPTION · line 53
Quoted 5 lines
man/man2/ioperm.2 +1
-1@@ -50,7 +50,7 @@ .SH DESCRIPTION .P Permissions are inherited by the child created by .BR fork (2) -(but see NOTES). +(but see HISTORY).
But it's changed to HISTORY.
Quoted 7 lines
man/man2/ioperm.2 +0
-0Permissions are preserved across .BR execve (2); this is useful for giving port access permissions to unprivilegedSignature · 1 line
2.45.2
Signature · 1 line
<https://www.alejandro-colomar.es/>
PATCH v2 7/16 ioperm.2: fix wrong section reference
The man page says:
Quoted 2 lines
Permissions are inherited by the child created by fork (2) (but see NOTES).
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), the relevant information is in HISTORY.
--- man/man2/ioperm.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/ioperm.2 +1 -1
@@ -50,7 +50,7 @@ .SH DESCRIPTION .P Permissions are inherited by the child created by .BR fork (2) -(but see NOTES). +(but see HISTORY). Permissions are preserved across .BR execve (2); this is useful for giving port access permissions to unprivileged
Signature · 1 line
2.45.2
Alejandro Colomar
maintainerRe: [PATCH v2 07/16] ioperm.2: fix wrong section reference
Hi Kir,
Quoted 10 lines · Kir Kolyshkin
The man page says:
Quoted 2 lines
Permissions are inherited by the child created by fork (2) (but see NOTES).
Since the commit
4131356cd("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), the relevant information is in HISTORY.Fixes 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")Signed-off-by Kir Kolyshkin <[email protected]>
Patch applied; thanks.
Have a lovely day!
Alex
Quoted 20 lines
--- man/man2/ioperm.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)man/man2/ioperm.2 +1
-1@@ -50,7 +50,7 @@ .SH DESCRIPTION .P Permissions are inherited by the child created by .BR fork (2) -(but see NOTES). +(but see HISTORY). Permissions are preserved across .BR execve (2); this is useful for giving port access permissions to unprivilegedSignature · 1 line
2.45.2
Signature · 1 line
<https://www.alejandro-colomar.es/>
PATCH 8/16 kill.2: fix wrong section reference
In reply to Kir KolyshkinThe man page says:
Quoted 1 line
(Historically, the rules were different; see NOTES.)
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), the historical rules moved to HISTORY.
--- man/man2/kill.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/kill.2 +1 -1
@@ -77,7 +77,7 @@ .SH DESCRIPTION .BR SIGCONT , it suffices when the sending and receiving processes belong to the same session. -(Historically, the rules were different; see NOTES.) +(Historically, the rules were different; see HISTORY.) .SH RETURN VALUE On success (at least one signal was sent), zero is returned. On error, \-1 is returned, and
Signature · 1 line
2.45.2
PATCH 9/16 mkdir.2: fix wrong section reference
In reply to Kir KolyshkinThe man page says:
Quoted 2 lines
Whether other mode bits are honored for the created directory depends on the operating system. For Linux, see VERSIONS below.
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), the discussion about permission inheritance is in VERSIONS.
--- man/man2/mkdir.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/mkdir.2 +1 -1
@@ -53,7 +53,7 @@ .SH DESCRIPTION Whether other .I mode bits are honored for the created directory depends on the operating system. -For Linux, see NOTES below. +For Linux, see VERSIONS below. .P The newly created directory will be owned by the effective user ID of the process.
Signature · 1 line
2.45.2
PATCH 10/16 mmap.2: fix wrong section reference
In reply to Kir KolyshkinThe man page says:
Quoted 1 line
See NOTES for information on feature test macro requirements.
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), this information is in VERSIONS.
--- man/man2/mmap.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/mmap.2 +1 -1
@@ -34,7 +34,7 @@ .SH SYNOPSIS .BI "int munmap(void " addr [. length "], size_t " length ); .fi .P -See NOTES for information on feature test macro requirements. +See VERSIONS for information on feature test macro requirements. .SH DESCRIPTION .BR mmap () creates a new mapping in the virtual address space of
Signature · 1 line
2.45.2
PATCH 11/16 nice.2: fix wrong section reference
In reply to Kir KolyshkinThe man page says:
Quoted 1 line
On success, the new nice value is returned (but see NOTES below).
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), this information is in VERSIONS.
--- man/man2/nice.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/nice.2 +1 -1
@@ -51,7 +51,7 @@ .SH DESCRIPTION .BR getrlimit (2) for details. .SH RETURN VALUE -On success, the new nice value is returned (but see NOTES below). +On success, the new nice value is returned (but see VERSIONS below). On error, \-1 is returned, and .I errno is set to indicate the error.
Signature · 1 line
2.45.2
PATCH 12/16 open.2: fix wrong section reference
In reply to Kir KolyshkinSince the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), the discussion about O_SYNC and O_DSYNC is now under VERSIONS / Synchronized I/O.
While at it, fix the typesetting.
--- man/man2/open.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man/man2/open.2 +2 -2
@@ -418,7 +418,7 @@ .SH DESCRIPTION .BR write (2) was followed by a call to .BR fdatasync (2)). -.IR "See NOTES below" . +See VERSIONS. .TP .B O_EXCL Ensure that this call creates the file:
@@ -776,7 +776,7 @@ .SH DESCRIPTION .BR write (2) was followed by a call to .BR fsync (2)). -.IR "See NOTES below" . +See VERSIONS. .TP .BR O_TMPFILE " (since Linux 3.11)" .\" commit 60545d0d4610b02e55f65d141c95b18ccf855b6e
Signature · 1 line
2.45.2
PATCH 13/16 readdir.2: fix wrong section reference
In reply to Kir KolyshkinThe man page says:
Quoted 1 line
There is no definition of struct
old_linux_dirent; see NOTES.
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), this information is in VERSIONS.
--- man/man2/readdir.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/readdir.2 +1 -1
@@ -25,7 +25,7 @@ .SH SYNOPSIS .IR Note : There is no definition of .BR "struct old_linux_dirent" ; -see NOTES. +see VERSIONS. .SH DESCRIPTION This is not the function you are interested in. Look at
Signature · 1 line
2.45.2
PATCH 14/16 semctl.2: fix wrong section reference
In reply to Kir KolyshkinThe man page says:
Quoted 4 lines
GETPID
Return the sempid value for the semnum-th semaphore of the set. This is the PID of the process that last performed an operation on that semaphore (but see NOTES).
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), this information is in VERSIONS.
--- man/man2/semctl.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/semctl.2 +1 -1
@@ -317,7 +317,7 @@ .SH DESCRIPTION .IR semnum \-th semaphore of the set. This is the PID of the process that last performed an operation on -that semaphore (but see NOTES). +that semaphore (but see VERSIONS). The calling process must have read permission on the semaphore set. .TP .B GETVAL
Signature · 1 line
2.45.2
PATCH 15/16 uname.2: fix wrong section reference
In reply to Kir KolyshkinThe man page says:
Quoted 1 line
The length of the arrays in a struct utsname is unspecified (see NOTES);
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), this information is in VERSIONS and HISTORY.
--- man/man2/uname.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/uname.2 +1 -1
@@ -44,7 +44,7 @@ .SH DESCRIPTION .P The length of the arrays in a .I struct utsname -is unspecified (see NOTES); +is unspecified (see VERSIONS and HISTORY); the fields are terminated by a null byte (\[aq]\[rs]0\[aq]). .SH RETURN VALUE On success, zero is returned.
Signature · 1 line
2.45.2
PATCH 16/16 wait.2: fix wrong section reference
In reply to Kir KolyshkinThe man page says:
Quoted 2 lines
This is the glibc and POSIX interface; see
NOTES for information on the raw system call.
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS,
HISTORY: Reorganize sections"), this information is in VERSIONS.
--- man/man2/wait.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/wait.2 +1 -1
@@ -42,7 +42,7 @@ .SH SYNOPSIS .BI "int waitid(idtype_t " idtype ", id_t " id \ ", siginfo_t *" infop ", int " options ); /* This is the glibc and POSIX interface; see - NOTES for information on the raw system call. */ + VERSIONS for information on the raw system call. */ .fi .P .RS -4
Signature · 1 line
2.45.2
Alejandro Colomar
maintainerHi Kir,
Quoted 5 lines · Kir Kolyshkin
Commit
4131356cd("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY:
Reorganize sections") results in many wrong section references.This patch series tries to fix some of these issues in man2 section which I was able to find.
Thanks! I've applied all patches, except 07 (the commit message didn't match the diff).
Have a lovely day!
Alex
Quoted 43 lines
*** BLURB HERE ***
Kir Kolyshkin (16):
cacheflush.2: fix section reference
clone.2: fix wrong section reference
execve.2: fix wrong section reference
gethostname.2: fix section reference
getpriority.2: move info from NOTES to HISTORY
gettimeofday.2: fix wrong section reference
ioperm.2: fix wrong section reference
kill.2: fix wrong section reference
mkdir.2: fix wrong section reference
mmap.2: fix wrong section reference
nice.2: fix wrong section reference
open.2: fix wrong section reference
readdir.2: fix wrong section reference
semctl.2: fix wrong section reference
uname.2: fix wrong section reference
wait.2: fix wrong section referenceman/man2/cacheflush.2 | 2 +- man/man2/clone.2 | 2 +- man/man2/execve.2 | 2 +- man/man2/gethostname.2 | 2 +- man/man2/getpriority.2 | 32 ++++++++++++++++---------------- man/man2/gettimeofday.2 | 2 +- man/man2/ioperm.2 | 2 +- man/man2/kill.2 | 2 +- man/man2/mkdir.2 | 2 +- man/man2/mmap.2 | 2 +- man/man2/nice.2 | 2 +- man/man2/open.2 | 4 ++-- man/man2/readdir.2 | 2 +- man/man2/semctl.2 | 2 +- man/man2/uname.2 | 2 +- man/man2/wait.2 | 2 +- 16 files changed, 32 insertions(+), 32 deletions(-)Signature · 1 line
2.45.2
Signature · 1 line
<https://www.alejandro-colomar.es/>