Jonathan Wakely
055811a99e
stat.2: Remove <unistd.h> from synopsis
...
There seems to be no reason <unistd.h> is shown here, so remove it.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-09 13:27:59 +01:00
Michael Kerrisk
ba50f49c69
getpriority.2, recv.2, fts.3: wfix
...
These pages have the odd wording 'the external variable errno',
which does not occur in other pages. Make these pages conform with
the norm.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-07 12:01:36 +01:00
Michael Kerrisk
c9b9a599fc
ipc.2: Minor tweak to Alex's patch regarding use of syscall()
...
Calling ipc() directly would be a rather unusual thing to do,
so add some text to emphasize that point.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 21:46:48 +01:00
Alejandro Colomar
fa646e185f
bdflush.2, capget.2, get_mempolicy.2, ipc.2, lookup_dcookie.2, mbind.2, migrate_pages.2: Add notes about missing glibc wrappers
...
.../glibc$ grep_syscall_wrapper bdflush
.../glibc$ grep_syscall_wrapper capget
.../glibc$ grep_syscall_wrapper capset
.../glibc$ grep_syscall_wrapper get_mempolicy
.../glibc$ grep_syscall_wrapper ipc
.../glibc$ grep_syscall_wrapper lookup_dcookie
.../glibc$ grep_syscall_wrapper mbind
.../glibc$ grep_syscall_wrapper migrate_pages
.../glibc$
function grep_syscall_wrapper()
{
if ! [ -v 1 ]; then
>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
return ${EX_USAGE};
fi
find * -type f \
|grep '\.h$' \
|sort -V \
|xargs pcregrep -Mn \
"(?s)^[^\s#][\w\s]+\s+\**${1}\s*\([\w\s()[\]*,]*?(...)?\)[\w\s()]*;" \
|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 21:45:41 +01:00
Alejandro Colomar
3d18bee298
getsockname.2: Use restrict in prototypes
...
POSIX specifies that the 2nd and 3rd parameters to getsockname()
shall be 'restrict'. Glibc uses 'restrict' too.
Let's use it here too.
......
.../glibc$ grep_syscall_wrapper getsockname
socket/sys/socket.h:116:
extern int getsockname (int __fd, __SOCKADDR_ARG __addr,
socklen_t *__restrict __len) __THROW;
.../glibc$ grep -rn '# *define __SOCKADDR_ARG'
socket/sys/socket.h:58:
# define __SOCKADDR_ARG struct sockaddr *__restrict
.../glibc$
function grep_syscall_wrapper()
{
if ! [ -v 1 ]; then
>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
return ${EX_USAGE};
fi
find * -type f \
|grep '\.h$' \
|sort -V \
|xargs pcregrep -Mn \
"(?s)^[^\s#][\w\s]+\s+\**${1}\s*\([\w\s()[\]*,]*?(...)?\)[\w\s()]*;" \
|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 21:39:59 +01:00
Alejandro Colomar
1b213b4fa4
gettimeofday.2: Use restrict in prototypes
...
POSIX specifies that the parameters of gettimeofday() shall be
'restrict'. Glibc uses 'restrict' too.
Let's use it here too.
......
.../glibc$ grep_syscall_wrapper gettimeofday
time/sys/time.h:66:
extern int gettimeofday (struct timeval *__restrict __tv,
void *__restrict __tz) __THROW __nonnull ((1));
.../glibc$
function grep_syscall_wrapper()
{
if ! [ -v 1 ]; then
>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
return ${EX_USAGE};
fi
find * -type f \
|grep '\.h$' \
|sort -V \
|xargs pcregrep -Mn \
"(?s)^[^\s#][\w\s]+\s+\**${1}\s*\([\w\s()[\]*,]*?(...)?\)[\w\s()]*;" \
|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 21:38:53 +01:00
Alejandro Colomar
eaaa85c17c
getitimer.2: Use restrict in prototypes
...
POSIX specifies that the 2nd and 3rd parameters to setitimer()
shall be 'restrict'. Glibc uses 'restrict' too.
Let's use it here too.
......
.../glibc$ grep_syscall_wrapper setitimer
time/sys/time.h:129:
extern int setitimer (__itimer_which_t __which,
const struct itimerval *__restrict __new,
struct itimerval *__restrict __old) __THROW;
.../glibc$
function grep_syscall_wrapper()
{
if ! [ -v 1 ]; then
>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
return ${EX_USAGE};
fi
find * -type f \
|grep '\.h$' \
|sort -V \
|xargs pcregrep -Mn \
"^[^\s][\w\s]+\s+\**${1}\s*\((?s)[\w\s()[\]*,]*?(...)?\)[\w\s()]*;" \
|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 21:37:34 +01:00
Alejandro Colomar
cb4baea939
epoll_wait.2: srcfix: glibc doesn't provide epoll_pwait2() yet
...
I filed a bug against glibc
requesting the wrapper for the new syscall.
Glibc bug: <https://sourceware.org/bugzilla/show_bug.cgi?id=27359 >
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 21:34:45 +01:00
Michael Kerrisk
b926779b33
getgid.2, getuid.2: Note that these interfaces never modify 'errno'
...
See https://www.austingroupbugs.net/view.php?id=511
and the POSIX.1-2008 specifications of the interfaces.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 10:38:57 +01:00
Alejandro Colomar
2a8c925ba8
s390_guarded_storage.2: tfix
...
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-04 22:36:46 +01:00
Michael Kerrisk
3aac0708a9
process_madvise.2: Restructure the text in DESCRIPTION a little
...
The 'advice' subsection fell in the middle of other text in the
DESCRIPTION, which is a little confusing. Instead, move that
subsection to the end of the DESCRIPTION, and make some other
minor text reorganization so that related details are placed in
the same paragraphs.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-02 11:43:15 +01:00
Michael Kerrisk
e3ce016472
process_madvise.2: Minor edits to Suren Baghdasaryan's patch
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-02 11:43:15 +01:00
Michael Kerrisk
81ec67d804
madvise.2: SEE ALSO: add process_madvise(2)
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-02 11:43:15 +01:00
Michael Kerrisk
790593b4ae
pidfd_open.2: Note the process_madvise(2) use case for PID file descriptors
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-02 11:43:15 +01:00
Suren Baghdasaryan
a144f458ba
process_madvise.2: Document process_madvise(2)
...
Initial version of process_madvise(2) manual page. Initial text
was extracted from [1], amended after fix [2] and more details
added using man pages of madvise(2) and process_vm_readv(2) as
examples. It also includes the changes to required permission
proposed in [3].
[1] https://lore.kernel.org/patchwork/patch/1297933/
[2] https://lkml.org/lkml/2020/12/8/1282
[3] https://patchwork.kernel.org/project/selinux/patch/20210111170622.2613577-1-surenb@google.com/#23888311
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-02 11:43:00 +01:00
Michael Kerrisk
1543da430a
shmget.2: tfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-28 14:10:42 +01:00
Michael Kerrisk
09c6d6ca72
access.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-28 14:10:10 +01:00
Michael Kerrisk
02576fcb1c
mmap.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-28 14:08:52 +01:00
Jakub Wilk
29dee4ce10
semget.2, shm_open.3: tfix
...
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-24 23:33:35 +01:00
Alejandro Colomar
48c3ffa776
kexec_load.2: srcfix: Don't break a line that doesn't get past the right margin
...
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-24 23:31:41 +01:00
Michael Kerrisk
cd415e7364
Various pages: use "\-" to generate real minus in circumstances where appropriate
...
Use \- for math formulas, pathnames, manual page cross references,
etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-21 10:53:59 +01:00
Michael Kerrisk
b49c2acb42
Various pages: use real minus signs in pathnames
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-21 10:29:14 +01:00
Michael Kerrisk
d064d41a4b
Various pages: Inside code blocks (.EX/.EE) use \- to get real minus signs
...
A real minus can be cut and pasted...
THere are a few exceptions that gave been excluded in the this
change. For example, where there' is a string such as "<p1-name>",
where p1-name is soome sort of pseudo-identifier.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-21 10:29:14 +01:00
Michael Kerrisk
c43f976fd8
mount.2: Note that the 'data' argument can be NULL
...
Verified from reading the kernel source and looking at the source
of mount(8). Surprisingly, this has not documented after so many
years.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-20 13:12:33 +01:00
Johannes Wellhöfer
2a1b1111ca
clone.2: tfix
...
For the alternate signal stack to be cleared, CLONE_VM should and
CLONE_VFORK should not be specified.
[mtk: fixes my commit 52e5819c41
]
Signed-off-by: Johannes Wellhöfer <johannes.wellhofer@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-19 08:54:41 +01:00
Jakub Wilk
cf14bdbde1
cacheflush.2: tfix
...
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-18 16:58:48 +01:00
Alejandro Colomar
d51b60ac01
execveat.2: Normalize notes about missing wrappers
...
It's been a long time sine kernel 3.19.
There's still no glibc wrapper.
......
$ grep -rn 'execveat *(' glibc/
$
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-17 21:55:12 +01:00
Alejandro Colomar
d75c2ffe21
cacheflush.2: Update SYNOPSIS for glibc wrapper
...
Glibc uses 'void *' instead of 'char *'.
And the prototype is declared in <sys/cachectl.h>.
......
$ syscall='cacheflush';
$ ret='int';
$ find glibc/ -type f -name '*.h' \
|xargs pcregrep -Mn "(?s)^[\w\s]*${ret}\s*${syscall}\s*\(.*?;";
glibc/sysdeps/unix/sysv/linux/nios2/sys/cachectl.h:27:
extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW;
glibc/sysdeps/unix/sysv/linux/mips/sys/cachectl.h:35:
extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW;
glibc/sysdeps/unix/sysv/linux/arc/sys/cachectl.h:30:
extern int cacheflush (void *__addr, int __nbytes, int __op) __THROW;
glibc/sysdeps/unix/sysv/linux/csky/sys/cachectl.h:30:
extern int cacheflush (void *__addr, const int __nbytes,
const int __op) __THROW;
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-17 21:55:12 +01:00
Michael Kerrisk
5efa68d57d
epoll_wait.2: Minor tweaks to Willem de Bruijn's patch
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-12 08:19:51 +01:00
Willem de Bruijn
ba47eb5e3c
epoll_wait.2: Add documentation of epoll_pwait2()
...
Expand the epoll_wait() page with epoll_pwait2(), an epoll_wait()
variant that takes a struct timespec to enable nanosecond
resolution timeout.
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-12 08:07:56 +01:00
Valentin Kettner
e71d103b2c
clone.2: Fix types in clone_args
...
A file descriptor is an int so it should be stored through an int
pointer while parent_tid should have the same type as child_tid
which is pid_t pointer.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-11 09:17:47 +01:00
Michael Kerrisk
0a23e9aac0
mprotect.2, readv.2, sigaltstack.2, sigreturn.2, ctime.3, scandir.3, random.4, pkeys.7: ffix: s/-1/\-1/
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 22:08:50 +01:00
Michael Kerrisk
9fd0c2f252
mlock.2: CONFORMING TO: note more explicitly which APIs are in the standards
...
The current wording is a little unclear...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 20:57:09 +01:00
Michael Kerrisk
45e399e7f8
alloc_hugepages.2: CONFORMING TO: reword to reflect that these system calls are long gone
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 20:52:49 +01:00
Michael Kerrisk
e4c07f6482
epoll_create.2: CONFORMING TO: mention also that epoll_create1() is Linux-specific
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 20:49:43 +01:00
Michael Kerrisk
f7f02d0f8d
epoll_wait.2: CONFORMING TO: mention also that epoll_pwait() is Linux-specific
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 20:47:47 +01:00
Michael Kerrisk
3d81c05a79
time.1, ioctl_console.2, daemon.3, updwtmp.3, mouse.4, smartpqi.4: tfix (Oxford comma)
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 12:53:15 +01:00
Michael Kerrisk
36dce68747
open.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 12:30:48 +01:00
Michael Kerrisk
3ded684c1a
Various pages: tfix (Oxford comma)
...
Found using:
git grep -lE '^[^.].*,.*,.*[^,] (and|or)\>'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 11:15:26 +01:00
Michael Kerrisk
735334d454
Various pages: tfix (Oxford comma)
...
Discovered using:
git grep -lE '^[^.].*, [^ ]*[^,] (or|and)\>'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 11:02:33 +01:00
Michael Kerrisk
e8d28f7cc9
ioctl_fslabel.2, ioctl_fideduperange.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 10:34:46 +01:00
Michael Kerrisk
f2fa055834
ioctl_console.2, msgctl.2, msgget.2, msgop.2, semctl.2, semget.2, semop.2, shm_open.3, shmget.2, shmop.2: ERRORS: remove redundant statement that 'errno' is set
...
This is implied in every other manual page. There is no need to
state it explicitly in these pages.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 10:21:57 +01:00
Michael Kerrisk
d9b17b7371
semget.2: tfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 10:14:48 +01:00
Michael Kerrisk
73b81e53fe
write.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 09:59:10 +01:00
Michael Kerrisk
2df7ea6cd8
getsid.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 09:57:41 +01:00
Michael Kerrisk
95887a0039
clone.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-09 09:51:59 +01:00
Michael Kerrisk
2c916a1d3c
Various pages: Remove redundant "\\ " to escape spaces
...
Reported-by: Alejandro Colomar (man-pages) <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-08 13:42:27 +01:00
Michael Kerrisk
51ebfb92a9
keyctl.2: wfix
...
Fix a glitch in commit ff91beca5b
.
Reported-by: Alejandro Colomar (man-pages) <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-08 10:06:35 +01:00
Alejandro Colomar
aa0da2b9b1
Various pages: tfix: Use Oxford comma
...
Found using:
$ pcregrep -rnM "^\.[B|I]R .*,\n\.[B|I].*[^,]\nor" man? \
|grep ^man \
|sort;
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-08 09:57:24 +01:00
Alejandro Colomar
03659d7d46
close.2, getpriority.2, ioctl_userfaultfd.2, expm1.3, lio_listio.3, rcmd.3, lirc.4, mount_namespaces.7: tfix: Fix punctuation
...
Found using:
$ pcregrep -rnM '^..[^"].*[^.]\.\n[a-z]' man?
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-08 09:55:25 +01:00