* Re: [PATCH 1/2] copyfilerange: (usage) correct the markup and improve the wording
From: Karel Zak @ 2026-03-11 12:14 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux, Dick Marinus
In-Reply-To: <20260309160903.15490-1-bensberg@telfort.nl>
On Mon, Mar 09, 2026 at 05:09:02PM +0100, Benno Schulenberg wrote:
> The <source>, <destination>, and <range> arguments are required,
> so do not mark them as optional (with the square brackets).
> Also, trim the redundant lines about the source and destination
> files, improve the explanation for the <range> argument, and
> keep the text within 80 columns.
>
> Furthermore, list the short options first (as is custom), and
> match the indentaion of the -h and -V options to the others.
>
> CC: Dick Marinus <dick@mrns.nl>
> Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
> ---
> misc-utils/copyfilerange.c | 18 ++++++++----------
> 1 file changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/misc-utils/copyfilerange.c b/misc-utils/copyfilerange.c
> index 20f0373bd..a72c81cd1 100644
> --- a/misc-utils/copyfilerange.c
> +++ b/misc-utils/copyfilerange.c
> @@ -55,25 +55,23 @@ static void __attribute__((__noreturn__)) usage(void)
> FILE *out = stdout;
> fputs(USAGE_HEADER, out);
> fprintf(out,
> - _(" %1$s [options] [<source>] [<destination>] [<range>...]\n"),
> + _(" %1$s [options] <source> <destination> <range>...\n"),
> program_invocation_short_name);
>
> fputs(USAGE_SEPARATOR, out);
> - fputsln(_("Copy file ranges from source to destination file."), out);
> + fputsln(_("Copy the specified range(s) from source to destination file."), out);
>
> fputs(USAGE_SEPARATOR, out);
> - fputsln(_(" source source filename"), out);
> - fputsln(_(" destination destination filename"), out);
> - fputsln(_(" range source_offset:dest_offset:length, all values are in bytes"), out);
> - fputsln(_(" if length is set to 0 as much as available will be copied"), out);
> - fputsln(_(" when the offset is omitted the last file position is used"), out);
> + fputsln(_("Each <range> is of the form <source_offset>:<destination_offset>:<length>,\n"
> + "with all values in bytes. If <length> is 0, as much data as available will\n"
> + "be copied. When an offset is omitted, the last file position is used."), out);
Hmm... for this purpose, we already have the USAGE_ARGUMENTS section
(usually after the OPTIONS section).
What about:
fputs(USAGE_ARGUMENTS, out);
fputsln(_(" <range> is of the form <source_offset>:<destination_offset>:<length>,\n"
" with all values in bytes. If <length> is 0, as much data as available will\n"
" be copied. When an offset is omitted, the last file position is used."), out);
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: improvements to terminal-colors.d.5.adoc were undone
From: Karel Zak @ 2026-03-11 11:40 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux, Mario Blättermann
In-Reply-To: <713c6323-e80e-47fc-9389-520b963a3129@telfort.nl>
On Mon, Mar 09, 2026 at 05:08:19PM +0100, Benno Schulenberg wrote:
>
> Op 09-03-2026 om 11:51 schreef Karel Zak:
> > > lib/terminal-colors.d.5.adoc | 24 ++++++++++--------------
> > > 1 file changed, 10 insertions(+), 14 deletions(-)
> >
> > Both patches have been applied. Thank you, and sorry for the delay.
>
> The second patch was applied in commit 3252142521, but three commits
> later, merge commit d708fc7db6 undoes all the improvements I made. :/
Fixed, see https://github.com/util-linux/util-linux/commit/e4889528b3d4d895ea8dbe60ed6b8eb82b3ddf05
Thanks!
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: improvements to terminal-colors.d.5.adoc were undone
From: Karel Zak @ 2026-03-10 18:49 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux, Mario Blättermann
In-Reply-To: <713c6323-e80e-47fc-9389-520b963a3129@telfort.nl>
On Mon, Mar 09, 2026 at 05:08:19PM +0100, Benno Schulenberg wrote:
>
> Op 09-03-2026 om 11:51 schreef Karel Zak:
> > > lib/terminal-colors.d.5.adoc | 24 ++++++++++--------------
> > > 1 file changed, 10 insertions(+), 14 deletions(-)
> >
> > Both patches have been applied. Thank you, and sorry for the delay.
>
> The second patch was applied in commit 3252142521, but three commits
> later, merge commit d708fc7db6 undoes all the improvements I made. :/
My mistake, sorry I'll fix it.
> Also, that merge commit says that it just removes the backticks from a
> table, but it actually changes back two simple lists to large, bulky
> tables.
The tables are a better solution than the list for translators. See
discussion:
https://github.com/util-linux/util-linux/pull/4089
The list produces things like (po-man/util-linux-man.pot):
#. type: delimited block _
#: ../lib/terminal-colors.d.5.adoc:115
msgid ""
"`` *\\a* Bell (ASCII 7)`` `` *\\b* Backspace (ASCII 8)`` `` *\\e* Escape "
"(ASCII 27)`` `` *\\f* Form feed (ASCII 12)`` `` *\\n* Newline (ASCII 10)`` "
"`` *\\r* Carriage Return (ASCII 13)`` `` *\\t* Tab (ASCII 9)`` `` *\\v* "
"Vertical Tab (ASCII 11)`` `` *\\?*{nbsp}{nbsp}{nbsp}Delete (ASCII 127)`` `` "
"*\\_* Space`` `` *\\\\* Backslash (\\)`` `` *\\^* Caret (^)`` `` *\\\\#* "
"Hash mark (#)``"
msgstr ""
The table is more readable:
#. type: Table
#: ../lib/terminal-colors.d.5.adoc:131
#, no-wrap
msgid ""
"|0\n"
"|to restore default color\n"
"\n"
"|1\n"
"|for brighter colors\n"
"\n"
"|4\n"
"|for underlined text\n"
"\n"
"|5\n"
"|for flashing text\n"
"\n"
"|30\n"
"|for black foreground\n"
"\n"
"|31\n"
"|for red foreground\n"
"\n"
"|32\n"
"|for green foreground\n"
"\n"
"|33\n"
"|for yellow (or brown) foreground\n"
"\n"
"|34\n"
"|for blue foreground\n"
"\n"
"|35\n"
"|for purple foreground\n"
"\n"
"|36\n"
"|for cyan foreground\n"
"\n"
"|37\n"
"|for white (or gray) foreground\n"
"\n"
"|40\n"
"|for black background\n"
"\n"
"|41\n"
"|for red background\n"
"\n"
"|42\n"
"|for green background\n"
"\n"
"|43\n"
"|for yellow (or brown) background\n"
"\n"
"|44\n"
"|for blue background\n"
"\n"
"|45\n"
"|for purple background\n"
"\n"
"|46\n"
"|for cyan background\n"
"\n"
"|47\n"
"|for white (or gray) background\n"
msgstr ""
> A year ago, commit b3c3d865eb reduced the bulky tables back to simple
> lists. Can we please keep these simple lists?
The list seems unfriendly to translators in some cases.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [PATCH 2/2] copyfilerange: (man) correct the markup and improve the wordings
From: Dick Marinus @ 2026-03-10 7:47 UTC (permalink / raw)
To: Benno Schulenberg, util-linux
In-Reply-To: <20260309160903.15490-2-bensberg@telfort.nl>
Hi Benno,
Thank you for cleaning up the documentation for copyfilerange, much
better!
Kind regards,
Dick Marinus
^ permalink raw reply
* [PATCH 1/2] copyfilerange: (usage) correct the markup and improve the wording
From: Benno Schulenberg @ 2026-03-09 16:09 UTC (permalink / raw)
To: util-linux; +Cc: Dick Marinus
The <source>, <destination>, and <range> arguments are required,
so do not mark them as optional (with the square brackets).
Also, trim the redundant lines about the source and destination
files, improve the explanation for the <range> argument, and
keep the text within 80 columns.
Furthermore, list the short options first (as is custom), and
match the indentaion of the -h and -V options to the others.
CC: Dick Marinus <dick@mrns.nl>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
misc-utils/copyfilerange.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/misc-utils/copyfilerange.c b/misc-utils/copyfilerange.c
index 20f0373bd..a72c81cd1 100644
--- a/misc-utils/copyfilerange.c
+++ b/misc-utils/copyfilerange.c
@@ -55,25 +55,23 @@ static void __attribute__((__noreturn__)) usage(void)
FILE *out = stdout;
fputs(USAGE_HEADER, out);
fprintf(out,
- _(" %1$s [options] [<source>] [<destination>] [<range>...]\n"),
+ _(" %1$s [options] <source> <destination> <range>...\n"),
program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
- fputsln(_("Copy file ranges from source to destination file."), out);
+ fputsln(_("Copy the specified range(s) from source to destination file."), out);
fputs(USAGE_SEPARATOR, out);
- fputsln(_(" source source filename"), out);
- fputsln(_(" destination destination filename"), out);
- fputsln(_(" range source_offset:dest_offset:length, all values are in bytes"), out);
- fputsln(_(" if length is set to 0 as much as available will be copied"), out);
- fputsln(_(" when the offset is omitted the last file position is used"), out);
+ fputsln(_("Each <range> is of the form <source_offset>:<destination_offset>:<length>,\n"
+ "with all values in bytes. If <length> is 0, as much data as available will\n"
+ "be copied. When an offset is omitted, the last file position is used."), out);
fputs(USAGE_OPTIONS, out);
- fputsln(_(" --ranges, -r filename read range(s) separated by newlines from filename"), out);
- fputsln(_(" --verbose, -v verbose mode"), out);
+ fputsln(_(" -r, --ranges <file> read range(s) separated by newlines from this file"), out);
+ fputsln(_(" -v, --verbose verbose mode"), out);
fputs(USAGE_SEPARATOR, out);
- fprintf(out, USAGE_HELP_OPTIONS(16));
+ fprintf(out, USAGE_HELP_OPTIONS(25));
fprintf(out, USAGE_MAN_TAIL("copyfilerange(1)"));
exit(EXIT_SUCCESS);
--
2.53.0
^ permalink raw reply related
* [PATCH 2/2] copyfilerange: (man) correct the markup and improve the wordings
From: Benno Schulenberg @ 2026-03-09 16:09 UTC (permalink / raw)
To: util-linux; +Cc: Dick Marinus
In-Reply-To: <20260309160903.15490-1-bensberg@telfort.nl>
CC: Dick Marinus <dick@mrns.nl>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
misc-utils/copyfilerange.1.adoc | 61 ++++++++++++++-------------------
1 file changed, 25 insertions(+), 36 deletions(-)
diff --git a/misc-utils/copyfilerange.1.adoc b/misc-utils/copyfilerange.1.adoc
index 4d214f4db..303a1a7b2 100644
--- a/misc-utils/copyfilerange.1.adoc
+++ b/misc-utils/copyfilerange.1.adoc
@@ -4,54 +4,43 @@
:man manual: User Commands
:man source: util-linux {release-version}
:page-layout: base
-:range: copyfilerange
+:command: copyfilerange
== NAME
-copyfilerange - Copy file ranges from source to destination file.
+copyfilerange - copy range(s) from source to destination file
== SYNOPSIS
-*copyfilerange* [options] [<source>] [<destination>] [<range>...]
+*copyfilerange* [options] _source_ _destination_ _range_...
== DESCRIPTION
-*copyfilerange* copy file ranges from source to destination file
-*copyfilerange* is a simple utility to call the *copy_file_range*(2) system call.
+The *copyfilerange* command copies byte ranges from source to destination file.
+It is a wrapper around the *copy_file_range*(2) system call.
-It can be used write files with unallocated gaps (sparse files) and/or share blocks between multiple files (reflinks).
+The command can be used to create files with unallocated gaps (sparse files)
+and/or with shared blocks between multiple files (reflinks).
-== ARGUMENTS
+Each _range_ is of the form _source_offset_**:**_destination_offset_**:**_length_,
+with all values in bytes. If _length_ is 0, then as much data as is available is
+copied. Multiple ranges may be supplied.
-*source*::
-Source filename
-
-*destination*::
-Destination filename
-
-*range*::
-
-Consists of a range specified as *source_offset:dest_offset:length*
-
-All values are in bytes, if length is set to 0 copy as much as available.
-Multiple range can be supplied.
-
-When one or more of the offsets are omitted the operation will use the last used location, starting with 0
+When one or both of the offsets are omitted, the operation uses the last-used
+file location, starting with 0.
== OPTIONS
-*-v*, *--verbose*::
-Verbose output of copied file ranges
+*-r*, *--ranges* _file_::
+Read range(s) separated by newlines from this _file_.
-*-r*, *--ranges*::
-Ranges filename
+*-v*, *--verbose*::
+Verbose output of the copied ranges.
include::man-common/help-version.adoc[]
== EXIT STATUS
-*copyfilerange* has the following exit status values:
-
*0*::
success
*1*::
@@ -59,7 +48,7 @@ unspecified failure
== NOTES
-The *copy_file_range*(2) system call has some serious caveats, the source and destination files must use the same filesystem type and some virtual filesystems (like procfs) won't work. *copy_file_range*(2) will use reflinks when the filesystem supports this. To use reflinks the file range most often needs to align with the filesystem block size on both the source and destination file.
+The *copy_file_range*(2) system call has some serious caveats: the source and destination files must use the same filesystem type, and some virtual filesystems (like procfs) won't work. *copy_file_range*(2) will use reflinks when the filesystem supports this. To use reflinks, the file range most often needs to align with the filesystem block size on both the source and destination file.
== AUTHORS
@@ -68,21 +57,21 @@ mailto:dick@mrns.nl[Dick Marinus]
== EXAMPLES
....
-~$ copyfilerange original-file reflink ::
+copyfilerange original-file reflink ::
-~$ copyfilerange original-file first-block ::4096
+copyfilerange original-file first-block ::4096
-~$ copyfilerange original-file even-blocks -r <(seq 0 8192 40960|awk '{print $1"::4096"}')
+copyfilerange original-file even-blocks -r <(seq 0 8192 40960|awk '{print $1"::4096"}')
-~$ copyfilerange original-file sparse-file 0:1M:1
+copyfilerange original-file sparse-file 0:1M:1
-~$ copyfilerange original-file split-first-mb ::1M
+copyfilerange original-file split-first-mb ::1M
-~$ copyfilerange original-file split-remainder 1M::
+copyfilerange original-file split-remainder 1M::
-~$ copyfilerange split-first-mb join ::
+copyfilerange split-first-mb join ::
-~$ copyfilerange split-remainder join 1M::
+copyfilerange split-remainder join 1M::
....
== SEE ALSO
--
2.53.0
^ permalink raw reply related
* improvements to terminal-colors.d.5.adoc were undone
From: Benno Schulenberg @ 2026-03-09 16:08 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux, Mario Blättermann
In-Reply-To: <cm7cun3pymf6quqcupreoegjj6ycwv3rvbap6ezpvfidvtt4lf@rq74bm7girgz>
[-- Attachment #1.1: Type: text/plain, Size: 819 bytes --]
Op 09-03-2026 om 11:51 schreef Karel Zak:
>> lib/terminal-colors.d.5.adoc | 24 ++++++++++--------------
>> 1 file changed, 10 insertions(+), 14 deletions(-)
>
> Both patches have been applied. Thank you, and sorry for the delay.
The second patch was applied in commit 3252142521, but three commits
later, merge commit d708fc7db6 undoes all the improvements I made. :/
Also, that merge commit says that it just removes the backticks from a
table, but it actually changes back two simple lists to large, bulky
tables. Before the conversion to adoc, those tables were simple lists.
A year ago, commit b3c3d865eb reduced the bulky tables back to simple
lists. Can we please keep these simple lists?
In other words: please revert commit f5d2c3e4b0. And reapply commit
3252142521.
Benno
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply
* Re: [PATCH 2/2] lsmem: (man) correct the markup of column names, and improve some grammar
From: Benno Schulenberg @ 2026-03-09 15:41 UTC (permalink / raw)
To: util-linux; +Cc: Sumanth Korikkar
In-Reply-To: <aa6-0Gx7Q8ZzWozj@li-2b55cdcc-350b-11b2-a85c-a78bff51fc11.ibm.com>
[-- Attachment #1.1: Type: text/plain, Size: 2727 bytes --]
Op 09-03-2026 om 13:36 schreef Sumanth Korikkar:
> The table is useful because configuration and deconfiguration support on
> s390 is still relatively new, and it documents the possible state
> combinations. This helps users interpret what they see in lsmem output.
I don't think so. The information that the table contains is expressed
easily in the single sentence that I replaced it with.
> * The intention is to show possible memory block states.
All state combinations are possible, except that blocks cannot be online
when they are deconfigured (when the system supports deconfiguration).
That is what my replacement sentence says.
> * The table illustrates whether a memory block is configured with
> memmap‑on‑memory is enabled (yes/no).
This makes no sense to me.
> * Users may configure a memory block with memmap‑on‑memory
> enabled/disabled and bring it online in a separate step.
If that needs explaining explicitly, then propose an additional sentence.
No need for a table.
> * Users may bring memory online in a single step, in which case the tool
> performs both configuration (if supported by the architecture) and the
> online action.
The table does not make this clear at all. The `lsmem` command does not
bring memory online or offline, so its man page is the wrong place for
trying to explain that.
> * Users may only configure memory and later deconfigure it again.
The table does not help to explain this at all.
> How about the following?
> Example STATE, CONFIGURED, MEMMAP-ON-MEMORY states:
> STATE | CONFIGURED | MEMMAP-ON-MEMORY | Description
> online | yes | yes | Memory block is configured with memmap-on-memory enabled and online.
> online | yes | no | Memory block is configured with memmap-on-memory disabled and online.
> offline | yes | yes | Memory block is configured but currently offline.
> offline | no | yes | Memory block is deconfigured and was previously configured with memmap-on-memory.
> offline | no | no | Memory block is deconfigured and was not previously configured with memmap-on-memory.
Above table gives the impression that the following line is not possible:
offline | yes | no | Memory block is configured but
currently offline.
But it is possible, right?
Again, I think any table is just a clumsy way of stating what can be said
in one or two sentences. Also, a table gives the impression that it is
important information, and thus draws attention, making the user waste
time trying to understand what is so important about it.
Benno
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply
* Re: [PATCH 2/2] lsmem: (man) correct the markup of column names, and improve some grammar
From: Sumanth Korikkar @ 2026-03-09 12:36 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux
In-Reply-To: <20260307114308.7517-2-bensberg@telfort.nl>
Hi Benno,
On Sat, Mar 07, 2026 at 12:43:08PM +0100, Benno Schulenberg wrote:
> The column names should be marked in bold and not in italics, as they
> are literal values, not placeholders.
>
> Also, indent the list of column names, to make it clearer where the
> list ends. And add the missing markup for "RANGE" and the missing
> name "REMOVABLE".
Some of the changes introduced here are independent of commit
6f1e4ff054. But, looks fine to me.
> Furthermore, drop the small table, as it held nearly no information
> and was confusing: the explicit numbers in the BLOCK column gave the
> impression that block 0 can only be online, block 1 only offline but
> configured, and block 2 only offline and deconfigured. The content
> of the MEMMAP-ON-MEMORY column being always "yes/no" was useless.
> Leaving out those columns left only STATE and CONFIGURED, where the
> values implied that memory can only be online when it is configured.
> This information can be conveyed in a single sentence.
> (The table was added in commit 6f1e4ff054 from five months ago.)
The table is useful because configuration and deconfiguration support on
s390 is still relatively new, and it documents the possible state
combinations. This helps users interpret what they see in lsmem output.
* The intention is to show possible memory block states. If the term
“BLOCK” is confusing, it can be removed.
* The table illustrates whether a memory block is configured with
memmap‑on‑memory is enabled (yes/no). This can be explained separately
if needed.
* Users may configure a memory block with memmap‑on‑memory
enabled/disabled and bring it online in a separate step.
* Users may bring memory online in a single step, in which case the tool
performs both configuration (if supported by the architecture) and the
online action.
* Users may only configure memory and later deconfigure it again.
This is the main reason for providing the table to make these
transitions clearer to the end user.
How about the following?
Example STATE, CONFIGURED, MEMMAP-ON-MEMORY states:
STATE | CONFIGURED | MEMMAP-ON-MEMORY | Description
online | yes | yes | Memory block is configured with memmap-on-memory enabled and online.
online | yes | no | Memory block is configured with memmap-on-memory disabled and online.
offline | yes | yes | Memory block is configured but currently offline.
offline | no | yes | Memory block is deconfigured and was previously configured with memmap-on-memory.
offline | no | no | Memory block is deconfigured and was not previously configured with memmap-on-memory.
Thanks
Sumanth
^ permalink raw reply
* [PATCH] waitpid: consistently write the abbreviation "PID" in all-uppercase
From: Benno Schulenberg @ 2026-03-09 11:15 UTC (permalink / raw)
To: util-linux; +Cc: Christian Goeschel Ndjomouo
Also, use %d instead of %u, as all other comparable messages use %d.
CC: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
misc-utils/waitpid.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/misc-utils/waitpid.c b/misc-utils/waitpid.c
index 865b537e9..d77a41c5e 100644
--- a/misc-utils/waitpid.c
+++ b/misc-utils/waitpid.c
@@ -74,7 +74,7 @@ static inline int get_pidfd(const struct waitpid_control *ctl, struct process_in
if (pi->pidfd_ino) {
fd = ul_get_valid_pidfd(pi->pid, pi->pidfd_ino);
if (fd < 0 && ctl->verbose)
- warnx(_("pidfd inode %"PRIu64" not found for pid %d"),
+ warnx(_("pidfd inode %"PRIu64" not found for PID %d"),
pi->pidfd_ino, pi->pid);
} else {
fd = pidfd_open(pi->pid, 0);
@@ -94,7 +94,7 @@ static void open_pidfds_or_err(const struct waitpid_control *ctl, struct process
warnx(_("PID %d has exited, skipping"), pi->pid);
continue;
}
- err_nosys(EXIT_FAILURE, _("could not open pid %u"), pi->pid);
+ err_nosys(EXIT_FAILURE, _("could not open PID %d"), pi->pid);
}
}
}
--
2.53.0
^ permalink raw reply related
* Re: [PATCH] pam_lastlog2: add -lpam to Makemodule.am
From: Karel Zak @ 2026-03-09 10:51 UTC (permalink / raw)
To: Morgan; +Cc: util-linux
In-Reply-To: <CAEUYr6ZH=9akE64zf5FM3u+Sr44oSJctk2gemiadisghEFESbg@mail.gmail.com>
On Mon, Mar 02, 2026 at 11:08:39AM -0800, Morgan wrote:
> pam_lastlog2/src/Makemodule.am | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks!
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [PATCH] findfs: (man) improve the markup, the layout, and the wording
From: Karel Zak @ 2026-03-09 10:51 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux
In-Reply-To: <20260301164505.24409-1-bensberg@telfort.nl>
On Sat, Feb 28, 2026 at 12:52:45PM +0100, Benno Schulenberg wrote:
> misc-utils/findfs.8.adoc | 36 ++++++++++++++++++++++--------------
> 1 file changed, 22 insertions(+), 14 deletions(-)
> lib/terminal-colors.d.5.adoc | 24 ++++++++++--------------
> 1 file changed, 10 insertions(+), 14 deletions(-)
Both patches have been applied. Thank you, and sorry for the delay.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [PATCH 1/2] lsmem: correct the grammar of an error message
From: Sumanth Korikkar @ 2026-03-09 9:20 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux
In-Reply-To: <20260307114308.7517-1-bensberg@telfort.nl>
On Sat, Mar 07, 2026 at 12:43:07PM +0100, Benno Schulenberg wrote:
> That is: make the message identical to its twin nine lines back.
>
> (The spello was introduced by commit 92d018a105 from five months ago.)
>
> CC: Sumanth Korikkar <sumanthk@linux.ibm.com>
> Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
Reviewed-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
> ---
> sys-utils/lsmem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sys-utils/lsmem.c b/sys-utils/lsmem.c
> index b74c95d43..aee68a171 100644
> --- a/sys-utils/lsmem.c
> +++ b/sys-utils/lsmem.c
> @@ -819,7 +819,7 @@ int main(int argc, char **argv)
> /* open /sys/firmware/memory handler (optional) */
> lsmem->sysmemconfig = ul_new_path(_PATH_SYS_MEMCONFIG);
> if (!lsmem->sysmemconfig)
> - err(EXIT_FAILURE, _("failed to initialized %s handler"), _PATH_SYS_MEMCONFIG);
> + err(EXIT_FAILURE, _("failed to initialize %s handler"), _PATH_SYS_MEMCONFIG);
> if (prefix && ul_path_set_prefix(lsmem->sysmemconfig, prefix) != 0)
> err(EXIT_FAILURE, _("invalid argument to --sysroot"));
>
> --
> 2.53.0
>
^ permalink raw reply
* Re: [PATCH 1/3] nsenter: (usage) correct the formatting of eight option arguments
From: Xiao Liang @ 2026-03-09 1:52 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux
In-Reply-To: <20260308112004.9206-1-bensberg@telfort.nl>
On Sun, Mar 8, 2026 at 7:20 PM Benno Schulenberg <bensberg@telfort.nl> wrote:
>
> Angle brackets should wrap each placeholder separately: <file> and
> <nsid>. Angle brackets should not enclose metacharacters (|) nor
> literal ones (= and :).
>
> (The mistaken formatting was introduced by commit f2a5997869.)
>
> CC: Xiao Liang <shaw.leon@gmail.com>
> Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
> ---
> sys-utils/nsenter.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c
> index f93e75af2..98da75511 100644
> --- a/sys-utils/nsenter.c
> +++ b/sys-utils/nsenter.c
> @@ -97,16 +97,16 @@ static void __attribute__((__noreturn__)) usage(void)
> fputs(USAGE_OPTIONS, out);
> fputs(_(" -a, --all enter all namespaces\n"), out);
> fputs(_(" -t, --target <PID> target process to get namespaces from\n"), out);
> - fputs(_(" -m, --mount[=<file|:nsid>] enter mount namespace\n"), out);
> - fputs(_(" -u, --uts[=<file|:nsid>] enter UTS namespace (hostname etc)\n"), out);
> - fputs(_(" -i, --ipc[=<file|:nsid>] enter System V IPC namespace\n"), out);
> - fputs(_(" -n, --net[=<file|:nsid>] enter network namespace\n"), out);
> + fputs(_(" -m, --mount[=<file>|=:<nsid>] enter mount namespace\n"), out);
> + fputs(_(" -u, --uts[=<file>|=:<nsid>] enter UTS namespace (hostname etc)\n"), out);
> + fputs(_(" -i, --ipc[=<file>|=:<nsid>] enter System V IPC namespace\n"), out);
> + fputs(_(" -n, --net[=<file>|=:<nsid>] enter network namespace\n"), out);
> fputs(_(" -N, --net-socket <fd> enter socket's network namespace (use with --target)\n"), out);
> - fputs(_(" -p, --pid[=<file|:nsid>] enter pid namespace\n"), out);
> - fputs(_(" -C, --cgroup[=<file|:nsid>] enter cgroup namespace\n"), out);
> - fputs(_(" -U, --user[=<file|:nsid>] enter user namespace\n"), out);
> + fputs(_(" -p, --pid[=<file>|=:<nsid>] enter pid namespace\n"), out);
> + fputs(_(" -C, --cgroup[=<file>|=:<nsid>] enter cgroup namespace\n"), out);
> + fputs(_(" -U, --user[=<file>|=:<nsid>] enter user namespace\n"), out);
> fputs(_(" --user-parent enter parent user namespace\n"), out);
> - fputs(_(" -T, --time[=<file|:nsid>] enter time namespace\n"), out);
> + fputs(_(" -T, --time[=<file>|=:<nsid>] enter time namespace\n"), out);
> fputs(_(" -S, --setuid[=<uid>] set uid in entered namespace\n"), out);
> fputs(_(" -G, --setgid[=<gid>] set gid in entered namespace\n"), out);
> fputs(_(" --preserve-credentials do not touch uids or gids\n"), out);
> --
> 2.53.0
>
Looks good. Thanks for the correction.
^ permalink raw reply
* [PATCH 3/3] nsenter: (man) correct the markup and improve the formatting
From: Benno Schulenberg @ 2026-03-08 11:20 UTC (permalink / raw)
To: util-linux; +Cc: Xiao Liang, Christian Goeschel Ndjomouo
In-Reply-To: <20260308112004.9206-1-bensberg@telfort.nl>
Remove the mistaken angle brackets that were introduced last month
by commit f2a5997869, add the missing equals sign, and put both it
and the subsequent colon in bold as they are literal characters.
Also, indent the list of paths to make it clearer where it ends,
and so that the subsequent paragraph gets indented correctly.
CC: Xiao Liang <shaw.leon@gmail.com>
CC: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
sys-utils/nsenter.1.adoc | 45 ++++++++++++++++++++--------------------
1 file changed, 23 insertions(+), 22 deletions(-)
diff --git a/sys-utils/nsenter.1.adoc b/sys-utils/nsenter.1.adoc
index 9e5bc81da..34fde93ac 100644
--- a/sys-utils/nsenter.1.adoc
+++ b/sys-utils/nsenter.1.adoc
@@ -59,9 +59,10 @@ by namespace-specific options (e.g., **--all --mount=**_path_).
+
The user namespace will be ignored if it is the same as the caller's current user namespace. It prevents a caller that has dropped capabilities from regaining those capabilities via a call to *setns*(2). See the man page for more details.
-*-t*, *--target* _PID[:inode]_::
+*-t*, *--target* _PID_[**:**_inode_]::
Specify a target process to get contexts from. The paths to the contexts specified by _PID_ are:
-
++
+____
_/proc/pid/ns/mnt_;;
the mount namespace
_/proc/pid/ns/uts_;;
@@ -82,41 +83,41 @@ _/proc/pid/root_;;
the root directory
_/proc/pid/cwd_;;
the working directory respectively
-
-Optionally, a process can be addressed with the format _PID:inode_. The _inode_
+____
+Optionally, a process can be addressed with the format _PID_**:**_inode_. The _inode_
identifies the unique process's file descriptor. To retrieve a process's inode
number you can use the *getino*(1) utility.
-*-m*, *--mount*[**=**<__file__|:__nsid__>]::
-Enter the mount namespace. If no argument is specified, enter the mount namespace of the target process. If _file_ or :__nsid__ is specified, enter the mount namespace specified by _file_ or _nsid_.
+*-m*, *--mount*[**=**_file_|**=:**_nsid_]::
+Enter the mount namespace. If no argument is specified, enter the mount namespace of the target process. If _file_ or **:**_nsid_ is specified, enter the mount namespace specified by _file_ or _nsid_.
-*-u*, *--uts*[**=**<__file__|:__nsid__>]::
-Enter the UTS namespace. If no argument is specified, enter the UTS namespace of the target process. If _file_ or :__nsid__ is specified, enter the UTS namespace specified by _file_ or _nsid_.
+*-u*, *--uts*[**=**_file_|**=:**_nsid_]::
+Enter the UTS namespace. If no argument is specified, enter the UTS namespace of the target process. If _file_ or **:**_nsid_ is specified, enter the UTS namespace specified by _file_ or _nsid_.
-*-i*, *--ipc*[**=**<__file__|:__nsid__>]::
-Enter the IPC namespace. If no argument is specified, enter the IPC namespace of the target process. If _file_ or :__nsid__ is specified, enter the IPC namespace specified by _file_ or _nsid_.
+*-i*, *--ipc*[**=**_file_|**=:**_nsid_]::
+Enter the IPC namespace. If no argument is specified, enter the IPC namespace of the target process. If _file_ or **:**_nsid_ is specified, enter the IPC namespace specified by _file_ or _nsid_.
-*-n*, *--net*[**=**<__file__|:__nsid__>]::
-Enter the network namespace. If no argument is specified, enter the network namespace of the target process. If _file_ or :__nsid__ is specified, enter the network namespace specified by _file_ or _nsid_.
+*-n*, *--net*[**=**_file_|**=:**_nsid_]::
+Enter the network namespace. If no argument is specified, enter the network namespace of the target process. If _file_ or **:**_nsid_ is specified, enter the network namespace specified by _file_ or _nsid_.
*-N*, *--net-socket* _fd_::
Enter the network namespace of the target process's socket. It requires *--target* process specified. Supported since Linux 5.6.
-*-p*, *--pid*[**=**<__file__|:__nsid__>]::
-Enter the PID namespace. If no argument is specified, enter the PID namespace of the target process. If _file_ or :__nsid__ is specified, enter the PID namespace specified by _file_ or _nsid_.
+*-p*, *--pid*[**=**_file_|**=:**_nsid_]::
+Enter the PID namespace. If no argument is specified, enter the PID namespace of the target process. If _file_ or **:**_nsid_ is specified, enter the PID namespace specified by _file_ or _nsid_.
-*-U*, *--user*[**=**<__file__|:__nsid__>]::
-Enter the user namespace. If no argument is specified, enter the user namespace of the target process. If _file_ or :__nsid__ is specified, enter the user namespace specified by _file_ or _nsid_. See also the *--setuid* and *--setgid* options.
+*-U*, *--user*[**=**_file_|**=:**_nsid_]::
+Enter the user namespace. If no argument is specified, enter the user namespace of the target process. If _file_ or **:**_nsid_ is specified, enter the user namespace specified by _file_ or _nsid_. See also the *--setuid* and *--setgid* options.
*--user-parent*::
Enter the parent user namespace. Parent user namespace will be acquired from any other enabled namespace.
If combined with *--user* option the parent user namespace will be fetched from the user namespace and replace it.
-*-C*, *--cgroup*[**=**<__file__|:__nsid__>]::
-Enter the cgroup namespace. If no argument is specified, enter the cgroup namespace of the target process. If _file_ or :__nsid__ is specified, enter the cgroup namespace specified by _file_ or _nsid_.
+*-C*, *--cgroup*[**=**_file_|**=:**_nsid_]::
+Enter the cgroup namespace. If no argument is specified, enter the cgroup namespace of the target process. If _file_ or **:**_nsid_ is specified, enter the cgroup namespace specified by _file_ or _nsid_.
-*-T*, *--time*[**=**<__file__|:__nsid__>]::
-Enter the time namespace. If no argument is specified, enter the time namespace of the target process. If _file_ or :__nsid__ is specified, enter the time namespace specified by _file_ or _nsid_.
+*-T*, *--time*[**=**_file_|**=:**_nsid_]::
+Enter the time namespace. If no argument is specified, enter the time namespace of the target process. If _file_ or **:**_nsid_ is specified, enter the time namespace specified by _file_ or _nsid_.
*-G*, *--setgid* _gid_::
Set the group ID which will be used in the entered namespace and drop supplementary groups.
@@ -161,8 +162,8 @@ include::man-common/help-version.adoc[]
The *--user-parent* option requires Linux 4.9 or higher, older kernels will raise inappropriate ioctl for device error.
-Specifying namespaces by _nsid_ requires Linux 6.19 or higher. If a namespace
-file name starts with a colon, prepend "./" for disambiguation.
+Specifying namespaces by _nsid_ requires Linux 6.19 or higher.
+If a namespace _file_ name starts with a colon, prepend *./* for disambiguation.
== AUTHORS
--
2.53.0
^ permalink raw reply related
* [PATCH 2/3] nsenter: (usage) improve the alignment of the option descriptions
From: Benno Schulenberg @ 2026-03-08 11:20 UTC (permalink / raw)
To: util-linux
In-Reply-To: <20260308112004.9206-1-bensberg@telfort.nl>
Perfect alignment is not possible, otherwise too little space remains
for the descriptions.
Also, slightly reword one description to fit within 80 columns again,
and align also a description that was missed by commit 986188d1da two
monts ago.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
sys-utils/nsenter.c | 46 ++++++++++++++++++++++-----------------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c
index 98da75511..e10ba9cf9 100644
--- a/sys-utils/nsenter.c
+++ b/sys-utils/nsenter.c
@@ -95,34 +95,34 @@ static void __attribute__((__noreturn__)) usage(void)
fputs(_("Run a program with namespaces of other processes.\n"), out);
fputs(USAGE_OPTIONS, out);
- fputs(_(" -a, --all enter all namespaces\n"), out);
- fputs(_(" -t, --target <PID> target process to get namespaces from\n"), out);
- fputs(_(" -m, --mount[=<file>|=:<nsid>] enter mount namespace\n"), out);
- fputs(_(" -u, --uts[=<file>|=:<nsid>] enter UTS namespace (hostname etc)\n"), out);
- fputs(_(" -i, --ipc[=<file>|=:<nsid>] enter System V IPC namespace\n"), out);
- fputs(_(" -n, --net[=<file>|=:<nsid>] enter network namespace\n"), out);
- fputs(_(" -N, --net-socket <fd> enter socket's network namespace (use with --target)\n"), out);
- fputs(_(" -p, --pid[=<file>|=:<nsid>] enter pid namespace\n"), out);
+ fputs(_(" -a, --all enter all namespaces\n"), out);
+ fputs(_(" -t, --target <PID> target process to get namespaces from\n"), out);
+ fputs(_(" -m, --mount[=<file>|=:<nsid>] enter mount namespace\n"), out);
+ fputs(_(" -u, --uts[=<file>|=:<nsid>] enter UTS namespace (hostname etc)\n"), out);
+ fputs(_(" -i, --ipc[=<file>|=:<nsid>] enter System V IPC namespace\n"), out);
+ fputs(_(" -n, --net[=<file>|=:<nsid>] enter network namespace\n"), out);
+ fputs(_(" -N, --net-socket <fd> enter socket's network namespace (needs --target)\n"), out);
+ fputs(_(" -p, --pid[=<file>|=:<nsid>] enter pid namespace\n"), out);
fputs(_(" -C, --cgroup[=<file>|=:<nsid>] enter cgroup namespace\n"), out);
- fputs(_(" -U, --user[=<file>|=:<nsid>] enter user namespace\n"), out);
- fputs(_(" --user-parent enter parent user namespace\n"), out);
- fputs(_(" -T, --time[=<file>|=:<nsid>] enter time namespace\n"), out);
- fputs(_(" -S, --setuid[=<uid>] set uid in entered namespace\n"), out);
- fputs(_(" -G, --setgid[=<gid>] set gid in entered namespace\n"), out);
- fputs(_(" --preserve-credentials do not touch uids or gids\n"), out);
- fputs(_(" --keep-caps retain capabilities granted in user namespaces\n"), out);
- fputs(_(" -r, --root[=<dir>] set the root directory\n"), out);
- fputs(_(" -w, --wd[=<dir>] set the working directory\n"), out);
- fputs(_(" -W, --wdns <dir> set the working directory in namespace\n"), out);
- fputs(_(" -e, --env inherit environment variables from target process\n"), out);
- fputs(_(" -F, --no-fork do not fork before exec'ing <program>\n"), out);
- fputs(_(" -c, --join-cgroup join the cgroup of the target process\n"), out);
+ fputs(_(" -U, --user[=<file>|=:<nsid>] enter user namespace\n"), out);
+ fputs(_(" --user-parent enter parent user namespace\n"), out);
+ fputs(_(" -T, --time[=<file>|=:<nsid>] enter time namespace\n"), out);
+ fputs(_(" -S, --setuid[=<uid>] set uid in entered namespace\n"), out);
+ fputs(_(" -G, --setgid[=<gid>] set gid in entered namespace\n"), out);
+ fputs(_(" --preserve-credentials do not touch uids or gids\n"), out);
+ fputs(_(" --keep-caps retain capabilities granted in user namespaces\n"), out);
+ fputs(_(" -r, --root[=<dir>] set the root directory\n"), out);
+ fputs(_(" -w, --wd[=<dir>] set the working directory\n"), out);
+ fputs(_(" -W, --wdns <dir> set the working directory in namespace\n"), out);
+ fputs(_(" -e, --env inherit environment variables from target process\n"), out);
+ fputs(_(" -F, --no-fork do not fork before exec'ing <program>\n"), out);
+ fputs(_(" -c, --join-cgroup join the cgroup of the target process\n"), out);
#ifdef HAVE_LIBSELINUX
- fputs(_(" -Z, --follow-context set SELinux context according to --target PID\n"), out);
+ fputs(_(" -Z, --follow-context set SELinux context according to --target PID\n"), out);
#endif
fputs(USAGE_SEPARATOR, out);
- fprintf(out, USAGE_HELP_OPTIONS(30));
+ fprintf(out, USAGE_HELP_OPTIONS(31));
fprintf(out, USAGE_MAN_TAIL("nsenter(1)"));
exit(EXIT_SUCCESS);
--
2.53.0
^ permalink raw reply related
* [PATCH 1/3] nsenter: (usage) correct the formatting of eight option arguments
From: Benno Schulenberg @ 2026-03-08 11:20 UTC (permalink / raw)
To: util-linux; +Cc: Xiao Liang
Angle brackets should wrap each placeholder separately: <file> and
<nsid>. Angle brackets should not enclose metacharacters (|) nor
literal ones (= and :).
(The mistaken formatting was introduced by commit f2a5997869.)
CC: Xiao Liang <shaw.leon@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
sys-utils/nsenter.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c
index f93e75af2..98da75511 100644
--- a/sys-utils/nsenter.c
+++ b/sys-utils/nsenter.c
@@ -97,16 +97,16 @@ static void __attribute__((__noreturn__)) usage(void)
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --all enter all namespaces\n"), out);
fputs(_(" -t, --target <PID> target process to get namespaces from\n"), out);
- fputs(_(" -m, --mount[=<file|:nsid>] enter mount namespace\n"), out);
- fputs(_(" -u, --uts[=<file|:nsid>] enter UTS namespace (hostname etc)\n"), out);
- fputs(_(" -i, --ipc[=<file|:nsid>] enter System V IPC namespace\n"), out);
- fputs(_(" -n, --net[=<file|:nsid>] enter network namespace\n"), out);
+ fputs(_(" -m, --mount[=<file>|=:<nsid>] enter mount namespace\n"), out);
+ fputs(_(" -u, --uts[=<file>|=:<nsid>] enter UTS namespace (hostname etc)\n"), out);
+ fputs(_(" -i, --ipc[=<file>|=:<nsid>] enter System V IPC namespace\n"), out);
+ fputs(_(" -n, --net[=<file>|=:<nsid>] enter network namespace\n"), out);
fputs(_(" -N, --net-socket <fd> enter socket's network namespace (use with --target)\n"), out);
- fputs(_(" -p, --pid[=<file|:nsid>] enter pid namespace\n"), out);
- fputs(_(" -C, --cgroup[=<file|:nsid>] enter cgroup namespace\n"), out);
- fputs(_(" -U, --user[=<file|:nsid>] enter user namespace\n"), out);
+ fputs(_(" -p, --pid[=<file>|=:<nsid>] enter pid namespace\n"), out);
+ fputs(_(" -C, --cgroup[=<file>|=:<nsid>] enter cgroup namespace\n"), out);
+ fputs(_(" -U, --user[=<file>|=:<nsid>] enter user namespace\n"), out);
fputs(_(" --user-parent enter parent user namespace\n"), out);
- fputs(_(" -T, --time[=<file|:nsid>] enter time namespace\n"), out);
+ fputs(_(" -T, --time[=<file>|=:<nsid>] enter time namespace\n"), out);
fputs(_(" -S, --setuid[=<uid>] set uid in entered namespace\n"), out);
fputs(_(" -G, --setgid[=<gid>] set gid in entered namespace\n"), out);
fputs(_(" --preserve-credentials do not touch uids or gids\n"), out);
--
2.53.0
^ permalink raw reply related
* [PATCH 2/2] lsmem: (man) correct the markup of column names, and improve some grammar
From: Benno Schulenberg @ 2026-03-07 11:43 UTC (permalink / raw)
To: util-linux; +Cc: Sumanth Korikkar
In-Reply-To: <20260307114308.7517-1-bensberg@telfort.nl>
The column names should be marked in bold and not in italics, as they
are literal values, not placeholders.
Also, indent the list of column names, to make it clearer where the
list ends. And add the missing markup for "RANGE" and the missing
name "REMOVABLE".
Furthermore, drop the small table, as it held nearly no information
and was confusing: the explicit numbers in the BLOCK column gave the
impression that block 0 can only be online, block 1 only offline but
configured, and block 2 only offline and deconfigured. The content
of the MEMMAP-ON-MEMORY column being always "yes/no" was useless.
Leaving out those columns left only STATE and CONFIGURED, where the
values implied that memory can only be online when it is configured.
This information can be conveyed in a single sentence.
(The table was added in commit 6f1e4ff054 from five months ago.)
CC: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
sys-utils/lsmem.1.adoc | 65 +++++++++++++++++++-----------------------
1 file changed, 29 insertions(+), 36 deletions(-)
diff --git a/sys-utils/lsmem.1.adoc b/sys-utils/lsmem.1.adoc
index 3fcdba625..bbc1bb8e0 100644
--- a/sys-utils/lsmem.1.adoc
+++ b/sys-utils/lsmem.1.adoc
@@ -16,57 +16,50 @@ lsmem - list the ranges of available memory with their online status
== DESCRIPTION
-The *lsmem* command lists the ranges of available memory with their online status. The listed memory blocks correspond to the memory block representation in sysfs. The command also shows the memory block size and the amount of memory in online and offline state.
+The *lsmem* command lists the ranges of available memory with their online status. The listed memory blocks correspond to the memory block representation in sysfs. The command also shows the size of a single memory block and the total amounts of memory in online and offline state.
-The default output is compatible with original implementation from s390-tools, but it's strongly recommended to avoid using default outputs in your scripts. Always explicitly define expected columns by using the *--output* option together with a columns list in environments where a stable output is required.
+The default output is compatible with the original implementation from s390-tools, but it's strongly recommended to avoid using default outputs in your scripts. Always explicitly define expected columns by using the *--output* option together with a columns list in environments where a stable output is required.
-The *lsmem* command lists a new memory range always when the current memory block distinguish from the previous block by some output column. This default behavior is possible to override by the *--split* option (e.g., *lsmem --split=ZONES*). The special word "none" may be used to ignore all differences between memory blocks and to create as large as possible continuous ranges. The opposite semantic is *--all* to list individual memory blocks.
+The *lsmem* command always lists a new memory range when the current memory block differs from the previous block by some output column. This default behavior can be overridden with the *--split* option (for example: *lsmem --split=ZONES*). The special word *none* may be used with *--split* to ignore all differences between memory blocks and to create contiguous ranges that are as large as possible. The opposite semantics has *--all*, which lists all individual memory blocks.
-Note that some output columns may provide inaccurate information if a split policy forces *lsmem* to ignore differences in some attributes. For example if you merge removable and non-removable memory blocks to the one range than all the range will be marked as non-removable on *lsmem* output.
+Note that some output columns may provide inaccurate information if a splitting policy forces *lsmem* to ignore differences in some attributes. For example, if you merge removable and non-removable memory blocks into a single range, then the whole range will be marked as non-removable in *lsmem* output.
-The supported columns are RANGE, SIZE, STATE, REMOVABLE, BLOCK, NODE, ZONES, CONFIGURED, MEMMAP-ON-MEMORY.
-RANGE
-The start and end physical address of the memory range.
+The supported columns are *RANGE*, *SIZE*, *STATE*, *REMOVABLE*, *BLOCK*, *NODE*, *ZONES*, *CONFIGURED*, and *MEMMAP-ON-MEMORY*.
+____
+*RANGE*::
+The start and end physical addresses of the memory range.
-_SIZE_::
+*SIZE*::
The size of the memory range, representing the total amount of memory in that range.
-_STATE_::
-The current online status of the memory range. Common states include online, offline or transitional states.
+*STATE*::
+The current online status of the memory range. Common states include online, offline, and transitional states.
-_BLOCK_::
-The specific memory block number.
+*REMOVABLE*::
+Whether the memory is removable.
-_NODE_::
+*BLOCK*::
+The specific memory block number or range.
+
+*NODE*::
The NUMA (Non-Uniform Memory Access) node to which the memory block belongs.
-_ZONES_::
+*ZONES*::
The memory zones to which the blocks belongs, such as DMA, Normal, Movable.
-_CONFIGURED_::
-The configuration state of a memory block. Refer to *chmem* for details on configuring or deconfiguring memory blocks.
+*CONFIGURED*::
+The configuration state of a memory block. Refer to *chmem*(8) for details on configuring or deconfiguring memory blocks.
-_MEMMAP-ON-MEMORY_::
+*MEMMAP-ON-MEMORY*::
The memmap-on-memory state of the memory block at configuration time. This setting indicates where memory hotplug stores its internal metadata (the struct pages array or memmap). If MEMMAP-ON-MEMORY is set to 1, the metadata is allocated directly from the newly added hotplugged memory, enabling hot-add operations even when the system is under high memory pressure. If set to 0, the memmap metadata is allocated from existing system memory.
+____
-Possible BLOCK, CONFIGURED, STATE, MEMMAP-ON-MEMORY states::
+Not all columns are supported on all systems. If an unsupported column is specified, *lsmem* prints the column but does not provide any data for it. Additionally, *lsmem* may skip columns like *CONFIGURED* or *MEMMAP-ON-MEMORY* if these states are not relevant to the system's architecture.
-[cols="10,10,10,15,60", options="header"]
-|===
-| BLOCK | STATE | CONFIGURED | MEMMAP-ON-MEMORY | Description
+On systems that can configure/deconfigure memory, memory needs to be configured
+before it can come online.
-| 0 | online | yes | yes/no | The memory is configured with memmap-on-memory set to (1 or 0) and memory is currently online.
-
-| 1 | offline | yes | yes/no | The memory is configured, but memory is offline.
-
-| 2 | offline | no | yes/no | The memory is offline and deconfigured.
-|===
-
-Not all columns are supported on all systems. If an unsupported column is specified, *lsmem* prints the column but does not provide any data for it. Additionally, *lsmem* may skip columns like _CONFIGURED_ or _MEMMAP-ON-MEMORY_ if these states are not relevant to the system's architecture.
-
-Use the *--help* option to see the columns description.
-
-Memmap on memory parameter output displays the globally enabled memmap-on-memory setting for memory_hotplug. This is typically set on the kernel command line via memory_hotplug.memmap_on_memory.
+The "Memmap on memory parameter" summary line shows the global memmap-on-memory setting for memory_hotplug. This is typically set on the kernel command line via memory_hotplug.memmap_on_memory.
== OPTIONS
@@ -95,19 +88,19 @@ Produce output in the form of key="value" pairs. All potentially unsafe value ch
Produce output in raw format. All potentially unsafe characters are hex-escaped (\x<code>).
*-S*, *--split* _list_::
-Specify which columns are used to split memory blocks to ranges. The supported columns are STATE, REMOVABLE, NODE, ZONES, CONFIGURED, MEMMAP-ON-MEMORY or "none". The other columns are silently ignored. For more details see *DESCRIPTION* above.
+Specify which columns are used to split memory blocks into ranges. The supported columns are *STATE*, *REMOVABLE*, *NODE*, *ZONES*, *CONFIGURED*, *MEMMAP-ON-MEMORY*, and *none*. Other column names are silently ignored. For more details see *DESCRIPTION* above.
*-s*, *--sysroot* _directory_::
Gather memory data for a Linux instance other than the instance from which the *lsmem* command is issued. The specified _directory_ is the system root of the Linux instance to be inspected.
*--summary*[**=**_when_]::
-This option controls summary lines output. The optional argument _when_ can be *never*, *always* or *only*. If the _when_ argument is omitted, it defaults to *"only"*. The summary output is suppressed for *--raw*, *--pairs* and *--json*.
+This option controls summary lines output. The optional argument _when_ can be *never*, *always* or *only*. If the _when_ argument is omitted, it defaults to *only*. The summary output is suppressed for *--raw*, *--pairs*, and *--json*.
include::man-common/help-version.adoc[]
== ENVIRONMENT
-LSMEM_COLUMNS=::
+*LSMEM_COLUMNS*::
Specifies a comma-separated list of output columns to print. All columns listed in *--help* can be used.
== AUTHORS
--
2.53.0
^ permalink raw reply related
* [PATCH 1/2] lsmem: correct the grammar of an error message
From: Benno Schulenberg @ 2026-03-07 11:43 UTC (permalink / raw)
To: util-linux; +Cc: Sumanth Korikkar
That is: make the message identical to its twin nine lines back.
(The spello was introduced by commit 92d018a105 from five months ago.)
CC: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
sys-utils/lsmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-utils/lsmem.c b/sys-utils/lsmem.c
index b74c95d43..aee68a171 100644
--- a/sys-utils/lsmem.c
+++ b/sys-utils/lsmem.c
@@ -819,7 +819,7 @@ int main(int argc, char **argv)
/* open /sys/firmware/memory handler (optional) */
lsmem->sysmemconfig = ul_new_path(_PATH_SYS_MEMCONFIG);
if (!lsmem->sysmemconfig)
- err(EXIT_FAILURE, _("failed to initialized %s handler"), _PATH_SYS_MEMCONFIG);
+ err(EXIT_FAILURE, _("failed to initialize %s handler"), _PATH_SYS_MEMCONFIG);
if (prefix && ul_path_set_prefix(lsmem->sysmemconfig, prefix) != 0)
err(EXIT_FAILURE, _("invalid argument to --sysroot"));
--
2.53.0
^ permalink raw reply related
* Re: [ANNOUNCE] util-linux v2.42-rc1
From: Chris Hofstaedtler @ 2026-03-04 13:34 UTC (permalink / raw)
To: Karel Zak; +Cc: Sumanth Korikkar, debian-loongarch, util-linux
In-Reply-To: <pj7nqvgvazvimjhx7r3j7qt7zi2hvziv3bxjwnsaxpy45zjpxc@eimfo2zs6p5t>
* Karel Zak <kzak@redhat.com> [260303 11:09]:
>On Mon, Mar 02, 2026 at 04:59:06PM +0100, Sumanth Korikkar wrote:
>> * When --sysroot is used, do not read /sys/firmware/memory
>> (used on s390). This makes sure lsmem reads only the memory
>> directories inside the given sysroot, so the directory list
>> is correct.
>
>Thanks for looking into this. I think your patch is a workaround
>though. It bypasses sysmemconfig and memmap_on_memory when --sysroot
>is used rather than fixing the root cause.
>
>The real problem is that --sysroot prefix was not applied to all sysfs
>paths. The sysmemconfig handler was never prefixed, and print_summary()
>used raw fopen() to read memmap_on_memory, completely ignoring --sysroot.
>
>I've pushed different solution fix to
>https://github.com/util-linux/util-linux/pull/4090
Thanks, I've pulled this into our build and can confirm it fixes the
issue on loong64.
Best,
Chris
^ permalink raw reply
* Re: [ANNOUNCE] util-linux v2.42-rc1
From: Samuel Thibault @ 2026-03-03 13:13 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
In-Reply-To: <agv5t6nkowhcpuw6iszi3bkwnxioqffp3ynmx7ronn5ycbegxe@kwibynxo6q6t>
Karel Zak, le mar. 03 mars 2026 12:46:57 +0100, a ecrit:
> On Fri, Feb 27, 2026 at 01:28:54AM +0100, Samuel Thibault wrote:
> > Here is a fix for non-linux systems.
>
> Thanks. I made a small cleanup based on your suggestions.
> https://github.com/util-linux/util-linux/pull/4091
It builds fine, thanks!
Samuel
^ permalink raw reply
* Re: [ANNOUNCE] util-linux v2.42-rc1
From: Sumanth Korikkar @ 2026-03-03 12:51 UTC (permalink / raw)
To: Karel Zak; +Cc: Chris Hofstaedtler, debian-loongarch, util-linux
In-Reply-To: <pj7nqvgvazvimjhx7r3j7qt7zi2hvziv3bxjwnsaxpy45zjpxc@eimfo2zs6p5t>
On Tue, Mar 03, 2026 at 11:08:00AM +0100, Karel Zak wrote:
> On Mon, Mar 02, 2026 at 04:59:06PM +0100, Sumanth Korikkar wrote:
> > * When --sysroot is used, do not read /sys/firmware/memory
> > (used on s390). This makes sure lsmem reads only the memory
> > directories inside the given sysroot, so the directory list
> > is correct.
>
> Hi Sumanth,
>
> Thanks for looking into this. I think your patch is a workaround
> though. It bypasses sysmemconfig and memmap_on_memory when --sysroot
> is used rather than fixing the root cause.
>
> The real problem is that --sysroot prefix was not applied to all sysfs
> paths. The sysmemconfig handler was never prefixed, and print_summary()
> used raw fopen() to read memmap_on_memory, completely ignoring --sysroot.
>
> I've pushed different solution fix to
> https://github.com/util-linux/util-linux/pull/4090
>
> This way all sysfs reads go through the prefix, and tests produce
> consistent results regardless of the host system.
>
> Karel
>
> --
> Karel Zak <kzak@redhat.com>
> http://karelzak.blogspot.com
>
Hi Karel,
Thanks for fixing it. I tested the pull request and it looks good to me.
Best Regards,
Sumanth
^ permalink raw reply
* Re: [ANNOUNCE] util-linux v2.42-rc1
From: Karel Zak @ 2026-03-03 11:46 UTC (permalink / raw)
To: Samuel Thibault, util-linux
In-Reply-To: <aaDlRkT-yYc87zpf@end>
On Fri, Feb 27, 2026 at 01:28:54AM +0100, Samuel Thibault wrote:
> Here is a fix for non-linux systems.
Thanks. I made a small cleanup based on your suggestions.
https://github.com/util-linux/util-linux/pull/4091
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [ANNOUNCE] util-linux v2.42-rc1
From: Karel Zak @ 2026-03-03 10:08 UTC (permalink / raw)
To: Sumanth Korikkar; +Cc: Chris Hofstaedtler, debian-loongarch, util-linux
In-Reply-To: <aaWzysmPNrkPm4p1@li-2b55cdcc-350b-11b2-a85c-a78bff51fc11.ibm.com>
On Mon, Mar 02, 2026 at 04:59:06PM +0100, Sumanth Korikkar wrote:
> * When --sysroot is used, do not read /sys/firmware/memory
> (used on s390). This makes sure lsmem reads only the memory
> directories inside the given sysroot, so the directory list
> is correct.
Hi Sumanth,
Thanks for looking into this. I think your patch is a workaround
though. It bypasses sysmemconfig and memmap_on_memory when --sysroot
is used rather than fixing the root cause.
The real problem is that --sysroot prefix was not applied to all sysfs
paths. The sysmemconfig handler was never prefixed, and print_summary()
used raw fopen() to read memmap_on_memory, completely ignoring --sysroot.
I've pushed different solution fix to
https://github.com/util-linux/util-linux/pull/4090
This way all sysfs reads go through the prefix, and tests produce
consistent results regardless of the host system.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* [PATCH] pam_lastlog2: add -lpam to Makemodule.am
From: Morgan @ 2026-03-02 19:08 UTC (permalink / raw)
To: util-linux
From c8e620c6bcd044786c59f822810fc973090dbfa2 Mon Sep 17 00:00:00 2001
From: Morgan Jones <me@numin.it>
Date: Mon, 2 Mar 2026 11:03:39 -0800
Subject: [PATCH] pam_lastlog2: add -lpam to Makemodule.am
If we don't add this, we don't actually link with PAM; compare the
before and after of `lib/security/pam_lastlog2.so`.
```
Dynamic section at offset 0x2ce8 contains 31 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [liblastlog2.so.2]
0x0000000000000001 (NEEDED) Shared library: [libsqlite3.so]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000e (SONAME) Library soname: [pam_lastlog2.so]
```
```
Dynamic section at offset 0x2cd8 contains 32 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libpam.so.0]
0x0000000000000001 (NEEDED) Shared library: [liblastlog2.so.2]
0x0000000000000001 (NEEDED) Shared library: [libsqlite3.so]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000e (SONAME) Library soname: [pam_lastlog2.so]
```
This causes issues like https://github.com/NixOS/nixpkgs/issues/493934
where the library has trouble linking with PAM symbols because it is not
linked.
Signed-off-by: Morgan Jones <me@numin.it>
---
pam_lastlog2/src/Makemodule.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pam_lastlog2/src/Makemodule.am b/pam_lastlog2/src/Makemodule.am
index 40d597c58..629930853 100644
--- a/pam_lastlog2/src/Makemodule.am
+++ b/pam_lastlog2/src/Makemodule.am
@@ -13,7 +13,7 @@ pam_lastlog2_la_CFLAGS = \
pam_lastlog2_la_LIBADD = liblastlog2.la
-pam_lastlog2_la_LDFLAGS = $(SOLIB_LDFLAGS) -module -avoid-version -shared
+pam_lastlog2_la_LDFLAGS = $(SOLIB_LDFLAGS) -lpam -module -avoid-version -shared
if HAVE_VSCRIPT
pam_lastlog2_la_LDFLAGS +=
$(VSCRIPT_LDFLAGS),$(top_srcdir)/pam_lastlog2/src/pam_lastlog2.sym
endif
--
2.50.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox