]>
git.ipfire.org Git - thirdparty/man-pages.git/log
Alejandro Colomar [Thu, 24 Sep 2020 10:13:06 +0000 (12:13 +0200)]
system_data_types.7: Add ldiv_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Thu, 24 Sep 2020 10:13:05 +0000 (12:13 +0200)]
div_t.3: New link to system_data_types(7)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Thu, 24 Sep 2020 10:13:04 +0000 (12:13 +0200)]
system_data_types.7: Add div_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Thu, 24 Sep 2020 09:58:55 +0000 (11:58 +0200)]
imaxdiv_t.3: New link to system_data_types(7)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Thu, 24 Sep 2020 09:58:54 +0000 (11:58 +0200)]
system_data_types.7: Add imaxdiv_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Thu, 24 Sep 2020 08:02:00 +0000 (10:02 +0200)]
strfromd.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Thu, 24 Sep 2020 08:00:16 +0000 (10:00 +0200)]
core.5: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Thu, 24 Sep 2020 07:59:57 +0000 (09:59 +0200)]
core.5: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Thu, 24 Sep 2020 07:57:27 +0000 (09:57 +0200)]
ldd.1: Minor tweak to 'ldd' output example
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Thu, 24 Sep 2020 07:47:55 +0000 (09:47 +0200)]
ptrace.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Thu, 24 Sep 2020 07:32:31 +0000 (09:32 +0200)]
pldd.1, bpf.2, clone.2, dup.2, ioctl_fat.2, nfsservctl.2, open_by_handle_at.2, perf_event_open.2, pivot_root.2, request_key.2, sched_setaffinity.2, seccomp.2, select.2, statx.2, dl_iterate_phdr.3, dlinfo.3, dlopen.3, insque.3, newlocale.3, printf.3, pthread_setname_np.3, rpc.3, stdarg.3, strfmon.3, veth.4, proc.5, slabinfo.5, cgroup_namespaces.7, cgroups.7, cpuset.7, fanotify.7, inotify.7, mount_namespaces.7, sock_diag.7, user_namespaces.7, ld.so.8: Use \(aq instead of ' inside monospace fonts
Use \(aq to get an unslanted single quote inside monospace code
blocks. Using a simple ' results in a slanted quote inside PDFs.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Thu, 24 Sep 2020 07:02:29 +0000 (09:02 +0200)]
open.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Wed, 23 Sep 2020 14:54:26 +0000 (16:54 +0200)]
ioctl_ns.2, stat.2: Fix signedness of printf specifiers
These variables are either of an unsigned integer type per POSIX;
or of an integer type per POSIX, that Linux defines as an unsigned integer type.
Print them with 'uintmax_t' instead of 'intmax_t' to avoid
big positive numbers being printed as negative numbers.
Bug report:
From: Konstantin Bukin @ 2020-09-13 15:04 UTC
To: mtk.manpages; +Cc: Konstantin Bukin, linux-man
inode numbers are expected to be positive. Casting them to a signed type
may result in printing negative values. E.g. running example program on
the following file:
$ ls -li test.txt
9280843260537405888 -r--r--r-- 1 kbukin hardware 300 Jul 21 06:36 test.txt
results in the following output:
$ ./example test.txt
ID of containing device: [0,480]
File type: regular file
I-node number: -
9165900813172145728
Mode: 100444 (octal)
Link count: 1
Ownership: UID=2743 GID=30
Preferred I/O block size: 32768 bytes
File size: 300 bytes
Blocks allocated: 8
Last status change: Tue Jul 21 06:36:50 2020
Last file access: Sat Sep 12 14:13:38 2020
Last file modification: Tue Jul 21 06:36:50 2020
Such erroneous reporting happens for inode values greater than maximum
value which can be stored in signed long. Casting does not seem to be
necessary here. Printing inode as unsigned long fixes the issue.
Reported-by: Konstantin Bukin <kbukin@gmail.com>
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Wed, 23 Sep 2020 13:17:07 +0000 (15:17 +0200)]
fexcept_t.3: New link to system_data_types(7)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Wed, 23 Sep 2020 13:17:06 +0000 (15:17 +0200)]
system_data_types.7: Add 'fexcept_t'
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Wed, 23 Sep 2020 08:38:45 +0000 (10:38 +0200)]
system_data_types.7: Reword description of fenv_t to avoid simply quoting POSIX text
The existing text comes straight from POSIX. In copyright terms,
this is at least a gray area, and in any case, simply reproducing
the text of the standard has limited value, since people can
consult the standard directly. So, rewrite the text, to simply
quote the description from fenv(3).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Tue, 22 Sep 2020 08:58:14 +0000 (10:58 +0200)]
system_data_types.7: ffix
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 08:39:33 +0000 (10:39 +0200)]
id_t.3: New link to system_data_types(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 08:38:42 +0000 (10:38 +0200)]
system_data_types.7: Add 'id_t'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 08:29:04 +0000 (10:29 +0200)]
system_data_types.7: Add self to copyright notice
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 08:29:39 +0000 (10:29 +0200)]
gid_t.3: New link to system_data_types(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 08:28:08 +0000 (10:28 +0200)]
system_data_types.7: Add 'gid_t'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 08:23:14 +0000 (10:23 +0200)]
uid_t.3: New link to system_data_types(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 08:22:35 +0000 (10:22 +0200)]
system_data_types.7: Add 'uid_t'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 08:08:14 +0000 (10:08 +0200)]
kcmp.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 08:03:07 +0000 (10:03 +0200)]
credentials.7: SEE ALSO: add system_data_types(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 07:59:57 +0000 (09:59 +0200)]
system_data_types.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 07:56:03 +0000 (09:56 +0200)]
system_data_types.7: Add further POSIX details for size_t, ssize_t, and suseconds_t
The implementation shall support one or more programming
environments where these types are no wider than 'long'.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 07:52:08 +0000 (09:52 +0200)]
pid_t.3: New link to system_data_types(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 07:51:41 +0000 (09:51 +0200)]
system_data_types.7: Document pid_t
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 07:31:14 +0000 (09:31 +0200)]
sigset_t.3: New link to system_data_types.7
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 07:30:31 +0000 (09:30 +0200)]
system_data_types.7: Add description of sigset_t
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 22 Sep 2020 07:18:41 +0000 (09:18 +0200)]
system_data_types.7: Add brief description of regmatch_t
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Mon, 21 Sep 2020 15:25:17 +0000 (17:25 +0200)]
fenv_t.3: New link to new documented type in system_data_types(7)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Mon, 21 Sep 2020 15:25:16 +0000 (17:25 +0200)]
system_data_types.7: Document fenv_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Mon, 21 Sep 2020 14:47:15 +0000 (16:47 +0200)]
system_data_types.7: wfix
A limit can be defined by other than POSIX
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Mon, 21 Sep 2020 14:08:18 +0000 (16:08 +0200)]
system_data_types.7: Minor tweaks to Alejandro Colomar's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Mon, 21 Sep 2020 13:32:57 +0000 (15:32 +0200)]
system_data_types.7: Describe use of printf()/scanf() modifiers for integer data types
Add note about length modifiers and conversions to [u]intmax_t,
and add a corresponding example.
Reported-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Sun, 20 Sep 2020 20:14:51 +0000 (22:14 +0200)]
system_data_types.7: Minor tweaks to Alejandro Colomar's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Sun, 20 Sep 2020 18:14:08 +0000 (20:14 +0200)]
system_data_types.7: Specify the length modifiers for the variables that have them
Reported-by: Florian Weimer <fweimer@redhat.com>
Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Reviewed-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Sun, 20 Sep 2020 18:05:52 +0000 (20:05 +0200)]
siginfo_t.3: New link to new documented type in system_data_types(7)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Sun, 20 Sep 2020 20:07:11 +0000 (22:07 +0200)]
system_data_types.7: Defer to sigaction(2) for further information on siginfo_t
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Sun, 20 Sep 2020 20:05:10 +0000 (22:05 +0200)]
system_data_types.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Sun, 20 Sep 2020 18:05:51 +0000 (20:05 +0200)]
system_data_types.7: Document siginfo_t
Note: There are a few members of this structure that are
not required by POSIX (XSI extensions, and such).
I simply chose to not document them at all.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Sun, 20 Sep 2020 12:17:54 +0000 (14:17 +0200)]
syscalls.2: Move system calls from discontinued ports out of main syscall list
Various ports that had their own indigenous system calls have
been discontinued. Remove those system calls (none of which had
manual pages!) to a separate part of the page, to avoid
cluttering the main list of system calls.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Sun, 20 Sep 2020 11:37:40 +0000 (13:37 +0200)]
getcwd.2, mq_notify.2, mq_open.2, mq_timedreceive.2, mq_timedsend.2, mq_unlink.2: Reinstate links to section 3 pages that document system calls
Some of the links removed in commit
247c654385128fd0748 should
have been kept, because in some cases there are real system
calls whose wrapper functions are documented in Section 3.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Sun, 20 Sep 2020 11:21:46 +0000 (13:21 +0200)]
syscalls.2: Remove duplicate entry for swapcontext(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Sat, 19 Sep 2020 08:26:21 +0000 (10:26 +0200)]
ip.7: Minor wording fixes
Mainly cleaning up usages of "only".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Sat, 19 Sep 2020 08:22:55 +0000 (10:22 +0200)]
ip.7: Minor edits to Stephen Smalley's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Stephen Smalley [Thu, 17 Sep 2020 17:31:43 +0000 (13:31 -0400)]
ip.7: Document IP_PASSSEC for UDP sockets
Document the IP_PASSSEC socket option and SCM_SECURITY
ancillary/control message type for UDP sockets.
IP_PASSSEC for UDP sockets was introduced in Linux 2.6.17 [1].
Example NetLabel and IPSEC configurations and usage of this
option can be found in the SELinux Notebook [2] and SELinux
testsuite [3].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
2c7946a7bf45ae86736ab3b43d0085e43947945c
[2] https://github.com/SELinuxProject/selinux-notebook
[3] https://github.com/SELinuxProject/selinux-testsuite
Reviewed-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Thu, 17 Sep 2020 07:42:11 +0000 (09:42 +0200)]
ip.7, unix.7: Minor edits to Stephen Smalley's patches
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Thu, 17 Sep 2020 07:36:05 +0000 (09:36 +0200)]
unix.7: srcfix: rewrap source lines in Stephen Smalley's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Thu, 17 Sep 2020 07:33:46 +0000 (09:33 +0200)]
ip.7: srcfix: rewrap source lines in Stephen Smalley's patch
(No content changes.)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Stephen Smalley [Tue, 15 Sep 2020 16:39:59 +0000 (12:39 -0400)]
socket.7,ip.7: Document SO_PEERSEC for AF_INET sockets
Augment the description of SO_PEERSEC to cover AF_INET sockets in
addition to the prior description for AF_UNIX.
SO_PEERSEC for TCP sockets was introduced in Linux 2.6.17 [1], and
SO_PEERSEC for SCTP sockets was introduced in Linux 4.17 [2].
This does not cover usage of SCM_SECURITY for UDP sockets, which
was also introduced in the same commit for 2.6.17.
Examples of the necessary labeled IPSEC and NetLabel
configurations to enable use of SO_PEERSEC for TCP and SCTP
sockets can be found in the SELinux Notebook [3] and the
selinux-testsuite [4].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
2c7946a7bf45ae86736ab3b43d0085e43947945c
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
d452930fd3b9031e59abfeddb2fa383f1403d61a
[3] https://github.com/SELinuxProject/selinux-notebook
[4] https://github.com/SELinuxProject/selinux-testsuite
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Stephen Smalley [Mon, 14 Sep 2020 18:07:00 +0000 (14:07 -0400)]
socket.7, unix.7: Add initial description for SO_PEERSEC
SO_PEERSEC was introduced for AF_UNIX stream sockets connected via
connect(2) in Linux 2.6.2 [1] and later augmented to support
AF_UNIX stream and datagram sockets created via socketpair(2) in
Linux 4.18 [2]. Document SO_PEERSEC in the socket.7 and unix.7
man pages following the example of the existing SO_PEERCRED
descriptions. SO_PEERSEC is also supported on AF_INET sockets
when using labeled IPSEC or NetLabel but defer adding a
description of that support to a separate patch.
The module-independent description of the security context
returned by SO_PEERSEC is from Simon McVittie.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=
da6e57a2e6bd7939f610d957afacaf6a131e75ed
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
0b811db2cb2aabc910e53d34ebb95a15997c33e7
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Cowritten-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Sat, 19 Sep 2020 08:07:26 +0000 (10:07 +0200)]
sigevent.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Sat, 19 Sep 2020 08:02:51 +0000 (10:02 +0200)]
sigevent.7: Note that 'sigev_notify_thread_id' is Linux-specific
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Sat, 19 Sep 2020 07:59:36 +0000 (09:59 +0200)]
system_data_types.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Fri, 18 Sep 2020 22:16:50 +0000 (00:16 +0200)]
system_data_types.7: Minor tweaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 17:04:41 +0000 (19:04 +0200)]
aiocb.3: New link to new documented type in system_data_types(7)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Fri, 18 Sep 2020 21:26:29 +0000 (23:26 +0200)]
system_data_types.7: Defer to aio(7) for further information about 'struct aiocb'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 17:04:40 +0000 (19:04 +0200)]
system_data_types.7: Document aiocb
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 17:04:39 +0000 (19:04 +0200)]
system_data_types.7: srcfix: cosmetic: Visually separate types
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Fri, 18 Sep 2020 21:08:28 +0000 (23:08 +0200)]
system_data_types.7: Add reference to sigevent(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 17:04:37 +0000 (19:04 +0200)]
system_data_types.7: Document sigevent
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 17:04:35 +0000 (19:04 +0200)]
system_data_types.7: ffix
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 13:29:44 +0000 (15:29 +0200)]
regmatch_t.3: New link for new documented type in system_data_types(7)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 13:29:43 +0000 (15:29 +0200)]
system_data_types.7: Document regmatch_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 13:29:42 +0000 (15:29 +0200)]
system_data_types.7: ffix
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 12:45:55 +0000 (14:45 +0200)]
system_data_types.7: srcfix: Add FIXME notes
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 12:45:54 +0000 (14:45 +0200)]
regoff_t.3: New link to new documented type in system_data_types(7)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 12:45:53 +0000 (14:45 +0200)]
system_data_types.7: Document regoff_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 12:04:41 +0000 (14:04 +0200)]
ptrdiff_t.3: New link to new documented type in system_data_types(7)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 12:04:40 +0000 (14:04 +0200)]
system_data_types.7: Document ptrdiff_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 12:04:39 +0000 (14:04 +0200)]
system_data_types.7: wfix: sort referenced types
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 12:04:38 +0000 (14:04 +0200)]
system_data_types.7: srcfix: Remove TODO comment
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Fri, 18 Sep 2020 20:08:02 +0000 (22:08 +0200)]
system_data_types.7: Add read(2) and write(2) to "See also" for size_t
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 11:27:56 +0000 (13:27 +0200)]
size_t.3: New link to new documented type in system_data_types(7)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 18 Sep 2020 11:27:55 +0000 (13:27 +0200)]
system_data_types.7: Document size_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Thu, 17 Sep 2020 20:31:59 +0000 (22:31 +0200)]
feature_test_macros.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Thu, 17 Sep 2020 20:31:30 +0000 (22:31 +0200)]
intro.2, intro.3, feature_test_macros.7, standards.7: SEE ALSO: add system_data_types(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Thu, 17 Sep 2020 20:29:29 +0000 (22:29 +0200)]
system_data_types.7: Add SEE ALSO references to feature_test_macros(7) and standards(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Thu, 17 Sep 2020 10:43:00 +0000 (12:43 +0200)]
sigval.3, ssize_t.3, suseconds_t.3, time_t.3, timer_t.3, timespec.3, timeval.3: New links to new system_data_types(7) page
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Thu, 17 Sep 2020 10:42:59 +0000 (12:42 +0200)]
system_data_types.7: Add a new page to document system data types
The initial version documents sigval, ssize_t, suseconds_t,
time_t, timer_t, timespec, and timeval.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Marko Hrastovec [Thu, 17 Sep 2020 05:33:32 +0000 (07:33 +0200)]
freeaddrinfo.3: Fix memory leaks in freeaddrinfo() examples
[mtk: the coding style used in the example could lead people to
inject memory leaks in their code if they cut/paste/modify the
code to replace "exit" paths with "return" paths from a library
function.]
[Marko, from the mail thread discussing this patch:]
You are right about terminating the process. However, people copy
that example and put the code in a function changing "exit" to
"return". There are a bunch of examples like that here
https://beej.us/guide/bgnet/html/#poll, for instance. That error
bothered me when reading the network programming guide
https://beej.us/guide/bgnet/html/. Than I looked for information
elsewhere:
https://stackoverflow.com/questions/
6712740 /valgrind-reporting-that-getaddrinfo-is-leaking-memory
https://stackoverflow.com/questions/
15690303 /server-client-sockets-freeaddrinfo3-placement
And finally, I checked manual pages and saw where these errors
come from.
When you change that to a function and return without doing
freeaddrinfo, that is a memory leak. I believe an example should
show good programming practices. Relying on exiting and clearing
the memory in that case is not such a case. In my opinion, these
examples lead people to make mistakes in their programs.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Wed, 16 Sep 2020 14:26:12 +0000 (16:26 +0200)]
sigaction.2: Use correct POSIX type for siginfo_t.si_value
Reported-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 15 Sep 2020 08:44:00 +0000 (10:44 +0200)]
man-pages.7: Add some more requests re code examples
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 15 Sep 2020 07:57:23 +0000 (09:57 +0200)]
man-pages.7: Soften the statement that ideal programs should be short
Sometimes, a longer program is needed. See
https://twitter.com/shuveb/status/
1305689727715086337 .
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Tue, 15 Sep 2020 05:38:52 +0000 (07:38 +0200)]
fanotify.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Mon, 14 Sep 2020 08:44:59 +0000 (10:44 +0200)]
add_key.2, clock_getres.2, clone.2, futex.2, getdents.2, getpid.2, getrlimit.2, ioctl_ns.2, kcmp.2, keyctl.2, memfd_create.2, request_key.2, stat.2, timer_create.2, wait.2, clock_getcpuclockid.3, dl_iterate_phdr.3, getgrent_r.3, getpwent_r.3, getpwnam.3, posix_spawn.3, pthread_getcpuclockid.3, strcat.3, feature_test_macros.7, user_namespaces.7: Switch printf() casts to use [u]intmax_t + %ju / %jd
Let's move to the 21st century. Instead of casting system data
types to long/long long/etc. in printf() calls, instead cast to
intmax_t or uintmax_t, the largest available signed/unsigned
integer types.
[mtk: rewrote commit message]
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Sat, 12 Sep 2020 10:06:41 +0000 (12:06 +0200)]
clock_getres.2: Cast 'time_t' to 'int' for printf() and fix the length modifiers
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Reviewed-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 11 Sep 2020 23:14:07 +0000 (01:14 +0200)]
userfaultfd.2: Use 'PRIx64' rather than "%llx" when printing 64-bit fixed-width types
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 11 Sep 2020 23:14:06 +0000 (01:14 +0200)]
rtld-audit.7: Use "%u" rather than "%d" when printing 'unsigned int' values
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 11 Sep 2020 23:14:09 +0000 (01:14 +0200)]
open_by_handle_at.2: Use "%u" rather than "%d" when printing 'unsigned int' values
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 11 Sep 2020 23:14:11 +0000 (01:14 +0200)]
mprotect.2: Use "%p" rather than casting to 'long' when printing pointer values
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 11 Sep 2020 23:14:02 +0000 (01:14 +0200)]
malloc_hook.3: Remove unneeded cast, and print 'size_t' with "%zu"
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 11 Sep 2020 20:53:51 +0000 (22:53 +0200)]
eventfd.2, mprotect.2, pidfd_open.2, spu_run.2, timer_create.2, bswap.3, dl_iterate_phdr.3, endian.3, pthread_attr_init.3, pthread_getattr_np.3, vcs.4, rtld-audit.7: In printf(): s/0x%/%#/ except when followed by X instead of x
Use printf()'s '#' flag character to prepend the string "0x".
However, when the number is printed in uppercase, and the prefix
is in lowercase, the string "0x" needs to be manually written.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 11 Sep 2020 23:09:18 +0000 (01:09 +0200)]
getaddrinfo_a.3: Use C99 style to declare loop counter variables
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Alejandro Colomar [Fri, 11 Sep 2020 20:12:10 +0000 (22:12 +0200)]
msgctl.2, outb.2, abs.3, dl_iterate_phdr.3, drand48.3, drand48_r.3, encrypt.3, ffs.3, lrint.3, lround.3, ntp_gettime.3, printf.3, random.3, scalbln.3, scanf.3, strtol.3, strtoul.3, utmp.5, feature_test_macros.7, rtld-audit.7: Omit 'int' keyword for 'short', 'long' and 'long long' types, both signed and 'unsigned'
For consistency.
The types are written both with and without the redundant 'int' keyword
all over the man-pages. However, the most used form, by far, is the one
without 'int'.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Michael Kerrisk [Fri, 11 Sep 2020 12:24:56 +0000 (14:24 +0200)]
pthread_attr_init.3, pthread_create.3, pthread_getattr_np.3: Use correct type (size_t) for some variables
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>