]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
15 months agolint-man.mk: lint-man-mandoc: Silence warnings about missing date
Alejandro Colomar [Thu, 9 Mar 2023 15:59:50 +0000 (16:59 +0100)] 
lint-man.mk: lint-man-mandoc: Silence warnings about missing date

tzdb pages have no date it them.  Don't warn about that.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agotzfile.5, tzselect.8, zdump.8, zic.8: sync pages from tzdb
Alejandro Colomar [Thu, 9 Mar 2023 00:20:24 +0000 (01:20 +0100)] 
tzfile.5, tzselect.8, zdump.8, zic.8: sync pages from tzdb

Cc: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agosuffixes.7: Add .jsx and .tsx
Alejandro Colomar [Thu, 9 Mar 2023 13:15:07 +0000 (14:15 +0100)] 
suffixes.7: Add .jsx and .tsx

Cc: Timo Stark <t.stark@nginx.com>
Cc: Andrew Clayton <andrew@digital-domain.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoCONTRIBUTING: tfix
Tom Schwindl [Thu, 9 Mar 2023 07:39:00 +0000 (07:39 +0000)] 
CONTRIBUTING: tfix

Signed-off-by: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoman*/: ffix
Tom Schwindl [Wed, 8 Mar 2023 21:01:11 +0000 (21:01 +0000)] 
man*/: ffix

Signed-off-by: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoINSTALL, cmd.mk, install-man.mk: Support installing compressed pages
Alejandro Colomar [Wed, 8 Mar 2023 22:41:11 +0000 (23:41 +0100)] 
INSTALL, cmd.mk, install-man.mk: Support installing compressed pages

Distributions usually install compressed (.gz) pages to reduce space.
Let's support this in our build system, as a command-line variable "Z",
which is empty by default, but can be set to a file extension to append
to the page names (and the appropriate compression program will be
used).  For now, the only compression supported is ".gz".

Example:

    $ make install Z=.gz

This can be combined with LINK_PAGES, to produce compressed pages and
use symbolic links for the link pages:

    $ make install Z=.gz LINK_PAGES=symlink

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agocmd.mk, install-man.mk: Allow installing link pages as symlinks
Alejandro Colomar [Wed, 8 Mar 2023 01:02:31 +0000 (02:02 +0100)] 
cmd.mk, install-man.mk: Allow installing link pages as symlinks

We keep them as .so "includes" in our source code, but if some
distribution wants to have them as symlinks in their filesystem, make it
easy for them to install as such, by specifying 'LINK_PAGES=symlink'.

Example:

    $ make install LINK_PAGES=symlink

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoCONTRIBUTING: Fix typo, there is one active maintainer
Rodrigo Campos [Wed, 8 Mar 2023 15:22:18 +0000 (16:22 +0100)] 
CONTRIBUTING: Fix typo, there is one active maintainer

On commit "CONTRIBUTING, README, lsm: Remove mtk as maintainer"
(06e72cb1) we changed to mail only one maintainer, but the doc still
says "both maintainers".

When submitting a patch, I was confused by that fact and thought Michael
address was missing.  But after checking, it seems we just need to send
it to Alejandro, so clarify the text to match that.

Signed-off-by: Rodrigo Campos <rodrigo@sdfg.com.ar>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agotzfile.5, tzselect.8: sync from tzdb upstream
Paul Eggert [Wed, 8 Mar 2023 05:11:38 +0000 (21:11 -0800)] 
tzfile.5, tzselect.8: sync from tzdb upstream

This makes tzfile.5 and tzselect.8 a copy of the tzdb develoment
version (commit 12b48faf10c265ee3ea1aad8cdb5c8239eea65a0), except that
man-pages boilerplate surrounds the copyright notice, and the .TH line
uses man-pages format.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agostring_copying.7: Modify implementation of stpecpy()
Alejandro Colomar [Wed, 8 Mar 2023 12:29:02 +0000 (13:29 +0100)] 
string_copying.7: Modify implementation of stpecpy()

-  Don't crash on invalid input.  That should be done in a wrapper, if
   wanted.

-  Accept NULL as input, since that allows chaining with stpeprintf().

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoman3/: srcfix (\" t comments)
Alejandro Colomar [Wed, 8 Mar 2023 00:12:41 +0000 (01:12 +0100)] 
man3/: srcfix (\" t comments)

Add missing or remove redundant \" t comments (for tbl(1)).

Reported-by: mandoc(1) (make lint-man-mandoc)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agostring_copying.7: srcfix (unmatched RE)
Alejandro Colomar [Wed, 8 Mar 2023 00:09:01 +0000 (01:09 +0100)] 
string_copying.7: srcfix (unmatched RE)

Reported-by: mandoc(1) (make lint-man-mandoc)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoman*/: srcfix (IP)
Alejandro Colomar [Tue, 7 Mar 2023 23:37:28 +0000 (00:37 +0100)] 
man*/: srcfix (IP)

Two consecutive IPs without text don't make sense, since they are
paragraph separators.  The reason we needed it was that PD 0 was
misplaced.

This extra IP was also causing another problem: we needed to specify
again the indentation of the outer list.

Reported-by: mandoc(1) (make lint-man-mandoc)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoman*/: ffix (semantic newlines; commas)
Alejandro Colomar [Tue, 7 Mar 2023 23:31:26 +0000 (00:31 +0100)] 
man*/: ffix (semantic newlines; commas)

Reported-by: mandoc(1) (make lint-man-mandoc)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoMakefile: help: Document lint-c-cppcheck
Alejandro Colomar [Tue, 7 Mar 2023 23:24:13 +0000 (00:24 +0100)] 
Makefile: help: Document lint-c-cppcheck

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoudp.7: Fix man page reference (section number)
Alejandro Colomar [Mon, 6 Mar 2023 13:36:24 +0000 (14:36 +0100)] 
udp.7: Fix man page reference (section number)

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoudp.7: add UDP_GRO
Willem de Bruijn [Thu, 2 Mar 2023 15:48:08 +0000 (10:48 -0500)] 
udp.7: add UDP_GRO

UDP_GRO was added in commit e20cf8d3f1f7
("udp: implement GRO for plain UDP sockets.")

    $ git describe --contains e20cf8d3f1f7
    linux/v5.0-rc1~129^2~379^2~8

Kernel source has example code in tools/testing/selftests/net/udpgro*

Per https://www.kernel.org/doc/man-pages/patches.html,
"Describe how you obtained the information in your patch":
I reviewed the relevant UDP_GRO patches.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Cc: <pabeni@redhat.com>
Cc: <netdev@vger.kernel.org>
[ alx: srcfix ]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoudp.7: add UDP_SEGMENT
Willem de Bruijn [Thu, 2 Mar 2023 15:48:07 +0000 (10:48 -0500)] 
udp.7: add UDP_SEGMENT

UDP_SEGMENT was added in commit bec1f6f69736
("udp: generate gso with UDP_SEGMENT")

    $ git describe --contains bec1f6f69736
    linux/v4.18-rc1~114^2~377^2~8

Kernel source has example code in tools/testing/selftests/net/udpgso*

Per https://www.kernel.org/doc/man-pages/patches.html,
"Describe how you obtained the information in your patch":
I am the author of the above commit and follow-ons.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Cc: <pabeni@redhat.com>
Cc: <netdev@vger.kernel.org>
[ alx: srcfix + use interval notation ]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agorecv.2: Mention SOCK_SEQPACKET in MSG_TRUNC flag description
Vladislav Ivanishin [Sun, 12 Feb 2023 13:38:04 +0000 (16:38 +0300)] 
recv.2: Mention SOCK_SEQPACKET in MSG_TRUNC flag description

unix_seqpacket_recvmsg() calls unix_dgram_recvmsg() which handles
MSG_TRUNC. This has been the case since the handling was added in
9f6f9af7694ede6314bed281eec74d588ba9474f; see net/unix/af_unix.c:

static int unix_seqpacket_recvmsg([...])
{
        [...]
return unix_dgram_recvmsg(iocb, sock, msg, size, flags);
}

The sequential-packet socket type seems to have been left out from the
description by an oversight.

Signed-off-by: Vladislav Ivanishin <vlad@ispras.ru>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoinstall-man.mk: Update copyright year
Alejandro Colomar [Sun, 5 Mar 2023 01:13:47 +0000 (02:13 +0100)] 
install-man.mk: Update copyright year

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoinstall-man.mk, src.mk: Respect user-specified man dirs
Alejandro Colomar [Sat, 4 Mar 2023 20:50:57 +0000 (21:50 +0100)] 
install-man.mk, src.mk: Respect user-specified man dirs

If a user specifies man3dir=/.../man3c, respect it and install there.
Currently, we were transforming link pages to use that dir name, but the
install location itself was still being calculated, which generated
inconsistently installed pages.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoinstall-man.mk: Fix link pages when installing in different mandirs
Alejandro Colomar [Sat, 4 Mar 2023 20:03:24 +0000 (21:03 +0100)] 
install-man.mk: Fix link pages when installing in different mandirs

If downstream wants to put pages in different places (e.g., Debian uses
man2/ and man3/, rather than man2type/ and man3const/, man3head/, and
man3type/), make it easy for them.  Link pages need to be fixed
according to the dirname where the pages are actually being installed.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoinstall-man.mk: Add missing variable $man3constext
Alejandro Colomar [Sat, 4 Mar 2023 20:00:51 +0000 (21:00 +0100)] 
install-man.mk: Add missing variable $man3constext

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoclone.2: Note EINVAL when exit_signal + bad flags
Jack Pearson [Tue, 28 Feb 2023 23:42:46 +0000 (15:42 -0800)] 
clone.2: Note EINVAL when exit_signal + bad flags

Document that Linux will report EINVAL when exit_signal is specified and
either CLONE_THREAD or CLONE_PARENT is specified.

From clone3_args_valid in Linux:
```
if ((kargs->flags & (CLONE_THREAD | CLONE_PARENT)) &&
    kargs->exit_signal)
return false;
```

I have verified that this happens on my kernel with a small program:

```
 #include <stdio.h>
 #include <linux/sched.h>
 #include <signal.h>
 #include <sys/syscall.h>
 #include <unistd.h>

int main(void)
{
struct clone_args ca = {
.flags = CLONE_THREAD | CLONE_SIGHAND | CLONE_VM,
.exit_signal = SIGCHLD, // comment me out to fix error
.set_tid_size = 0,
};
syscall(SYS_clone3, &ca, sizeof(struct clone_args));
perror("");
}
```

And I have verified that this doesn't happen with normal `clone` through
the glibc helper:

```
 #define _GNU_SOURCE

 #include <sched.h>
 #include <signal.h>
 #include <stdio.h>
 #include <sys/mman.h>

int do_nothing(void *_) { return 0; }

int main(void)
{
        void *map = mmap(NULL, 0x10000, PROT_READ | PROT_WRITE,
                 MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
void *stack_top = map + 0x10000 - 1;
clone(do_nothing, stack_top,
      CLONE_THREAD | CLONE_VM | CLONE_SIGHAND | SIGCHLD, NULL);
perror("");
}
```

Signed-off-by: Jack Pearson <jack@pearson.onl>
Cc: "Carlos O'Donell" <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoptrace.2: Add details about usage of PTRACE_GET_SYSCALL_INFO
Fotios Valasiadis [Mon, 27 Feb 2023 19:17:31 +0000 (21:17 +0200)] 
ptrace.2: Add details about usage of PTRACE_GET_SYSCALL_INFO

Document the role of PTRACE_O_TRACESYSGOOD option in connection with
PTRACE_GET_SYSCALL_INFO.

Came upon this after writing a test program using
PTRACE_GET_SYSCALL_INFO.  After failing to find what's wrong I posted a
StackOverflow question which you can find right here:
<https://stackoverflow.com/questions/72410182/ptrace-get-syscall-info-always-returns-info-op-as-ptrace-syscall-info-none>

Nate Eldredge found out what happens by looking into the kernel's source
code, here is a link to the relevant part
<https://github.com/torvalds/linux/blob/8291eaafed36f575f23951f3ce18407f480e9ecf/kernel/ptrace.c#L1018>

In the code it can be seen that in case of system call entry or exit
stops, the union is filled if and only if the signal matches
`SIGTRAP | 0x80`, a signal which is only sent if the
PTRACE_O_TRACESYSGOOD option is set.  You can read about that in the
PTRACE_O_TRACESYSGOOD section of ptrace(2)'s manual.

Complements: fc91449cb "ptrace.2: Document PTRACE_GET_SYSCALL_INFO"
Cowritten-by: Dmitry V. Levin <ldv@strace.io>
Signed-off-by: Dmitry V. Levin <ldv@strace.io>
Signed-off-by: Fotios Valasiadis <fvalasiad@gmail.com>
Acked-by: Nate Eldredge <nate@thatsmathematics.com>
Cc: Elvira Khabirova <lineprinter0@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agosuffixes.7: Add .js and .ts extensions
Alejandro Colomar [Sun, 26 Feb 2023 15:33:46 +0000 (16:33 +0100)] 
suffixes.7: Add .js and .ts extensions

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agomalloc.3: EXAMPLES: Add example program with mallocarray() and macros
Alejandro Colomar [Sat, 25 Feb 2023 01:52:42 +0000 (02:52 +0100)] 
malloc.3: EXAMPLES: Add example program with mallocarray() and macros

mallocarray() is safer than malloc(3), since it checks for overflow; it
should be preferred almost always (with the exception of non-arrays
maybe).

The macros like MALLOCARRAY() --and MALLOC()-- that perform automatic
casting and sizeof() are also safer than calling the functions directly:

-  The type of the allocated object (not the pointer) is specified as an
   argument, which improves readability:
   -  It is directly obvious what is the type of the object just by
      reading the macro call.
   -  It allows grepping for all allocations of a given type.

   This is admittedly similar to using sizeof() to get the size of the
   object, but we'll see why this is better.

-  In the case of reallocation macros, an extra check is performed to
   make sure that the previous pointer was compatible with the allocated
   type, which can avoid some mistakes.

-  The cast is performed automatically, with a pointer type derived from
   the type of the object.  This is the best point of this macro, since
   it does an automatic cast, where there's no chance of typos.

   Usually, programmers have to decide whether to cast or not the result
   of malloc(3).  Casts usually hide warnings, so are to be avoided.
   However, these functions already return a void *, so a cast doesn't
   really add much danger.  Moreover, a cast can even add warnings in
   this exceptional case, if the type of the cast is different than the
   type of the assigned pointer.  Performing a manual cast is still not
   perfect, since there are chances that a mistake will be done, and
   even ignoring accidents, they clutter code, hurting readability.
   And now we have a cast that is synced with sizeof.

-  Whenever the type of the object changes, since we perform an explicit
   cast to the old type, there will be a warning due to type mismatch in
   the assignment, so we'll be able to see all lines that are affected
   by such a change.  This is especially important, since changing the
   type of a variable and missing to update an allocation call far away
   from the declaration is easy, and the consequences can be quite bad

Apart from those benefits, there are other minor style benefits:

-  Consistency in getting the size of the object from sizeof(type),
   instead of a mix of sizeof(type) sometimes and sizeof(*p) other
   times.

-  More readable code: no casts, and no sizeof(), so also shorter lines
   that we don't need to cut.

-  Consistency in using array allocation calls for allocations of arrays
   of objects, even when the object size is 1.

Link: <https://github.com/shadow-maint/shadow/pull/649>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: "Valentin V. Bartenev" <vbartenev@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agosetpgid.2: ERRORS: Add EPERM for nonexisting process group
Guy Shefy [Mon, 20 Feb 2023 16:08:30 +0000 (18:08 +0200)] 
setpgid.2: ERRORS: Add EPERM for nonexisting process group

Reproduced using test program:

 #include <stdio.h>
 #include <sys/types.h>
 #include <unistd.h>

int main(void) {
pid_t  pid_a, pid_b;

pid_a = fork();
printf("pid: %i; pgid: %i; forkA: %i\n",
       (int) getpid(), (int) getpgrp(), (int) pid_a);
if (!pid_a) {
// pid_a is not a valid process group
// setpgid(0, 0);  // This makes it succeed.
sleep(1); // stay alive
return 0;
}
pid_b = fork();
if (!pid_b) {
printf("* pid: %i; pgid: %i; forkA: %i; forkB: %i\n",
       (int)getpid(), (int)getpgrp(), (int)pid_a, (int)pid_b);
setpgid(0, pid_a);
perror("setpgid");
return 0;
}
printf("pid: %i; pgid: %i; forkA: %i; forkB: %i\n",
       (int) getpid(), (int) getpgrp(), (int) pid_a, (int) pid_b);
sleep(1); // stay alive
return 0;
}

Signed-off-by: Guy Shefy <guyshefyb@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agolandlock.7: ffix
Alejandro Colomar [Fri, 24 Feb 2023 23:13:50 +0000 (00:13 +0100)] 
landlock.7: ffix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agolandlock.7: Move the warning about missing features into the CAVEATS section
Günther Noack [Tue, 21 Feb 2023 20:50:21 +0000 (21:50 +0100)] 
landlock.7: Move the warning about missing features into the CAVEATS section

Putting the warning there makes it more prominent.
CAVEATS is a standard section that exists in many man pages
and is also described in man-pages(7).

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agosscanf.3: RETURN VALUE: These functions don't use a stream
Alejandro Colomar [Wed, 15 Feb 2023 18:05:34 +0000 (19:05 +0100)] 
sscanf.3: RETURN VALUE: These functions don't use a stream

This text I forgot to remove it when the page was split from scanf(3).

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoprintf.h.3head: ffix
Alejandro Colomar [Wed, 15 Feb 2023 17:44:22 +0000 (18:44 +0100)] 
printf.h.3head: ffix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agomemcmp.3: wfix
Tom Schwindl [Wed, 15 Feb 2023 17:33:43 +0000 (17:33 +0000)] 
memcmp.3: wfix

Link: <https://lore.kernel.org/linux-man/27264e6b-bc50-f772-f8d5-1abc4ebcbe62@gmail.com/T/>
Signed-off-by: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoStart of man-pages-NEXT: Move Changes to Changes.old
Alejandro Colomar [Sun, 12 Feb 2023 21:39:59 +0000 (22:39 +0100)] 
Start of man-pages-NEXT: Move Changes to Changes.old

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agolsm: Released 6.03
Alejandro Colomar [Sun, 12 Feb 2023 21:08:39 +0000 (22:08 +0100)] 
lsm: Released 6.03

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoChanges: Ready for 6.03 man-pages-6.03
Alejandro Colomar [Sun, 12 Feb 2023 20:32:12 +0000 (21:32 +0100)] 
Changes: Ready for 6.03

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months ago_Generic.3: Remove example code
Alejandro Colomar [Sun, 12 Feb 2023 19:32:41 +0000 (20:32 +0100)] 
_Generic.3: Remove example code

Casting sockaddr structures is just a symptom that these APIs were
seriously misdesigned.  In GNU C, there's already a better way to handle
this (see [[gnu::transparent_union]]).  ISO C should be fixed.  Let's
not promote this kind of code.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoprintf.h.3head: ffix
Alejandro Colomar [Sun, 12 Feb 2023 19:26:29 +0000 (20:26 +0100)] 
printf.h.3head: ffix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoman2/: use consistent closed interval notation for value ranges
Brian Inglis [Wed, 8 Feb 2023 20:27:25 +0000 (13:27 -0700)] 
man2/: use consistent closed interval notation for value ranges

Signed-off-by: Alejandro Colomar <alx@kernel.org>
15 months agoPA_CHAR.3const, PA_DOUBLE.3const, PA_FLAG_LONG.3const, PA_FLAG_LONG_DOUBLE.3const...
Alex Colomar [Mon, 19 Sep 2022 16:15:05 +0000 (18:15 +0200)] 
PA_CHAR.3const, PA_DOUBLE.3const, PA_FLAG_LONG.3const, PA_FLAG_LONG_DOUBLE.3const, PA_FLAG_LONG_LONG.3const, PA_FLAG_PTR.3const, PA_FLAG_SHORT.3const, PA_FLOAT.3const, PA_INT.3const, PA_LAST.3const, PA_POINTER.3const, PA_STRING.3const, PA_WCHAR.3const, PA_WSTRING.3const: Add links to printf.h(3head)

Cc: Walter Harms <wharms@bfs.de>
Cc: <Radisson97@gmx.de>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: <libc-alpha@sourceware.org>
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
15 months agoprintf_arginfo_size_function.3type, printf_function.3type, printf_info.3type, printf_...
Alex Colomar [Mon, 19 Sep 2022 16:14:49 +0000 (18:14 +0200)] 
printf_arginfo_size_function.3type, printf_function.3type, printf_info.3type, printf_va_arg_function.3type: Add links to printf.h(3head)

Cc: Walter Harms <wharms@bfs.de>
Cc: <Radisson97@gmx.de>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: <libc-alpha@sourceware.org>
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
15 months agoregister_printf_specifier.3, register_printf_modifier.3, register_printf_type.3:...
Alex Colomar [Sun, 18 Sep 2022 22:12:28 +0000 (00:12 +0200)] 
register_printf_specifier.3, register_printf_modifier.3, register_printf_type.3: Add links to printf.h(3head)

Cc: Walter Harms <wharms@bfs.de>
Cc: <Radisson97@gmx.de>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: <libc-alpha@sourceware.org>
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
15 months agoprintf.3head: Document functions for customizing printf(3)-like functions
Alex Colomar [Sun, 18 Sep 2022 22:12:28 +0000 (00:12 +0200)] 
printf.3head: Document functions for customizing printf(3)-like functions

Suggested-by: Walter Harms <wharms@bfs.de>
Cc: <Radisson97@gmx.de>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: <libc-alpha@sourceware.org>
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
16 months agounits.7: srcfix (\(mc -> \[mc])
G. Branden Robinson [Thu, 9 Feb 2023 18:12:10 +0000 (12:12 -0600)] 
units.7: srcfix (\(mc -> \[mc])

Use correct *roff special character for micro sign.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoadjtimex.2: srcfix
G. Branden Robinson [Thu, 9 Feb 2023 18:11:50 +0000 (12:11 -0600)] 
adjtimex.2: srcfix

* Stop manipulating adjustment and hyphenation around a table.
* These could be safely done within the text block, but even that is not
  necessary, since what is in the next block is a single word, so no
  adjustment will take place, and to prevent hyphenation of a single
  word, \% is cheap and straightforward.  So do that.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agolocaledef.1: srcfix
G. Branden Robinson [Thu, 9 Feb 2023 18:11:00 +0000 (12:11 -0600)] 
localedef.1: srcfix

Break input lines after commas and semicolons.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agolocaledef.1: ffix
G. Branden Robinson [Thu, 9 Feb 2023 18:10:52 +0000 (12:10 -0600)] 
localedef.1: ffix

Rewrite synopses to use groff man(7) `SY`/`YS` extension macros.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agolocaledef.1: ffix
G. Branden Robinson [Thu, 9 Feb 2023 18:10:45 +0000 (12:10 -0600)] 
localedef.1: ffix

Stop manipulating adjustment and hyphenation.

Forcibly re-enabling adjustment to both margins after the synopsis does
not respect user configuration of adjustment.  There _is_ a portable way
to save the adjustment mode, via the .j register and a copy of it, but
doing so requires even more usage of low-level requests that are
discouraged in man page writing.

The latter is incorrect for use with groff(1) since '.hy' does not
restore the previous hyphenation mode but sets it to 1, which is not
appropriate for the English-language hyphenation patterns groff uses.
(Also, AT&T man(7) used a hyphenation mode of 14.)

Neither of these requests is respectful of user configuration of
adjustment or hyphenation enablement.  Features in the forthcoming
groff 1.23 will make these easier for users to manipulate to their
preference.

(mandoc(1) does not support configurable adjustment or hyphenation, so
all of these requests are no-ops for it.)

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agovdso.7: fix deadlinks to Linux Documentation/
наб [Fri, 10 Feb 2023 01:30:16 +0000 (02:30 +0100)] 
vdso.7: fix deadlinks to Linux Documentation/

Respectively:
commit dc7a12bdfccd94c31f79e294f16f7549bd411b49 ("docs: arm: convert
docs to ReST and rename to *.rst")
commit db9a0975a20c1f21c108b9d44545792d790593e4 ("docs: ia64: convert to
ReST")
commit e77e9187ae1caf2d83dd5e7f0c1466254b644a4c ("docs: parisc: convert
to ReST and add to documentation body")

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agotimes.2: ffix
G. Branden Robinson [Thu, 9 Feb 2023 18:10:36 +0000 (12:10 -0600)] 
times.2: ffix

Use \[lq] and \[rq] special characters for prose quotation marks.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agotimes.2: srcfix
G. Branden Robinson [Thu, 9 Feb 2023 18:10:29 +0000 (12:10 -0600)] 
times.2: srcfix

Break input lines after commas.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoquotactl.2: ffix
G. Branden Robinson [Thu, 9 Feb 2023 18:10:11 +0000 (12:10 -0600)] 
quotactl.2: ffix

Use \- for minus sign instead of - (hyphen), producing better typography
on typesetting devices and Unicode terminals.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoclose_range.2: srcfix (~ -> \[ti])
G. Branden Robinson [Thu, 9 Feb 2023 18:10:04 +0000 (12:10 -0600)] 
close_range.2: srcfix (~ -> \[ti])

Use correct *roff special character for ("ASCII") tilde.

There are other occurrences in bpf-helpers.7, but those will have to
await improvement of the tool that generates man(7) from the source
language.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoman*/: srcfix (^ -> \[ha])
G. Branden Robinson [Thu, 9 Feb 2023 18:09:50 +0000 (12:09 -0600)] 
man*/: srcfix (^ -> \[ha])

Use correct *roff special character for hat/caret/circumflex accent.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoioctl_fat.2: srcfix
G. Branden Robinson [Thu, 9 Feb 2023 18:09:43 +0000 (12:09 -0600)] 
ioctl_fat.2: srcfix

Remove unportable hack to put a dot at the beginning of an input line.
Use the idiomatic means of doing this instead: the roff dummy character
escape sequence.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoprctl.2: srcfix
G. Branden Robinson [Thu, 9 Feb 2023 18:09:35 +0000 (12:09 -0600)] 
prctl.2: srcfix

Remove spurious escaping of '.' where it cannot be interpreted as a roff
control character.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agosched.7: srcfix
G. Branden Robinson [Thu, 9 Feb 2023 18:09:07 +0000 (12:09 -0600)] 
sched.7: srcfix

Fix warnings from formatter.

troff:./man7/sched.7:989: warning [p 10, 2.7i]: cannot adjust line
troff:./man7/sched.7:990: warning [p 10, 2.8i]: cannot adjust line

Add hyphenless break points to file names, but also suppress hyphenation
to reduce copy-and-paste frustration.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoman2/: srcfix (hyphens used as C operators)
G. Branden Robinson [Thu, 9 Feb 2023 18:08:59 +0000 (12:08 -0600)] 
man2/: srcfix (hyphens used as C operators)

Escape hyphens used as parts of C `->` operators.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agogetrandom.2: Change limit to use IEC multiple symbol
Brian Inglis [Wed, 8 Feb 2023 20:27:31 +0000 (13:27 -0700)] 
getrandom.2: Change limit to use IEC multiple symbol

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoreboot.2: Show BCD dates in hex not decimal
Brian Inglis [Wed, 8 Feb 2023 20:27:27 +0000 (13:27 -0700)] 
reboot.2: Show BCD dates in hex not decimal

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agospu_run.2: Fix example comment status code or-ed value
Brian Inglis [Wed, 8 Feb 2023 20:27:24 +0000 (13:27 -0700)] 
spu_run.2: Fix example comment status code or-ed value

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoshmget.2: Fix limit units prefix symbol from SI to IEC
Brian Inglis [Wed, 8 Feb 2023 20:27:23 +0000 (13:27 -0700)] 
shmget.2: Fix limit units prefix symbol from SI to IEC

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoperf_event_open.2: Add missing variable name
Namhyung Kim [Tue, 7 Feb 2023 01:50:29 +0000 (17:50 -0800)] 
perf_event_open.2: Add missing variable name

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agopersistent-keyring.7: wfix
Jakub Wilk [Tue, 7 Feb 2023 21:40:04 +0000 (22:40 +0100)] 
persistent-keyring.7: wfix

Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agounits.7: Add break points in URI
Alejandro Colomar [Mon, 6 Feb 2023 00:15:19 +0000 (01:15 +0100)] 
units.7: Add break points in URI

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agounits.7: Fix escapes (\-) in URI
Alejandro Colomar [Mon, 6 Feb 2023 00:14:12 +0000 (01:14 +0100)] 
units.7: Fix escapes (\-) in URI

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agounits.7: Use \[mc] instead of \(mc
Alejandro Colomar [Sun, 5 Feb 2023 22:19:36 +0000 (23:19 +0100)] 
units.7: Use \[mc] instead of \(mc

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoprctl.2, man.7: Use \[ga] instead of \(ga
Alejandro Colomar [Sun, 5 Feb 2023 22:18:43 +0000 (23:18 +0100)] 
prctl.2, man.7: Use \[ga] instead of \(ga

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoprctl.2: Use \[cq] instead of \(cq
Alejandro Colomar [Sun, 5 Feb 2023 22:16:48 +0000 (23:16 +0100)] 
prctl.2: Use \[cq] instead of \(cq

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoprctl.2: Use \[oq] instead of \(oq
Alejandro Colomar [Sun, 5 Feb 2023 22:16:27 +0000 (23:16 +0100)] 
prctl.2: Use \[oq] instead of \(oq

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoMany pages: Use \[bu] instead of \(bu
Alejandro Colomar [Sun, 5 Feb 2023 22:14:38 +0000 (23:14 +0100)] 
Many pages: Use \[bu] instead of \(bu

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoVarious pages: Use \[rq] instead of \(rq
Alejandro Colomar [Sun, 5 Feb 2023 22:04:52 +0000 (23:04 +0100)] 
Various pages: Use \[rq] instead of \(rq

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoVarious pages: Use \[lq] instead of \(lq
Alejandro Colomar [Sun, 5 Feb 2023 22:04:23 +0000 (23:04 +0100)] 
Various pages: Use \[lq] instead of \(lq

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoMany pages: Use \[ha] instead of \(ha
Alejandro Colomar [Sun, 5 Feb 2023 22:03:36 +0000 (23:03 +0100)] 
Many pages: Use \[ha] instead of \(ha

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoMany pages: Use \[ti] instead of \(ti
Alejandro Colomar [Sun, 5 Feb 2023 22:02:42 +0000 (23:02 +0100)] 
Many pages: Use \[ti] instead of \(ti

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoMany pages: Use \[em] instead of \(em
Alejandro Colomar [Sun, 5 Feb 2023 22:02:09 +0000 (23:02 +0100)] 
Many pages: Use \[em] instead of \(em

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoMany pages: Use \[en] instead of \(en
Alejandro Colomar [Sun, 5 Feb 2023 22:01:29 +0000 (23:01 +0100)] 
Many pages: Use \[en] instead of \(en

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoman-pages.7: Recommend using \[..] instead of \(.. escapes
Alejandro Colomar [Sun, 5 Feb 2023 21:59:22 +0000 (22:59 +0100)] 
man-pages.7: Recommend using \[..] instead of \(.. escapes

They are more readable.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoEOF.3const: ffix
Alejandro Colomar [Sun, 5 Feb 2023 16:08:00 +0000 (17:08 +0100)] 
EOF.3const: ffix

Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agotimespec.3type: tv_nsec is impl-def-type, glibc llong not a bug
наб [Mon, 30 Jan 2023 18:38:35 +0000 (19:38 +0100)] 
timespec.3type: tv_nsec is impl-def-type, glibc llong not a bug

n3091 accepts n3066, making it part of the next working draft and C23:
  https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3091.doc

Update timespec.3type appropriately, largely mirroring my paper.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoMany pages: Use \[dq] instead of \(dq
Alejandro Colomar [Sun, 5 Feb 2023 16:03:19 +0000 (17:03 +0100)] 
Many pages: Use \[dq] instead of \(dq

This improves readability in the source code, since it delimits where
the escape sequence ends.

Cc: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Brian Inglis <Brian.Inglis@Shaw.ca>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoMany pages: Use \[aq] instead of \(aq
Alejandro Colomar [Sun, 5 Feb 2023 16:03:19 +0000 (17:03 +0100)] 
Many pages: Use \[aq] instead of \(aq

This improves readability in the source code, since it delimits where
the escape sequence ends.

Cc: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Brian Inglis <Brian.Inglis@Shaw.ca>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoMany pages: Use lowercase for 'glibc'
Alejandro Colomar [Sun, 5 Feb 2023 15:57:58 +0000 (16:57 +0100)] 
Many pages: Use lowercase for 'glibc'

It's a proper noun, whose original letter case should be respected.
glibc's own documentation uses always lowercase; let's do the same here.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agosscanf.3: BUGS: Document the UB in some conversion specifiers
Alejandro Colomar [Sun, 5 Feb 2023 14:36:07 +0000 (15:36 +0100)] 
sscanf.3: BUGS: Document the UB in some conversion specifiers

This is a bug in the standards, but implementation should not follow the
standard in this case.

Link: <https://lore.kernel.org/linux-man/20221208123454.13132-1-abbotti@mev.co.uk/T/#u>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Zack Weinberg <zack@owlfolio.org>
Cc: Joseph Myers <joseph@codesourcery.com>
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agonamespaces.7: ffix
Alejandro Colomar [Sun, 5 Feb 2023 14:32:13 +0000 (15:32 +0100)] 
namespaces.7: ffix

Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoregex.3: tfix
Alejandro Colomar [Sun, 5 Feb 2023 14:30:53 +0000 (15:30 +0100)] 
regex.3: tfix

Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agocharsets.7: wfix
Alejandro Colomar [Sun, 5 Feb 2023 14:25:40 +0000 (15:25 +0100)] 
charsets.7: wfix

Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoperf_event_open.2: Update recent changes
Namhyung Kim [Tue, 17 Jan 2023 08:08:46 +0000 (00:08 -0800)] 
perf_event_open.2: Update recent changes

Add missing perf_event_attr fields, new event codes and sample type.
Also add descriptions for PERF_FORMAT_LOST.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agolandlock.7: tfix
Günther Noack [Wed, 1 Feb 2023 22:42:24 +0000 (23:42 +0100)] 
landlock.7: tfix

Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agolandlock.7: ffix
Günther Noack [Wed, 1 Feb 2023 22:42:23 +0000 (23:42 +0100)] 
landlock.7: ffix

Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agovdso.7: Fix risc-v symbol names.
Elliott Hughes [Mon, 30 Jan 2023 21:46:09 +0000 (21:46 +0000)] 
vdso.7: Fix risc-v symbol names.

The kernel git history says the names have always been "__vdso_" rather
than "__kernel_", so I assume this was a copy & paste mistake from a
different architecture.

Luckily, the path to the kernel source that lets you confirm/deny this
_is_ correct :-)

Signed-off-by: Elliott Hughes <enh@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agobpf-helpers.7: Refresh page
Alejandro Colomar [Tue, 31 Jan 2023 11:53:50 +0000 (12:53 +0100)] 
bpf-helpers.7: Refresh page

See commit 19c7f78393f2 ("bpf-helpers.7: Refresh page")

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agointN_t.3type: tfix
Jakub Wilk [Mon, 30 Jan 2023 19:09:41 +0000 (20:09 +0100)] 
intN_t.3type: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agocharsets.7: wfix
Alejandro Colomar [Sun, 29 Jan 2023 19:31:08 +0000 (20:31 +0100)] 
charsets.7: wfix

Several of the languages mentioned are not West Europe.  Some come from
the North, South, or East.

Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Cc: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agocppcheck.suppress, lint-c.mk: lint-c-cppcheck: Add cppcheck(1) to the C linters
Alejandro Colomar [Thu, 26 Jan 2023 00:06:34 +0000 (01:06 +0100)] 
cppcheck.suppress, lint-c.mk: lint-c-cppcheck: Add cppcheck(1) to the C linters

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agogetdents.2: EXAMPLES: Fix printf() conversion specifier
Alejandro Colomar [Thu, 26 Jan 2023 00:04:18 +0000 (01:04 +0100)] 
getdents.2: EXAMPLES: Fix printf() conversion specifier

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agofopencookie.3: EXAMPLES: Fix memory leak
Alejandro Colomar [Thu, 26 Jan 2023 00:01:31 +0000 (01:01 +0100)] 
fopencookie.3: EXAMPLES: Fix memory leak

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agoseccomp_unotify.2: EXAMPLES: tfix
Alejandro Colomar [Thu, 26 Jan 2023 00:01:11 +0000 (01:01 +0100)] 
seccomp_unotify.2: EXAMPLES: tfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agogetdate.3: EXAMPLES: Fix printf() conversion specifier
Alejandro Colomar [Wed, 25 Jan 2023 23:58:43 +0000 (00:58 +0100)] 
getdate.3: EXAMPLES: Fix printf() conversion specifier

Fixes: b42296e4 "Various pages: EXAMPLES: Use unsigned types for loop iterators"
Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 months agopthread_setschedparam.3: EXAMPLES: Don't assign unused value
Alejandro Colomar [Wed, 25 Jan 2023 23:24:12 +0000 (00:24 +0100)] 
pthread_setschedparam.3: EXAMPLES: Don't assign unused value

We're not reading the value after it's set.  And I just checked that
that function can't fail for reasonable input.

Reported-by: cppcheck(1)
Reported-by: `make lint-c-cppcheck`
Signed-off-by: Alejandro Colomar <alx@kernel.org>