]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
5 months agoman/man2/kill.2: RETURN VALUE: Fix wording issue with sig=0
Amit Pinhas [Wed, 12 Feb 2025 20:56:20 +0000 (22:56 +0200)] 
man/man2/kill.2: RETURN VALUE: Fix wording issue with sig=0

The DESCRIPTION says:

If *sig* is 0, then no signal is sent, but existence and
permission checks are still performed; this can be used to
check for the existence of a process ID.

On the other hand, the `RETURN VALUE` section contradicted that.

On success (at least one signal was sent), zero is returned.  On
error, -1 is returned...

How can I get 0 when providing sig=0, if no signal was actually
sent, which is the criteria for success of this call???

Reported-by: Amit Pinhas <amitpinhass@gmail.com>
Co-authored-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Amit Pinhas <amitpinhass@gmail.com>
Message-ID: <a4fa37e0fc89a3c99982ace3fe381991ebe85b00.1739393685.git.amitpinhass@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 months agoman/man7/bpf-helpers.7: Refresh page from Linux v6.13
Alejandro Colomar [Wed, 12 Feb 2025 14:46:18 +0000 (15:46 +0100)] 
man/man7/bpf-helpers.7: Refresh page from Linux v6.13

Scripted change:

$ ~/src/linux/linux/v6.13/scripts/bpf_doc.py \
| rst2man \
>man7/bpf-helpers.7;

Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 months agoRELEASE: Document the production of the book
Alejandro Colomar [Wed, 12 Feb 2025 14:40:16 +0000 (15:40 +0100)] 
RELEASE: Document the production of the book

Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 months agoGNUmakefile: help: Show only variables assigned with '?='
Alejandro Colomar [Mon, 3 Feb 2025 10:02:47 +0000 (11:02 +0100)] 
GNUmakefile: help: Show only variables assigned with '?='

The others are internal stuff that most likely shouldn't be touched.

Cc: Sam James <sam@gentoo.org>
Cc: Paul Smith <psmith@gnu.org>
Cc: Guenther Noack <gnoack@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 months agoshare/mk/: Use ?= assignments for user-facing variables
Alejandro Colomar [Mon, 3 Feb 2025 09:59:05 +0000 (10:59 +0100)] 
share/mk/: Use ?= assignments for user-facing variables

This allows users specifying them as environment variables.

Cc: Sam James <sam@gentoo.org>
Cc: Paul Smith <psmith@gnu.org>
Cc: Guenther Noack <gnoack@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 months agoGNUmakefile: Require the user to specify '-R' if their make(1) is too old
Alejandro Colomar [Mon, 3 Feb 2025 09:12:28 +0000 (10:12 +0100)] 
GNUmakefile: Require the user to specify '-R' if their make(1) is too old

And everyone's make(1) is too old.  :-)

This will allow us to use ?= assignments.  Once a new GNU make(1)
release is done, we'll be able to rely on our setting of MAKEFLAGS+=-R
at the top of the GNUMakefile, but currently, that's not enough, and the
user must specify -R to unset implicit variables.

Cc: Sam James <sam@gentoo.org>
Cc: Paul Smith <psmith@gnu.org>
Cc: Guenther Noack <gnoack@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 months agoshare/mk/: Escape '#' in regexes
Alejandro Colomar [Mon, 10 Feb 2025 10:56:01 +0000 (11:56 +0100)] 
share/mk/: Escape '#' in regexes

GNU make(1) 4.2 seems to be interpreting those characters as the start
of a comment, so we need to escape them.  That seems to calm those old
versions of make(1), and doesn't affect negatively the newer ones, and
doesn't affect negatively grep(1) either.

Fixes: 35a780a99bd8 (2024-07-20; "share/mk/: CPPFLAGS: Only define _FORTIFY_SOURCE if it's not already defined")
Fixes: 2130162900ab (2024-11-03; "share/mk/, etc/shellcheck/: lint-sh: Add target to lint shell scripts")
Reported-by: Boris Pigin <boris.pigin@gmail.com>
Cc: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 months agoman/man3/timespec_get.3: Correct return value and clarify description
Mark Harris [Sun, 9 Feb 2025 01:24:14 +0000 (17:24 -0800)] 
man/man3/timespec_get.3: Correct return value and clarify description

- 0, not -1, is returned for an unsupported time base or error
  (C23 7.29.2.6, 7.29.2.7; POSIX.1-2024 line 74358).
- Clarify that any supported value of base is always nonzero (i.e.,
  there is no overlap between the two return value cases that may
  require errno or some other source to disambiguate)
  (C23 7.29.2.6, 7.29.2.7; POSIX.1-2024 line 74357).
- Clarify that timespec_getres(NULL, base) is a valid call to check
  whether the specified time base is supported (C23 7.29.2.7).
- Clarify that the resolution for a particular time base is constant
  for the lifetime of the process (i.e., there is no need to retrieve
  it repeatedly) (C23 7.29.2.7).
- Calls to these functions are not technically equivalent to any
  clock_* function call; at least the return value will be different.
  Clarify that it is the time and resolution that are the same.
- The ERRORS section is removed, because it states only what is true
  for every function that does not state otherwise (i.e., errno might
  be affected by underlying system calls).

Fixes: 7bda5119fe5e (2024-09-08; "timespec_get.3, timespec_getres.3: Add page and link page")
Cc: наб <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Message-ID: <5f8dc5d2dc51f080a18de53e98610df43389b98b.1739063937.git.mark.hsj@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 months agoCONTRIBUTING.d/style/c: Add coding style for the example programs
Alejandro Colomar [Sat, 8 Feb 2025 22:38:00 +0000 (23:38 +0100)] 
CONTRIBUTING.d/style/c: Add coding style for the example programs

Personally, I prefer tabs for actual programming.  But for manual pages,
we can live with 4 spaces for $reasons.

Reported-by: "G. Branden Robinson" <branden@debian.org>
Reported-by: Jason Yundt <jason@jasonyundt.email>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 months agoCONTRIBUTING.d/: Move style to style/man
Alejandro Colomar [Sat, 8 Feb 2025 21:39:55 +0000 (22:39 +0100)] 
CONTRIBUTING.d/: Move style to style/man

This makes room for adding <style/c>, a C coding style guide.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 months agoman/man3/regex.3: EXAMPLES: Don't use z length modifier with unsigned int
Arkadiusz Drabczyk [Fri, 7 Feb 2025 21:16:28 +0000 (22:16 +0100)] 
man/man3/regex.3: EXAMPLES: Don't use z length modifier with unsigned int

GCC and Clang print warnings:

    $ clang main.c -Wall
    main.c:30:23: warning: format specifies type 'size_t' (aka 'unsigned long') but the argument has type 'unsigned int' [-Wformat]
       30 |     printf("#%zu:\n", i);
          |              ~~~      ^
          |              %u
    1 warning generated.

    $ gcc main.c -Wall
    main.c: In function ‘main’:
    main.c:30:16: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 2 has type ‘unsigned int’ [-Wformat=]
       30 |     printf("#%zu:\n", i);
          |              ~~^      ~
          |                |      |
          |                |      unsigned int
          |                long unsigned int
          |              %u

Fixes: b42296e4feaf (2022-09-15; "Various pages: EXAMPLES: Use unsigned types for loop iterators")
Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
Message-ID: <20250207211628.25164-1-arkadiusz@drabczyk.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 months agoman/man2/clone.2: Use munmap(2) to free 'stack'
Alejandro Colomar [Tue, 21 Jan 2025 03:13:51 +0000 (11:13 +0800)] 
man/man2/clone.2: Use munmap(2) to free 'stack'

Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Reported-by: Chen Linxuan <chenlinxuan@uniontech.com>
Message-ID: <647EBDB1A8DE7507+20250121031351.548052-1-chenlinxuan@uniontech.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man2/mkdir.2: ERRORS: Add EOVERFLOW
Chen Linxuan [Sun, 2 Feb 2025 13:57:33 +0000 (21:57 +0800)] 
man/man2/mkdir.2: ERRORS: Add EOVERFLOW

mkdir(2) and mkdirat(2) might set errno to EOVERFLOW when UID or GID
mapping has not been configured.

Here's a small program that shows this behavior:

        #define _GNU_SOURCE
        #include <err.h>
        #include <sched.h>
        #include <stdlib.h>
        #include <sys/mman.h>
        #include <sys/mount.h>
        #include <sys/stat.h>
        #include <sys/wait.h>
        #include <unistd.h>

        static int
childFunc(void *_)
        {
                if (mount("tmpfs", "/tmp", "tmpfs", 0, NULL))
                        err(EXIT_FAILURE, "mount");

                if (mkdir("/tmp/test", 0755) == -1)
                        err(EXIT_FAILURE, "mkdir");

                return 0;
        }

        #define STACK_SIZE (1024 * 1024)

        int
main(void)
        {
                char   *stack; /* Start of stack buffer */
                char   *stackTop; /* End of stack buffer */
                pid_t  pid;

                stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,
                             MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK,
                             -1, 0);
                if (stack == MAP_FAILED)
                        err(EXIT_FAILURE, "mmap");

                stackTop = stack + STACK_SIZE;

                pid = clone(childFunc, stackTop, CLONE_NEWUSER |
                            CLONE_NEWNS | SIGCHLD, NULL);
                if (munmap(stack, STACK_SIZE) == -1)
                        err(EXIT_FAILURE, "munmap");
                if (pid == -1)
                        err(EXIT_FAILURE, "clone");

                if (waitpid(pid, NULL, 0) == -1)
                        err(EXIT_FAILURE, "waitpid");

                exit(EXIT_SUCCESS);
        }

Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=036d523641c66bef713042894a17f4335f199e49>
Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
Message-ID: <F22A2B1500170B63+20250202135733.11800-1-chenlinxuan@uniontech.com>
[alx: wfix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man7/signal.7: Update definition of SIGCHLD for POSIX.1-2001
Arkadiusz Drabczyk [Sun, 2 Feb 2025 13:03:31 +0000 (14:03 +0100)] 
man/man7/signal.7: Update definition of SIGCHLD for POSIX.1-2001

This is an XSI extension supported by Linux.

Link: <https://unix.stackexchange.com/q/790116/72304>
Link: <https://lore.kernel.org/linux-man/Z5U0Wh_KF3Ki62Pk@comp../>
Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
Message-ID: <20250202130331.20320-1-arkadiusz@drabczyk.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man7/sched.7: Mention autogroup disabled behavior
Phil Auld [Thu, 16 Jan 2025 14:37:47 +0000 (14:37 +0000)] 
man/man7/sched.7: Mention autogroup disabled behavior

The autogroup feature can be contolled at runtime when built into the
kernel.  Disabling it in this case still creates autogroups and still
shows the autogroup membership for the task in /proc.  The scheduler
code will just not use the the autogroup task group.  This can be
confusing to users.  Add a sentence to this effect to sched.7 to point
this out.

The kernel code shows how this is used.  The sched_autogroup_enabled
toggle is only used in one place.

kernel/sched/autogroup.h:

static inline struct task_group *
autogroup_task_group(struct task_struct *p, struct task_group *tg)
{
extern unsigned int sysctl_sched_autogroup_enabled;
int enabled = READ_ONCE(sysctl_sched_autogroup_enabled);

if (enabled && task_wants_autogroup(p, tg))
return p->signal->autogroup->tg;

return tg;
}

task_wants_autogroup() is in kernel/sched/autogroup.c:

bool task_wants_autogroup(struct task_struct *p, struct task_group *tg)
{
if (tg != &root_task_group)
return false;
...

return true;
}

One can see that any group set other than root also bypasses the use of
the autogroup.  All of the machinery around the creation of the
autogroup is not effected by the toggle.

From userspace:
0
/autogroup-112 nice 0

Note, systemd based system these days is not really using autogroups at
all anyway because any task in a non-root cgroup bypasses the autogroup
as well.

Cc: Carlos O'Donell <codonell@redhat.com>
Signed-off-by: Phil Auld <pauld@redhat.com>
Message-ID: <20250116143747.2366152-1-pauld@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man2/rt_sigqueueinfo.2: tfix (tid => tgid)
Askar Safin [Thu, 30 Jan 2025 05:06:25 +0000 (08:06 +0300)] 
man/man2/rt_sigqueueinfo.2: tfix (tid => tgid)

Signed-off-by: Askar Safin <safinaskar@zohomail.com>
Message-ID: <20250130050625.3356602-1-safinaskar@zohomail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man5/proc_pid_limits.5: tfix
Alejandro Colomar [Sun, 2 Feb 2025 10:51:11 +0000 (11:51 +0100)] 
man/man5/proc_pid_limits.5: tfix

Reported-by: "Tomerius, Kai" <Kai.Tomerius@elektrobit.com>
Fixes: 07c3768e9db8 (2023-08-15; "proc.5, proc_pid_limits.5: Split /proc/PID/limits from proc(5)")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man7/pathname.7: Pathnames are opaque C strings
Alejandro Colomar [Mon, 27 Jan 2025 18:40:00 +0000 (19:40 +0100)] 
man/man7/pathname.7: Pathnames are opaque C strings

On Mon, Jan 27, 2025 at 07:27:59PM +0100, наб wrote:
> Skimming the thread: UNIX paths are sequences of non-NUL bytes.
>
> It is never correct to expect to be able to have a (parse, unparse)
> operation pair for which unparse(parse(x)) = x for path x.
>
> It's obviously wrong to reject a pathname just because you dont like it.
>
> Thus, when displaying a path, either (a) dump it directly to the output
> (the user has configured their display device to understand the paths they use),
> or if that's not possible (b) setlocale(LC_ALL, "") + mbrtowc() loop
> and render the result (applying usual ?/� substitutions for mbrtowc()
> errors makes sense here).
>
> There are very few operations on paths that are actually reasonable
> to do, ever; those are: appending stuff, prepending stuff
> (this is just appending stuff with the arguments backwards),
> and cleaving at /es;
> the "stuff" better be copied whole-sale from some other path
> or an unprocessed argument (or, sure, the PFCS).
>
> If you're getting bytes to append to a path, do that directly.
>
> If you're getting characters to append to a path,
> then wctomb(3) is the only non-invalid solution,
> since that (obviously) turns characters into bytes in the current
> locale, which (ex def) is the operation desired.
>
> I don't understand what the UTF-32 dance is supposed to be.
>
> If you're recommending transcoding paths, don't.
>
> To re-iterate: paths are not character sequences.
> They do not represent characters.
> You can't meaningfully coerce them thusly without loss of precision
> (this is ok to do for display! and nothing else).
> If at any point you find yourself turning wchar_t -> char
> you are doing something wrong;
> if you find yourself doing char -> wchar_t for anything beside display
> you should probably reconsider.
>
> This is different under Win32 of course. But that concerns us naught.

Suggested-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: Jason Yundt <jason@jasonyundt.email>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man7/pathname.7: EXAMPLES: Use a non-ASCII filename
Alejandro Colomar [Mon, 27 Jan 2025 11:03:46 +0000 (12:03 +0100)] 
man/man7/pathname.7: EXAMPLES: Use a non-ASCII filename

The ASCII filename was too simple to actually show anything useful.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoshare/mk/build/: Ignore known errors with pathname.7
Alejandro Colomar [Thu, 23 Jan 2025 23:47:10 +0000 (00:47 +0100)] 
share/mk/build/: Ignore known errors with pathname.7

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man7/pathname.7: Add file documenting pathnames
Jason Yundt [Tue, 21 Jan 2025 13:35:20 +0000 (08:35 -0500)] 
man/man7/pathname.7: Add file documenting pathnames

The goal of this new manual page is to help people create programs that
do the right thing even in the face of unusual paths.  The information
that I used to create this new manual page came from these sources:

Link: <https://unix.stackexchange.com/a/39179/316181>
Link: <https://sourceware.org/pipermail/libc-help/2024-August/006737.html>
Link: <https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/fs/ext4/ext4.h?h=v6.12.9#n2288>
Link: <man:unix(7)>
Link: <https://unix.stackexchange.com/q/92426/316181>
Cc: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Jason Yundt <jason@jasonyundt.email>
Message-ID: <20250121133523.24606-1-jason@jasonyundt.email>
Cc: "G. Branden Robinson" <branden@debian.org>
[alx: wfix, ffix, and other tweaks]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoChanges.old: tfix
Alejandro Colomar [Sun, 26 Jan 2025 20:28:55 +0000 (21:28 +0100)] 
Changes.old: tfix

Reported-by: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoshare/mk/build/pdf/book/prepare.pl: Fix duplicate overview-panel entries
Deri [Thu, 23 Jan 2025 23:55:45 +0000 (00:55 +0100)] 
share/mk/build/pdf/book/prepare.pl: Fix duplicate overview-panel entries

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoChanges.old: tfix
Alejandro Colomar [Wed, 22 Jan 2025 22:36:57 +0000 (23:36 +0100)] 
Changes.old: tfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoStart of man-pages-NEXT: Move Changes to Changes.old
Alejandro Colomar [Wed, 22 Jan 2025 22:29:39 +0000 (23:29 +0100)] 
Start of man-pages-NEXT: Move Changes to Changes.old

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agolsm: Released 6.10
Alejandro Colomar [Wed, 22 Jan 2025 22:11:14 +0000 (23:11 +0100)] 
lsm: Released 6.10

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoChanges: Ready for 6.10 man-pages-6.10
Alejandro Colomar [Wed, 22 Jan 2025 22:03:47 +0000 (23:03 +0100)] 
Changes: Ready for 6.10

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man7/unicode.7: pfix
Alejandro Colomar [Fri, 17 Jan 2025 10:34:09 +0000 (11:34 +0100)] 
man/man7/unicode.7: pfix

Reported-by: Wyatt Carpenter <wyattscarpenter@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoSPONSORS: Publish the sponsors of this project
Alejandro Colomar [Tue, 14 Jan 2025 23:45:31 +0000 (00:45 +0100)] 
SPONSORS: Publish the sponsors of this project

These sponsors started sponsoring this project in 2024-11-01.
Thanks a lot for that!

For anyone interested in sponsoring this project, please contact the
maintainer and/or mailing list.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man7/man-pages.7: Stop telling contributors to write titles in all caps
Jason Yundt [Tue, 14 Jan 2025 21:14:25 +0000 (16:14 -0500)] 
man/man7/man-pages.7: Stop telling contributors to write titles in all caps

Recently, I submitted my first patch to the Linux man-pages project.  In
my patch, I had created a new manual page.  On the manual page’s title
line, I had written the title of my new page in all caps because
man-pages(7) said that I should write it that way.  It turns out that
man-pages(7) was wrong and that the title on the title line should have
matched the title in the manual page’s filename [1][2].  This commit
corrects man-pages(7) so that it does not tell contributors to use all
caps when writing titles on title lines.

Link: [1] <https://lore.kernel.org/linux-man/rph24kz36vysoeix4qoxxxcwq3c3fskws2vmxkkgcb2lpits3f@ysm7ug66svzh/T/#mc84250a6634d7f776118879021331001cceccbe5>
Link: [2] <https://lore.kernel.org/linux-man/mog6nnwzwl2dmlrec5b7l76wbxlsnklvdulok644x6o557trib@3zwtoz47r4x3/T/#mf71422d0e159210a7ca2798f2bba50a668e1410e>
Message-ID: <20250114211427.160509-1-jason@jasonyundt.email>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man2/fork.2: Add _exit(2) to example
Tobias Stoeckmann [Mon, 13 Jan 2025 16:40:43 +0000 (17:40 +0100)] 
man/man2/fork.2: Add _exit(2) to example

The _exit(2) function is a better choice for exiting a child in many
cases.  Most prominently it avoids calls of functions registered with
atexit(3) by the parent.

There are valid reasons to call exit(3) and the example is actually one
of them: flush FILE-based output.  Since atexit(3) is never called, we
could just stay with exit(3).

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Message-ID: <tngwcffbrzbfkj6vrxgxpekrp3bzuftdy2mzow56xyfkrcna2w@nbgr2ourerxo>
Link: <https://github.com/shadow-maint/shadow/pull/1171>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man3/: SYNOPSIS: Use typeof() to improve readability of function pointer types
Alejandro Colomar [Fri, 13 Dec 2024 13:19:28 +0000 (14:19 +0100)] 
man/man3/: SYNOPSIS: Use typeof() to improve readability of function pointer types

Due to different spacing, I had missed these ones in the previous
commits of this kind.

Suggested-by: Jorenar <dev@jorenar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man7/user_namespaces.7: tfix
Alexander Stepchenko [Thu, 9 Jan 2025 18:06:32 +0000 (21:06 +0300)] 
man/man7/user_namespaces.7: tfix

Fixes: 8c74a1cea495 (2016-07-07; "user_namespaces.7: Clarify details of CAP_SYS_ADMIN and cgroup v1 mounts")
Signed-off-by: Alexander Stepchenko <geochip@altlinux.org>
Message-ID: <bc17315eff26eb31ecc78a2c44b89dfb077813df.1736444255.git.geochip@altlinux.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man2/statx.2: Document STATX_DIO_READ_ALIGN
Christoph Hellwig [Thu, 9 Jan 2025 08:32:26 +0000 (09:32 +0100)] 
man/man2/statx.2: Document STATX_DIO_READ_ALIGN

Document the new STATX_DIO_READ_ALIGN flag and the new
stx_dio_read_offset_align field guarded by it.

Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Chandan Babu R <chandan.babu@oracle.com>
Cc: Hongbo Li <lihongbo22@huawei.com>
Cc: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: <linux-nilfs@vger.kernel.org>
Cc: <linux-fsdevel@vger.kernel.org>
Cc: <linux-xfs@vger.kernel.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Message-ID: <20250109083226.GA22264@lst.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agosrc/bin/diffman, man/man1/diffman: Remove program
Alejandro Colomar [Thu, 9 Jan 2025 14:23:27 +0000 (15:23 +0100)] 
src/bin/diffman, man/man1/diffman: Remove program

It was useful for implementing duffman(1), but now it doesn't use it
anymore.  Drop this program.

Users can do this instead:

$ MAN_KEEP_FORMATTING=1 diff -u <(man page1) <(man page2);

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man1/diffman-git.1: Add manual page
Alejandro Colomar [Thu, 9 Jan 2025 12:51:28 +0000 (13:51 +0100)] 
man/man1/diffman-git.1: Add manual page

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agosrc/bin/: Rename duffman => diffman-git
Alejandro Colomar [Thu, 9 Jan 2025 22:56:54 +0000 (23:56 +0100)] 
src/bin/: Rename duffman => diffman-git

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agosrc/bin/duffman: Don't pipe to less(1)
Alejandro Colomar [Thu, 9 Jan 2025 12:49:20 +0000 (13:49 +0100)] 
src/bin/duffman: Don't pipe to less(1)

Let the user decide to pipe or not.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agosrc/bin/duffman: Always read(1) -r
Alejandro Colomar [Thu, 9 Jan 2025 12:33:43 +0000 (13:33 +0100)] 
src/bin/duffman: Always read(1) -r

In src/bin/duffman line 45:
| while read f; do \
        ^--^ SC2162 (info): read without -r will mangle backslashes.

Reported-by: shellcheck(1)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agosrc/bin/duffman: Handle errors correctly
Alejandro Colomar [Thu, 9 Jan 2025 12:32:20 +0000 (13:32 +0100)] 
src/bin/duffman: Handle errors correctly

In src/bin/duffman line 30:
cd $(git rev-parse --show-toplevel);
   ^-- SC2046 (warning): Quote this to prevent word splitting.
     ^---------------------------^ SC2312 (info): Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).

Reported-by: shellcheck(1)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agosrc/bin/duffman: Allow diffing two git references
Alejandro Colomar [Fri, 10 Jan 2025 00:53:14 +0000 (01:53 +0100)] 
src/bin/duffman: Allow diffing two git references

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agosrc/bin/duffman: Allow diffing git references, not just the working directory
Alejandro Colomar [Thu, 9 Jan 2025 12:27:23 +0000 (13:27 +0100)] 
src/bin/duffman: Allow diffing git references, not just the working directory

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agosrc/bin/duffman: Diff against HEAD, not the system pages
Alejandro Colomar [Thu, 9 Jan 2025 12:24:13 +0000 (13:24 +0100)] 
src/bin/duffman: Diff against HEAD, not the system pages

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agosrc/bin/duffman: wsfix
Alejandro Colomar [Thu, 9 Jan 2025 11:46:25 +0000 (12:46 +0100)] 
src/bin/duffman: wsfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agosrc/bin/duffman, scripts/bash_aliases: Move duffman() to a separate script
Alejandro Colomar [Thu, 9 Jan 2025 11:45:27 +0000 (12:45 +0100)] 
src/bin/duffman, scripts/bash_aliases: Move duffman() to a separate script

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man2/stat.2: Linux 6.11 allows using NULL with AT_EMPTY_PATH.
enh [Wed, 8 Jan 2025 23:53:17 +0000 (18:53 -0500)] 
man/man2/stat.2: Linux 6.11 allows using NULL with AT_EMPTY_PATH.

Cc: Dan Albert <danalbert@google.com>
Signed-off-by: Elliott Hughes <enh@google.com>
Message-ID: <CAJgzZoqAOpJajmAnr-i9h3sPC8F_Uu0A+3eg4nkP+xTAV5fPGg@mail.gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 months agoman/man2/setns.2: Add missing info about time ns
Michal Clapinski [Tue, 7 Jan 2025 13:57:00 +0000 (14:57 +0100)] 
man/man2/setns.2: Add missing info about time ns

Only singlethreaded processes can setns into time ns.

Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/time/namespace.c?h=v6.12#n309>
Signed-off-by: Michal Clapinski <mclapinski@google.com>
Message-ID: <20250107135700.3995936-1-mclapinski@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man2/signal.2: VERSIONS: The typedef-less definition of signal(2) isn't hard...
Alejandro Colomar [Sun, 5 Jan 2025 19:45:06 +0000 (20:45 +0100)] 
man/man2/signal.2: VERSIONS: The typedef-less definition of signal(2) isn't hard to read

At least if you use typeof().

Acked-by: Jorenar <dev@jorenar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/: Use typeof() to improve readability of function pointer types
Alejandro Colomar [Sun, 5 Jan 2025 19:22:04 +0000 (20:22 +0100)] 
man/: Use typeof() to improve readability of function pointer types

An exception of good taste is structure members.  There, for alignment
reasons, traditional syntax seems more appropriate usually.

Suggested-by: Jorenar <dev@jorenar.com>
Cc: Martin Uecker <uecker@tugraz.at>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoshare/mk/: $CLANG_CFLAGS: Add -Wno-language-extension-token
Alejandro Colomar [Sun, 5 Jan 2025 19:30:23 +0000 (20:30 +0100)] 
share/mk/: $CLANG_CFLAGS: Add -Wno-language-extension-token

We use typeof(), which triggers that.  It's now standard, so this is a
false positive, IMO.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agosrc/bin/diffman: Simplify temporary file names
Alejandro Colomar [Sun, 5 Jan 2025 15:31:42 +0000 (16:31 +0100)] 
src/bin/diffman: Simplify temporary file names

Now that we're using labels, the file name is unimportant.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agosrc/bin/diffman: Use diff(1) labels for nicer output
Alejandro Colomar [Sun, 5 Jan 2025 15:14:59 +0000 (16:14 +0100)] 
src/bin/diffman: Use diff(1) labels for nicer output

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agosrc/bin/diffman, man/man1/diffman.1: Use man(1) to format the pages
Alejandro Colomar [Sun, 5 Jan 2025 14:34:54 +0000 (15:34 +0100)] 
src/bin/diffman, man/man1/diffman.1: Use man(1) to format the pages

This allows using the environment variables that man(1) understands.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/: EXAMPLES: wsfix
Alejandro Colomar [Sun, 5 Jan 2025 13:48:01 +0000 (14:48 +0100)] 
man/man3/: EXAMPLES: wsfix

Add a space after a cast.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/: EXAMPLES: Remove unnecessary parentheses
Alejandro Colomar [Sun, 5 Jan 2025 13:18:49 +0000 (14:18 +0100)] 
man/man3/: EXAMPLES: Remove unnecessary parentheses

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/sem_open.3: SYNOPSIS: This is a variadic function
Alejandro Colomar [Sun, 5 Jan 2025 12:44:32 +0000 (13:44 +0100)] 
man/man3/sem_open.3: SYNOPSIS: This is a variadic function

Specify the prototype consistently with open(2).

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man2/io_submit.2: Document RWF_NOAPPEND
John Garry [Tue, 26 Nov 2024 09:08:47 +0000 (09:08 +0000)] 
man/man2/io_submit.2: Document RWF_NOAPPEND

Document flag introduced in Linux v6.9.

Cc: Rich Felker <dalias@libc.org>
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Message-ID: <20241126090847.297371-3-john.g.garry@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man2/readv.2: Document RWF_NOAPPEND
John Garry [Tue, 26 Nov 2024 09:08:46 +0000 (09:08 +0000)] 
man/man2/readv.2: Document RWF_NOAPPEND

Document flag introduced in Linux v6.9.

Cc: Rich Felker <dalias@libc.org>
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Message-ID: <20241126090847.297371-2-john.g.garry@oracle.com>
[alx: wfix, srcfix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man2/statx.2: Update STATX_WRITE_ATOMIC filesystem support
John Garry [Tue, 3 Dec 2024 14:53:59 +0000 (14:53 +0000)] 
man/man2/statx.2: Update STATX_WRITE_ATOMIC filesystem support

Linux v6.13 will include atomic write support for xfs and ext4, so
update STATX_WRITE_ATOMIC commentary to mention that.

Cc: "Darrick J. Wong" <djwong@kernel.org>
Cc: <ritesh.list@gmail.com>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Message-ID: <20241203145359.2691972-1-john.g.garry@oracle.com>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/pthread_cond_init.3: Remove EINTR error code
Arkadiusz Drabczyk [Fri, 3 Jan 2025 17:38:16 +0000 (18:38 +0100)] 
man/man3/pthread_cond_init.3: Remove EINTR error code

In pthreads.7 it says:

"For each of the pthreads functions that can return an error,
POSIX.1-2001 specifies that the function can never fail with the error
EINTR."

Link: <https://lore.kernel.org/linux-man/Z3W_qgawqyEB-QrA@comp../>
Cc: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
Message-ID: <20250103173816.6409-2-arkadiusz@drabczyk.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man7/signal.7: Don't mention that pthread API can return EINTR
Arkadiusz Drabczyk [Fri, 3 Jan 2025 17:38:15 +0000 (18:38 +0100)] 
man/man7/signal.7: Don't mention that pthread API can return EINTR

In pthreads.7 it says:

"For each of the pthreads functions that can return an error,
POSIX.1-2001 specifies that the function can never fail with the error
EINTR."

Link: <https://lore.kernel.org/linux-man/Z3W_qgawqyEB-QrA@comp../>
Cc: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
Message-ID: <20250103173816.6409-1-arkadiusz@drabczyk.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/: Don't use 'length' to refer to buffer size
Alejandro Colomar [Tue, 24 Dec 2024 22:10:28 +0000 (23:10 +0100)] 
man/man3/: Don't use 'length' to refer to buffer size

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/stdio_ext.3: wfix
Alejandro Colomar [Tue, 24 Dec 2024 18:50:18 +0000 (19:50 +0100)] 
man/man3/stdio_ext.3: wfix

For consistency with wide characters, say characters instead of bytes.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/{stdin,stdio}.3: SYNOPSIS: Consistently declare as 'extern' variables
Alejandro Colomar [Tue, 24 Dec 2024 18:44:59 +0000 (19:44 +0100)] 
man/man3/{stdin,stdio}.3: SYNOPSIS: Consistently declare as 'extern' variables

And leave two spaces between the type name and the variable name.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man2/ioctl_pipe.2: SYNOPSIS: Fix $1, which is not an array parameter
Alejandro Colomar [Mon, 23 Dec 2024 21:25:54 +0000 (22:25 +0100)] 
man/man2/ioctl_pipe.2: SYNOPSIS: Fix $1, which is not an array parameter

Link: <https://lore.kernel.org/linux-man/20241214180423.2thsuyyfosrlyajb@devuan/T/#u>
Reported-by: Alejandro Colomar <alx@kernel.org>
Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man2/madvise.2: wfix
Lorenzo Stoakes [Fri, 6 Dec 2024 11:34:18 +0000 (11:34 +0000)] 
man/man2/madvise.2: wfix

Cc: Jann Horn <jannh@google.com>
Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Message-ID: <20241206113418.14327-1-lorenzo.stoakes@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/string.3: SYNOPSIS: Simplify
Alejandro Colomar [Sun, 22 Dec 2024 19:10:18 +0000 (20:10 +0100)] 
man/man3/string.3: SYNOPSIS: Simplify

Replace the prototypes by manual-page references, and use generic text
which doesn't use the names of the parameters.  It's just an overview.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agosrc/bin/diffman: Add support for mdoc(7) pages
Alejandro Colomar [Sun, 22 Dec 2024 14:28:53 +0000 (15:28 +0100)] 
src/bin/diffman: Add support for mdoc(7) pages

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agosrc/bin/diffman: Run the entire groff pipeline
Alejandro Colomar [Sun, 22 Dec 2024 14:28:18 +0000 (15:28 +0100)] 
src/bin/diffman: Run the entire groff pipeline

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agosrc/bin/diffman: Fix bug at parsing options
Alejandro Colomar [Sun, 22 Dec 2024 14:21:15 +0000 (15:21 +0100)] 
src/bin/diffman: Fix bug at parsing options

We don't want multiple cases to match the option.

The '*)' was matching any option.

Fixes: f2dfd79facf0 (2024-12-13, "src/bin/diffman: Add default case")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agosrc/bin/diffman, man/man1/diffman.1: -s: Add support for diff(1)'s -s flag
Alejandro Colomar [Sun, 22 Dec 2024 14:08:42 +0000 (15:08 +0100)] 
src/bin/diffman, man/man1/diffman.1: -s: Add support for diff(1)'s -s flag

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agosrc/bin/mansect: Use pipefail and some safety measures
Alejandro Colomar [Sun, 22 Dec 2024 12:50:29 +0000 (13:50 +0100)] 
src/bin/mansect: Use pipefail and some safety measures

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/getline.3: wfix
Alejandro Colomar [Fri, 20 Dec 2024 21:31:50 +0000 (22:31 +0100)] 
man/man3/getline.3: wfix

Fixes: ef53ef760638 (2024-12-18, "man/man3/getline.3: Clarify ERRORS")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoCONTRIBUTING.d/patches/subject: Use the full path always
Alejandro Colomar [Thu, 19 Dec 2024 10:33:43 +0000 (11:33 +0100)] 
CONTRIBUTING.d/patches/subject: Use the full path always

This is easier to do, since auto-completion will do it.  Also, it's more
consistent.  I started using full paths a few commits ago.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoCONTRIBUTING: Add reference to CONTRIBUTING.d/git
Alejandro Colomar [Thu, 19 Dec 2024 10:30:27 +0000 (11:30 +0100)] 
CONTRIBUTING: Add reference to CONTRIBUTING.d/git

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/getopt.3: Remove _<PID>_GNU_nonoption_argv_flags_ description
Ahelenia Ziemiańska [Wed, 18 Dec 2024 14:35:28 +0000 (15:35 +0100)] 
man/man3/getopt.3: Remove _<PID>_GNU_nonoption_argv_flags_ description

Per <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bf079e19f50d64aa5e05b5e17ec29afab9aabb20>:
-  this was set by bash 2.0 (1996-12)
   (implemented in glibc b07c5668f672125074dd5b0b658145e1544120be)
-  it's no longer set by bash 2.01 (1997-06) because it was bad
-  glibc disabled this with no way to enable it in 2001-08
   (518a0dd201c48a5c15d73c1919c304a9f8f5e3c1)
-  glibc removed it in 2017 bf079e19f50d64aa5e05b5e17ec29afab9aabb20

So this was experienced by people for 5 months at best,
and could remotely be experienced for 3 years
(if you somehow wanted this bad behaviour and added it into your shell),
over 20 years ago.
No modern reader (or, frankly, non-modern reader)
has ever used this, or could use it, really.

Link to the removal note for completeness only.

Link: <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bf079e19f50d64aa5e05b5e17ec29afab9aabb20>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-Id: <dwfybzlb5ydbsc4puo6igj7nm7iregquv6hxhhqb53bwrvqswb@tarta.nabijaczleweli.xyz>
[alx: Add break points in URI; minor tweaks to commit message too]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/getline.3: Clarify ERRORS
enh [Mon, 16 Dec 2024 13:57:14 +0000 (08:57 -0500)] 
man/man3/getline.3: Clarify ERRORS

Signed-off-by: Elliott Hughes <enh@google.com>
Message-ID: <CAJgzZoruFUg6X=JUNJXCbBOKs13SX=dsNFNdTMct2VecUFG=ww@mail.gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoCONTRIBUTING.d/git: mkdir(1) parent directory before writing to file
Alejandro Colomar [Mon, 16 Dec 2024 14:09:52 +0000 (15:09 +0100)] 
CONTRIBUTING.d/git: mkdir(1) parent directory before writing to file

Reported-by: Elliott Hughes <enh@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/strverscmp.3: This is NOT the ordering used by ls -v
Ahelenia Ziemiańska [Mon, 16 Dec 2024 01:00:45 +0000 (02:00 +0100)] 
man/man3/strverscmp.3: This is NOT the ordering used by ls -v

Compare, given:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int compar(const char **l, const char **r) {
return strverscmp(*l, *r);
}
int main(int argc, char ** argv) {
qsort(argv + 1, argc - 1, sizeof(*argv), compar);
for(int i = 1; i <  argc; ++i)
puts(argv[i]);
}
yields:
$ /bin/ls -v1 a*  # coreutils ls
a-1.0a
a-1.0.1a
$ ../vers a*      # as above
a-1.0.1a
a-1.0a
$ ls -v1 a*       # voreutils ls @ 5781698 with strverscmp()-equivalent sorting
a-1.0.1a
a-1.0a
compare also the results for real data like
netstat-nat-1.{0,1{,.1},2,3.1,4{,.{1,2,3,4,5,6,7,8,9,10}}}.tar.gz

Thus, coreutils ls -v (and sort -V) does NOT use strverscmp(3);
it uses a modified Debian version comparison algorithm with additional
suffix processing and `ls -v`-specific exceptions.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-Id: <myuppkwnltqtxduoop7g7wfuyou5cdo6sotocrvyztmqnazvph@tarta.nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoscripts/bash_aliases: duffman(): Silence output of cp(1)
Alejandro Colomar [Sun, 15 Dec 2024 19:40:46 +0000 (20:40 +0100)] 
scripts/bash_aliases: duffman(): Silence output of cp(1)

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man2/get_mempolicy.2: SYNOPSIS: ffix
Alejandro Colomar [Sat, 14 Dec 2024 19:58:03 +0000 (20:58 +0100)] 
man/man2/get_mempolicy.2: SYNOPSIS: ffix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man2/: SYNOPSIS: Use array notation
Alejandro Colomar [Sat, 14 Dec 2024 19:23:25 +0000 (20:23 +0100)] 
man/man2/: SYNOPSIS: Use array notation

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agosrc/bin/diffman: Silence shellcheck(1) diagnostic
Alejandro Colomar [Fri, 13 Dec 2024 13:32:35 +0000 (14:32 +0100)] 
src/bin/diffman: Silence shellcheck(1) diagnostic

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agosrc/bin/diffman: Add default case
Alejandro Colomar [Fri, 13 Dec 2024 13:30:46 +0000 (14:30 +0100)] 
src/bin/diffman: Add default case

SC2249 (info): Consider adding a default *) case, even if it just exits with error.

In principle, getopts(1) shouldn't return other stuff, but it doesn't
hurt to be cutious.

Reported-by: shellcheck(1)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/: SYNOPSIS: Use typeof() to improve readability of function pointer types
Alejandro Colomar [Fri, 13 Dec 2024 13:19:28 +0000 (14:19 +0100)] 
man/: SYNOPSIS: Use typeof() to improve readability of function pointer types

Suggested-by: Jorenar <dev@jorenar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/makecontext.3: SYNOPSIS: Add ellipsis to function type
Alejandro Colomar [Fri, 13 Dec 2024 12:02:06 +0000 (13:02 +0100)] 
man/man3/makecontext.3: SYNOPSIS: Add ellipsis to function type

The old syntax with empty parentheses has been removed from the language
in C23.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 months agoman/man3/isalpha.3: tfix
Alejandro Colomar [Wed, 11 Dec 2024 16:36:22 +0000 (17:36 +0100)] 
man/man3/isalpha.3: tfix

Fixes: ba687b00ecb3 (2023-07-30, "man3/: srcfix")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 months agoproc_pid_fdinfo.5: Reduce indent for most of the page
Ian Rogers [Fri, 6 Dec 2024 07:38:25 +0000 (23:38 -0800)] 
proc_pid_fdinfo.5: Reduce indent for most of the page

When /proc/pid/fdinfo was part of proc.5 man page the indentation made
sense.  As a standalone man page the indentation doesn't need to be so
far over to the right.  Remove the initial tagged pragraph, move the
"since Linux 2.6.22" to a new HISTORY subsection.

Suggested-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Message-Id: <20241206073828.1119464-1-irogers@google.com>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 months agoscripts/bash_aliases: duffman: Pass any arguments (options) to diffman(1)
Alejandro Colomar [Fri, 6 Dec 2024 15:08:35 +0000 (16:08 +0100)] 
scripts/bash_aliases: duffman: Pass any arguments (options) to diffman(1)

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 months agosrc/bin/diffman, diffman.1: -U: Add support for diff(1)'s -U option
Alejandro Colomar [Fri, 6 Dec 2024 15:04:46 +0000 (16:04 +0100)] 
src/bin/diffman, diffman.1: -U: Add support for diff(1)'s -U option

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 months agosrc/bin/diffman: -w: Add support for diff(1)'s -w flag
Alejandro Colomar [Fri, 6 Dec 2024 14:32:48 +0000 (15:32 +0100)] 
src/bin/diffman: -w: Add support for diff(1)'s -w flag

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 months agold.so.8: tfix
Anhad Singh [Fri, 6 Dec 2024 07:18:23 +0000 (07:18 +0000)] 
ld.so.8: tfix

Signed-off-by: Anhad Singh <andypython@protonmail.com>
Message-Id: <20241206071814.55913-1-andypython@protonmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 months agomadvise.2: Add description of MADV_GUARD_INSTALL, MADV_GUARD_REMOVE
Lorenzo Stoakes [Thu, 5 Dec 2024 10:41:25 +0000 (10:41 +0000)] 
madvise.2: Add description of MADV_GUARD_INSTALL, MADV_GUARD_REMOVE

Lightweight guard region support has been added to Linux 6.13, which
adds MADV_GUARD_INSTALL and MADV_GUARD_REMOVE flags to the madvise()
system call.  Therefore, update the manpage for madvise() and describe
these operations.

Reviewed-by: Jann Horn <jannh@google.com>
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Message-Id: <20241205104125.67518-1-lorenzo.stoakes@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 months agoCONTRIBUTING.d/patches/description: Add link to history of inter-sentence space
Alejandro Colomar [Thu, 5 Dec 2024 11:50:02 +0000 (12:50 +0100)] 
CONTRIBUTING.d/patches/description: Add link to history of inter-sentence space

Cc: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 months agomadvise.2: MADV_SOFT_OFFLINE requests can report EBUSY
tyberry@redhat.com [Tue, 26 Nov 2024 16:12:03 +0000 (11:12 -0500)] 
madvise.2: MADV_SOFT_OFFLINE requests can report EBUSY

If the page could not be offlined madvise will report EBUSY.
This might occur if the page is currently in use or locked.

Signed-off-by: Tyonnchie Berry <tyberry@redhat.com>
Message-Id: <Z0XzU9R9Kx0RoeUG@redhat.com>
Acked-by: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
[alx: wfix, ffix, and other tweaks]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 months agoman/: wfix
Alejandro Colomar [Wed, 4 Dec 2024 10:06:38 +0000 (11:06 +0100)] 
man/: wfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 months agoprocess_madvise.2: Describe 6.13 behaviour permitting all madvise flags
Lorenzo Stoakes [Fri, 29 Nov 2024 16:44:22 +0000 (16:44 +0000)] 
process_madvise.2: Describe 6.13 behaviour permitting all madvise flags

Since Linux 6.13 it has become possible to use all madvise flags when
targeting the calling process.

Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Message-Id: <20241129164422.89837-1-lorenzo.stoakes@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 months agoreadlink.2: SYNOPSIS: Use array notation
Alejandro Colomar [Thu, 28 Nov 2024 11:47:23 +0000 (12:47 +0100)] 
readlink.2: SYNOPSIS: Use array notation

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 months agolandlock_create_ruleset.2: SYNOPSIS: Add missing include
Alejandro Colomar [Sun, 24 Nov 2024 20:42:00 +0000 (21:42 +0100)] 
landlock_create_ruleset.2: SYNOPSIS: Add missing include

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 months agoshare/mk/: $MANINTROPAGES: Remove redundant grep(1) call
Alejandro Colomar [Mon, 25 Nov 2024 16:39:17 +0000 (17:39 +0100)] 
share/mk/: $MANINTROPAGES: Remove redundant grep(1) call

Signed-off-by: Alejandro Colomar <alx@kernel.org>