Util-Linux package development
 help / color / mirror / Atom feed
* Re: [PATCH 1/7] unshare: make the wording of a message identical to that of three others
From: Benno Schulenberg @ 2025-04-29 13:55 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux
In-Reply-To: <qf3xkiasm5b5zliten36bjv4ynd4kdzj7nll5x3nq5jsasfegg@evnsrxot4x6j>


[-- Attachment #1.1.1: Type: text/plain, Size: 440 bytes --]


Op 29-04-2025 om 13:11 schreef Karel Zak:
> Created a pull request at
> https://github.com/util-linux/util-linux/pull/3550 to test the patches
> via CI. I hope I have applied the correct versions of the patches :)

The last patch ("docs,usage") probably needs the attached extra diff to
pass the tests.

(I'm surprised that the build system does not automatically make rules
for all the .adoc files in man-common.)


Benno


[-- Attachment #1.1.2: po4a-hyperlink.diff --]
[-- Type: text/x-patch, Size: 785 bytes --]

diff --git a/po-man/po4a.cfg b/po-man/po4a.cfg
index 25df538a3..959ddb8bf 100644
--- a/po-man/po4a.cfg
+++ b/po-man/po4a.cfg
@@ -7,6 +7,7 @@
 [type:asciidoc] ../man-common/footer-lib.adoc    $lang:$lang/man-common/footer-lib.adoc    opt:"--keep 0"
 [type:asciidoc] ../man-common/footer.adoc        $lang:$lang/man-common/footer.adoc        opt:"--keep 0"
 [type:asciidoc] ../man-common/help-version.adoc  $lang:$lang/man-common/help-version.adoc  opt:"--keep 0"
+[type:asciidoc] ../man-common/hyperlink.adoc     $lang:$lang/man-common/hyperlink.adoc     opt:"--keep 0"
 [type:asciidoc] ../man-common/in-bytes.adoc      $lang:$lang/man-common/in-bytes.adoc      opt:"--keep 0"
 [type:asciidoc] ../man-common/translation.adoc   $lang:$lang/man-common/translation.adoc   opt:"--keep 0"
 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply related

* Re: [PATCH 1/7] unshare: make the wording of a message identical to that of three others
From: Karel Zak @ 2025-04-29 11:11 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux
In-Reply-To: <20250424093237.6432-1-bensberg@telfort.nl>


Created a pull request at
https://github.com/util-linux/util-linux/pull/3550 to test the patches
via CI. I hope I have applied the correct versions of the patches :)

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* [PATCH 4/7 V3] docs,usage: harmonize description of --hyperlink, and add 2 missing ones
From: Benno Schulenberg @ 2025-04-26  9:30 UTC (permalink / raw)
  To: util-linux

Harmonize the description by placing the option in a separate file.

Also, use _when_/<when> (instead of _mode_/<mode>) as the optional
argument, since the possible values are: "always", "never", "auto".

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 lsfd-cmd/lsfd.1.adoc      | 3 +--
 lsfd-cmd/lsfd.c           | 2 +-
 man-common/Makemodule.am  | 1 +
 man-common/hyperlink.adoc | 5 +++++
 man-common/meson.build    | 1 +
 misc-utils/findmnt.8.adoc | 6 +-----
 misc-utils/findmnt.c      | 2 ++
 misc-utils/lsblk.8.adoc   | 3 +--
 misc-utils/lsblk.c        | 2 ++
 9 files changed, 15 insertions(+), 10 deletions(-)
 create mode 100644 man-common/hyperlink.adoc

diff --git a/lsfd-cmd/lsfd.1.adoc b/lsfd-cmd/lsfd.1.adoc
index 2654e8eaf..9c4b8a0b5 100644
--- a/lsfd-cmd/lsfd.1.adoc
+++ b/lsfd-cmd/lsfd.1.adoc
@@ -109,8 +109,7 @@ only for *lsfd* developers.
 *--dump-counters*::
 Dump the definition of counters used in *--summary* output.
 
-*--hyperlink*[=_mode_]::
-Print paths as terminal hyperlinks. The _mode_ can be set to "always", "never", or "auto". The optional argument _when_ can be set to "auto", "never", or "always". If the _when_ argument is omitted, it will default to "auto". The "auto" setting means that hyperlinks will only be used if the output is on a terminal.
+include::man-common/hyperlink.adoc[]
 
 *-H*, *--list-columns*::
 List the columns that can be specified with the *--output* option.
diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c
index 9e9cb52ac..d05a09396 100644
--- a/lsfd-cmd/lsfd.c
+++ b/lsfd-cmd/lsfd.c
@@ -2196,7 +2196,7 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_("     --debug-filter           dump the internal data structure of filter and exit\n"), out);
 	fputs(_(" -C, --counter <name>:<expr>  define custom counter for --summary output\n"), out);
 	fputs(_("     --dump-counters          dump counter definitions\n"), out);
-	fputs(_("     --hyperlink[=<when>]     print paths as terminal hyperlinks (always|never|auto)\n"), out);
+	fputs(_("     --hyperlink[=<when>]     print paths as hyperlinks (always|never|auto)\n"), out);
 	fputs(_("     --summary[=<mode>]       print summary information (append|only|never)\n"), out);
 	fputs(_("     --_drop-privilege        (testing purpose) do setuid(1) just after starting\n"), out);
 
diff --git a/man-common/Makemodule.am b/man-common/Makemodule.am
index c999ee7cf..11acb73de 100644
--- a/man-common/Makemodule.am
+++ b/man-common/Makemodule.am
@@ -5,6 +5,7 @@ ADOCFILES_COMMON += \
 	      man-common/footer-config.adoc \
 	      man-common/footer-lib.adoc \
 	      man-common/help-version.adoc \
+	      man-common/hyperlink.adoc \
 	      man-common/in-bytes.adoc \
 	      man-common/manpage-stub.adoc \
 	      man-common/translation.adoc
diff --git a/man-common/hyperlink.adoc b/man-common/hyperlink.adoc
new file mode 100644
index 000000000..dc067490d
--- /dev/null
+++ b/man-common/hyperlink.adoc
@@ -0,0 +1,5 @@
+*--hyperlink*[**=**_when_]::
+Print paths as terminal hyperlinks. The optional _when_ argument can be
+*always*, *never*, or *auto*. If the argument is omitted, it defaults to
+*auto*, which means that hyperlinks will only be used when the output
+goes to a terminal.
diff --git a/man-common/meson.build b/man-common/meson.build
index 647f54c68..b9fc92730 100644
--- a/man-common/meson.build
+++ b/man-common/meson.build
@@ -5,6 +5,7 @@ man_common_adocs = files(
   'footer-config.adoc',
   'footer-lib.adoc',
   'help-version.adoc',
+  'hyperlink.adoc',
   'in-bytes.adoc',
   'manpage-stub.adoc',
   'translation.adoc',
diff --git a/misc-utils/findmnt.8.adoc b/misc-utils/findmnt.8.adoc
index a26fb8ca2..8c8ffa2cc 100644
--- a/misc-utils/findmnt.8.adoc
+++ b/misc-utils/findmnt.8.adoc
@@ -67,11 +67,7 @@ Print the first matching filesystem only.
 List the columns that can be specified with the *--output* option.
 Can be used with *--json* or *--raw* to get the list in a machine-readable format.
 
-*--hyperlink*[**=**_mode_]::
-Print mountpoint paths as terminal hyperlinks. The optional _mode_ argument
-can be *always*, *never*, or *auto*. If the argument is omitted, it defaults
-to *auto*, which means that hyperlinks will only be used when the output goes
-to a terminal.
+include::man-common/hyperlink.adoc[]
 
 *-I*, *--dfi*::
 Imitate the output of *df*(1) with its *-i* option. This option is equivalent to *-o SOURCE,FSTYPE,INO.TOTAL,INO.USED,INO.AVAIL,INO.USE%,TARGET* but excludes all pseudo filesystems. Use *--all* to print all filesystems.
diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c
index 2682de1d7..130ac1b13 100644
--- a/misc-utils/findmnt.c
+++ b/misc-utils/findmnt.c
@@ -1568,6 +1568,8 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -D, --df               imitate the output of df(1)\n"), out);
 	fputs(_(" -e, --evaluate         convert tags (LABEL,UUID,PARTUUID,PARTLABEL) \n"
 	        "                          to device names\n"), out);
+	fputs(_("     --hyperlink[=<when>]\n"
+		"                        print paths as hyperlinks (always|never|auto)\n"), out);
 	fputs(_(" -I, --dfi              imitate the output of df(1) with -i option\n"), out);
 	fputs(_(" -J, --json             use JSON output format\n"), out);
 	fputs(_(" -l, --list             use list format output\n"), out);
diff --git a/misc-utils/lsblk.8.adoc b/misc-utils/lsblk.8.adoc
index 8151525af..04efa276c 100644
--- a/misc-utils/lsblk.8.adoc
+++ b/misc-utils/lsblk.8.adoc
@@ -62,8 +62,7 @@ Exclude the devices specified by the comma-separated _list_ of major device numb
 *-f*, *--fs*::
 Output info about filesystems. This option is equivalent to *-o NAME,FSTYPE,FSVER,LABEL,UUID,FSAVAIL,FSUSE%,MOUNTPOINTS*. The authoritative information about filesystems and raids is provided by the *blkid*(8) command.
 
-*--hyperlink*[**=**_mode_]::
-Print mountpoint paths as terminal hyperlinks. The _mode_ can be set to "always", "never", or "auto". The optional argument _when_ can be set to "auto", "never", or "always". If the _when_ argument is omitted, it will default to "auto". The "auto" setting means that hyperlinks will only be used if the output is on a terminal.
+include::man-common/hyperlink.adoc[]
 
 *-I*, *--include* _list_::
 Include devices specified by the comma-separated _list_ of major device numbers. The filter is applied to the top-level devices only. This may be confusing for *--list* output format where hierarchy of the devices is not obvious.
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index 7daa7f58f..a65f5e4e6 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -2330,6 +2330,8 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -d, --nodeps         don't print slaves or holders\n"), out);
 	fputs(_(" -e, --exclude <list> exclude devices by major number (default: RAM disks)\n"), out);
 	fputs(_(" -f, --fs             output info about filesystems\n"), out);
+	fputs(_("     --hyperlink[=<when>]\n"
+		"                      print paths as hyperlinks (always|never|auto)\n"), out);
 	fputs(_(" -i, --ascii          use ascii characters only\n"), out);
 	fputs(_(" -l, --list           use list format output\n"), out);
 	fputs(_(" -m, --perms          output info about permissions\n"), out);
-- 
2.48.1


^ permalink raw reply related

* Re: [PATCH 4/7] docs,usage: harmonize description of --hyperlink, and add 2 missing ones
From: Karel Zak @ 2025-04-25 20:07 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux
In-Reply-To: <f8faf6a3-1da6-42f7-a231-29c47f56b888@telfort.nl>

On Fri, Apr 25, 2025 at 12:43:56PM +0200, Benno Schulenberg wrote:
> 
> Op 24-04-2025 om 12:08 schreef Karel Zak:
> > How about adding man-common/hyperlink and including it in the man pages?
> 
> Done.  Although there was a slight wording difference between `lsfd` on
> the one hand, and `findmnt` and `lsblk` on the other hand: the first said
> just "paths" instead of "mountpoint paths".  Probably the word "mountpoint"
> can be dropped to make the description fit for all three?

I think using "paths" for everything is sufficient.

    Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Re: [PATCH 4/7] docs,usage: harmonize description of --hyperlink, and add 2 missing ones
From: Benno Schulenberg @ 2025-04-25 10:43 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux
In-Reply-To: <6sucmcn7scrug4shj2lebkrfdz3yyayoj37b3akusib6mxtyjw@kapl5f3xlvzq>


[-- Attachment #1.1: Type: text/plain, Size: 420 bytes --]


Op 24-04-2025 om 12:08 schreef Karel Zak:
> How about adding man-common/hyperlink and including it in the man pages?

Done.  Although there was a slight wording difference between `lsfd` on
the one hand, and `findmnt` and `lsblk` on the other hand: the first said
just "paths" instead of "mountpoint paths".  Probably the word "mountpoint"
can be dropped to make the description fit for all three?


Benno


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply

* Re: [PATCH 3/7] lsfd: improve grammar, and use angular brackets around placeholder word
From: Benno Schulenberg @ 2025-04-25 10:36 UTC (permalink / raw)
  To: Karel Zak, Masatake YAMATO; +Cc: util-linux
In-Reply-To: <3vy4ysebkufi3zpcv2s66nnzghsf7nu4fthkmzotj6ctxawnd5@ottmham4b2lu>


[-- Attachment #1.1: Type: text/plain, Size: 482 bytes --]


Op 24-04-2025 om 12:05 schreef Karel Zak:
> It would be better to not announce that space is possible to use as
> separator, and use comma in the help and man page

Agreed.  Revised patch has been sent.

>    fputs(_(" -p, --pid <list>           restrict to specified processes (command separated pids)\nn"), out);

This is too long (more than 80 characters wide) and gives unneeded details
-- from other options people will already know what <list> means.


Benno


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply

* [PATCH 6/7 V2] pipesz: report default size in --help, instead of referring the user
From: Benno Schulenberg @ 2025-04-25 10:34 UTC (permalink / raw)
  To: util-linux; +Cc: Nathan Sharp

The man page says where this default size can be found.  In the --help
text it is more useful to directly say what this default size is.

CC: Nathan Sharp <nwsharp@live.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 misc-utils/pipesz.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/misc-utils/pipesz.c b/misc-utils/pipesz.c
index 48f07aed7..6eb5cc001 100644
--- a/misc-utils/pipesz.c
+++ b/misc-utils/pipesz.c
@@ -61,6 +61,9 @@ static char opt_verbose = 0;	/* --verbose */
 
 static void __attribute__((__noreturn__)) usage(void)
 {
+	if (ul_path_read_s32(NULL, &opt_size, PIPESZ_DEFAULT_SIZE_FILE))
+		warn(_("cannot parse %s"), PIPESZ_DEFAULT_SIZE_FILE);
+
 	fputs(USAGE_HEADER, stdout);
 	fprintf(stdout, _(" %s [options] [--set <size>] [--] [command]\n"), program_invocation_short_name);
 	fprintf(stdout, _(" %s [options] --get\n"), program_invocation_short_name);
@@ -71,11 +74,8 @@ static void __attribute__((__noreturn__)) usage(void)
 
 	fputs(USAGE_OPTIONS, stdout);
 	fputsln(_(" -g, --get          examine pipe buffers"), stdout);
-	/* TRANSLATORS: '%s' refers to a system file */
 	fprintf(stdout,
-	     _(" -s, --set <size>   set pipe buffer sizes\n"
-	       "                      size defaults to %s\n"),
-		PIPESZ_DEFAULT_SIZE_FILE);
+		_(" -s, --set <size>   the buffer size to be used (default: %u)\n"), opt_size);
 
 	fputs(USAGE_SEPARATOR, stdout);
 	fputsln(_(" -f, --file <path>  act on a file"), stdout);
-- 
2.48.1


^ permalink raw reply related

* [PATCH 3/7 V2] lsfd: improve grammar, and use angular brackets around placeholder word
From: Benno Schulenberg @ 2025-04-25 10:32 UTC (permalink / raw)
  To: util-linux

Also, use <list> (the standard way to indicate multiple arguments) as
argument of --pid,  and don't use "<when>" when the possible arguments
differ from "always", "never", "auto".

In addition, improve some wording and markup in the man page.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 lsfd-cmd/lsfd.1.adoc | 33 ++++++++++++++++-----------------
 lsfd-cmd/lsfd.c      |  6 +++---
 2 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/lsfd-cmd/lsfd.1.adoc b/lsfd-cmd/lsfd.1.adoc
index b0ba2ba53..2654e8eaf 100644
--- a/lsfd-cmd/lsfd.1.adoc
+++ b/lsfd-cmd/lsfd.1.adoc
@@ -60,22 +60,22 @@ Use raw output format.
 *--notruncate*::
 Don't truncate text in columns.
 
-*-p*, *--pid* _pids_::
-Collect information only for specified processes.
-_pids_ is a list of pids. A comma or whitespaces can be used as separators.
-You can use this option with *pidof*(1). See *FILTER EXAMPLES*.
-+
-Both *-Q* option with an expression including PID, e.g. -Q (PID == 1),
-and *-p* option, e.g. -p 1, may print the same output but using *-p*
-option is much more efficient because *-p* option works at a much earlier
-stage of processing than the *-Q* option.
+*-p*, *--pid* _list_::
+Collect information only for the specified processes.
+The _list_ is a comma-separated list of PIDs.
+See also *FILTER EXAMPLES*.
 
-*-i*[4|6], *--inet*[=4|=6]::
+*-i*[*4*|*6*], *--inet*[**=4**|**=6**]::
 List only IPv4 sockets and/or IPv6 sockets.
 
-*-Q*, *--filter* _expr_::
-Print only the files matching the condition represented by the _expr_.
+*-Q*, *--filter* _expression_::
+Print only the files matching the condition represented by the _expression_.
 See also *scols-filter*(5) and *FILTER EXAMPLES*.
++
+The *-Q* option with a PID (for example: *-Q PID==1*) and the *-p*
+option (for example: *-p 1*) can be used to achieve the same result,
+but using the *-p* option is much more efficient because it works at
+a much earlier stage of processing than the *-Q* option.
 
 *-C*, *--counter* __label__:__filter_expr__::
 Define a custom counter used in *--summary* output. *lsfd* makes a
@@ -85,14 +85,13 @@ counter named _label_. *lsfd* applies filters defined with *--filter*
 options before counting; files excluded by the filters are not counted.
 +
 See *scols-filter*(5) about _filter_expr_.
-_label_ should not include `{` nor `:`. You can define multiple
+_label_ should not include *{* nor *:*. You can define multiple
 counters by specifying this option multiple times.
-+
 See also *COUNTER EXAMPLES*.
 
-*--summary*[**=**__when__]::
-This option controls summary lines output. The optional argument _when_
-can be *only*, *append* or *never*. If the _when_ argument is omitted,
+*--summary*[**=**_mode_]::
+This option controls summary lines output. The optional argument _mode_
+can be *only*, *append*, or *never*. If the _mode_ argument is omitted,
 it defaults to *only*.
 +
 The summary reports counters. A counter consists of a label and an
diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c
index 2eb53935c..9e9cb52ac 100644
--- a/lsfd-cmd/lsfd.c
+++ b/lsfd-cmd/lsfd.c
@@ -2190,14 +2190,14 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -o, --output <list>          output columns (see --list-columns)\n"), out);
 	fputs(_(" -r, --raw                    use raw output format\n"), out);
 	fputs(_(" -u, --notruncate             don't truncate text in columns\n"), out);
-	fputs(_(" -p, --pid  <pid(s)>          collect information only specified processes\n"), out);
+	fputs(_(" -p, --pid <list>             collect information only for specified processes\n"), out);
 	fputs(_(" -i[4|6], --inet[=4|=6]       list only IPv4 and/or IPv6 sockets\n"), out);
 	fputs(_(" -Q, --filter <expr>          apply display filter\n"), out);
 	fputs(_("     --debug-filter           dump the internal data structure of filter and exit\n"), out);
 	fputs(_(" -C, --counter <name>:<expr>  define custom counter for --summary output\n"), out);
 	fputs(_("     --dump-counters          dump counter definitions\n"), out);
-	fputs(_("     --hyperlink[=mode]       print paths as terminal hyperlinks (always, never, or auto)\n"), out);
-	fputs(_("     --summary[=<when>]       print summary information (only, append, or never)\n"), out);
+	fputs(_("     --hyperlink[=<when>]     print paths as terminal hyperlinks (always|never|auto)\n"), out);
+	fputs(_("     --summary[=<mode>]       print summary information (append|only|never)\n"), out);
 	fputs(_("     --_drop-privilege        (testing purpose) do setuid(1) just after starting\n"), out);
 
 	fputs(USAGE_SEPARATOR, out);
-- 
2.48.1


^ permalink raw reply related

* [PATCH 4/7 V2] docs,usage: harmonize description of --hyperlink, and add 2 missing ones
From: Benno Schulenberg @ 2025-04-25 10:32 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20250425103209.11876-1-bensberg@telfort.nl>

Harmonize the description by placing the option in a separate file.

Also, use _when_/<when> (instead of _mode_/<mode>) as the optional
argument, since the possible values are: "always", "never", "auto".

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 lsfd-cmd/lsfd.1.adoc      | 3 +--
 lsfd-cmd/lsfd.c           | 2 +-
 man-common/hyperlink.adoc | 5 +++++
 man-common/meson.build    | 1 +
 misc-utils/findmnt.8.adoc | 6 +-----
 misc-utils/findmnt.c      | 2 ++
 misc-utils/lsblk.8.adoc   | 3 +--
 misc-utils/lsblk.c        | 2 ++
 8 files changed, 14 insertions(+), 10 deletions(-)
 create mode 100644 man-common/hyperlink.adoc

diff --git a/lsfd-cmd/lsfd.1.adoc b/lsfd-cmd/lsfd.1.adoc
index 2654e8eaf..9c4b8a0b5 100644
--- a/lsfd-cmd/lsfd.1.adoc
+++ b/lsfd-cmd/lsfd.1.adoc
@@ -109,8 +109,7 @@ only for *lsfd* developers.
 *--dump-counters*::
 Dump the definition of counters used in *--summary* output.
 
-*--hyperlink*[=_mode_]::
-Print paths as terminal hyperlinks. The _mode_ can be set to "always", "never", or "auto". The optional argument _when_ can be set to "auto", "never", or "always". If the _when_ argument is omitted, it will default to "auto". The "auto" setting means that hyperlinks will only be used if the output is on a terminal.
+include::man-common/hyperlink.adoc[]
 
 *-H*, *--list-columns*::
 List the columns that can be specified with the *--output* option.
diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c
index 9e9cb52ac..d05a09396 100644
--- a/lsfd-cmd/lsfd.c
+++ b/lsfd-cmd/lsfd.c
@@ -2196,7 +2196,7 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_("     --debug-filter           dump the internal data structure of filter and exit\n"), out);
 	fputs(_(" -C, --counter <name>:<expr>  define custom counter for --summary output\n"), out);
 	fputs(_("     --dump-counters          dump counter definitions\n"), out);
-	fputs(_("     --hyperlink[=<when>]     print paths as terminal hyperlinks (always|never|auto)\n"), out);
+	fputs(_("     --hyperlink[=<when>]     print paths as hyperlinks (always|never|auto)\n"), out);
 	fputs(_("     --summary[=<mode>]       print summary information (append|only|never)\n"), out);
 	fputs(_("     --_drop-privilege        (testing purpose) do setuid(1) just after starting\n"), out);
 
diff --git a/man-common/hyperlink.adoc b/man-common/hyperlink.adoc
new file mode 100644
index 000000000..476c4b2f3
--- /dev/null
+++ b/man-common/hyperlink.adoc
@@ -0,0 +1,5 @@
+*--hyperlink*[**=**_when_]::
+Print mountpoint paths as terminal hyperlinks. The optional _when_ argument
+can be *always*, *never*, or *auto*. If the argument is omitted, it defaults
+to *auto*, which means that hyperlinks will only be used when the output goes
+to a terminal.
diff --git a/man-common/meson.build b/man-common/meson.build
index 647f54c68..b9fc92730 100644
--- a/man-common/meson.build
+++ b/man-common/meson.build
@@ -5,6 +5,7 @@ man_common_adocs = files(
   'footer-config.adoc',
   'footer-lib.adoc',
   'help-version.adoc',
+  'hyperlink.adoc',
   'in-bytes.adoc',
   'manpage-stub.adoc',
   'translation.adoc',
diff --git a/misc-utils/findmnt.8.adoc b/misc-utils/findmnt.8.adoc
index a26fb8ca2..8c8ffa2cc 100644
--- a/misc-utils/findmnt.8.adoc
+++ b/misc-utils/findmnt.8.adoc
@@ -67,11 +67,7 @@ Print the first matching filesystem only.
 List the columns that can be specified with the *--output* option.
 Can be used with *--json* or *--raw* to get the list in a machine-readable format.
 
-*--hyperlink*[**=**_mode_]::
-Print mountpoint paths as terminal hyperlinks. The optional _mode_ argument
-can be *always*, *never*, or *auto*. If the argument is omitted, it defaults
-to *auto*, which means that hyperlinks will only be used when the output goes
-to a terminal.
+include::man-common/hyperlink.adoc[]
 
 *-I*, *--dfi*::
 Imitate the output of *df*(1) with its *-i* option. This option is equivalent to *-o SOURCE,FSTYPE,INO.TOTAL,INO.USED,INO.AVAIL,INO.USE%,TARGET* but excludes all pseudo filesystems. Use *--all* to print all filesystems.
diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c
index 2682de1d7..130ac1b13 100644
--- a/misc-utils/findmnt.c
+++ b/misc-utils/findmnt.c
@@ -1568,6 +1568,8 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -D, --df               imitate the output of df(1)\n"), out);
 	fputs(_(" -e, --evaluate         convert tags (LABEL,UUID,PARTUUID,PARTLABEL) \n"
 	        "                          to device names\n"), out);
+	fputs(_("     --hyperlink[=<when>]\n"
+		"                        print paths as hyperlinks (always|never|auto)\n"), out);
 	fputs(_(" -I, --dfi              imitate the output of df(1) with -i option\n"), out);
 	fputs(_(" -J, --json             use JSON output format\n"), out);
 	fputs(_(" -l, --list             use list format output\n"), out);
diff --git a/misc-utils/lsblk.8.adoc b/misc-utils/lsblk.8.adoc
index 8151525af..04efa276c 100644
--- a/misc-utils/lsblk.8.adoc
+++ b/misc-utils/lsblk.8.adoc
@@ -62,8 +62,7 @@ Exclude the devices specified by the comma-separated _list_ of major device numb
 *-f*, *--fs*::
 Output info about filesystems. This option is equivalent to *-o NAME,FSTYPE,FSVER,LABEL,UUID,FSAVAIL,FSUSE%,MOUNTPOINTS*. The authoritative information about filesystems and raids is provided by the *blkid*(8) command.
 
-*--hyperlink*[**=**_mode_]::
-Print mountpoint paths as terminal hyperlinks. The _mode_ can be set to "always", "never", or "auto". The optional argument _when_ can be set to "auto", "never", or "always". If the _when_ argument is omitted, it will default to "auto". The "auto" setting means that hyperlinks will only be used if the output is on a terminal.
+include::man-common/hyperlink.adoc[]
 
 *-I*, *--include* _list_::
 Include devices specified by the comma-separated _list_ of major device numbers. The filter is applied to the top-level devices only. This may be confusing for *--list* output format where hierarchy of the devices is not obvious.
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index 7daa7f58f..a65f5e4e6 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -2330,6 +2330,8 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -d, --nodeps         don't print slaves or holders\n"), out);
 	fputs(_(" -e, --exclude <list> exclude devices by major number (default: RAM disks)\n"), out);
 	fputs(_(" -f, --fs             output info about filesystems\n"), out);
+	fputs(_("     --hyperlink[=<when>]\n"
+		"                      print paths as hyperlinks (always|never|auto)\n"), out);
 	fputs(_(" -i, --ascii          use ascii characters only\n"), out);
 	fputs(_(" -l, --list           use list format output\n"), out);
 	fputs(_(" -m, --perms          output info about permissions\n"), out);
-- 
2.48.1


^ permalink raw reply related

* Re: [PATCH 6/7] pipesz: report default size in --help, instead of referring the user
From: Benno Schulenberg @ 2025-04-24 13:15 UTC (permalink / raw)
  To: util-linux@vger.kernel.org; +Cc: Nathan Sharp
In-Reply-To: <MN0P221MB1530A6F07A44AF169879CBA7C2852@MN0P221MB1530.NAMP221.PROD.OUTLOOK.COM>


[-- Attachment #1.1: Type: text/plain, Size: 1213 bytes --]


Op 24-04-2025 om 13:24 schreef Nathan Sharp:
>      If it is to be done at all, it MUST be done inside the usage() function; 
> so that it is unlikely that future changes will introduce a read of an 
> uninitialized global variable.

Which variable would be uninitialized?  Global variable 'opt_size' gets
initialized to -1 in the beginning.  But okay, moving the two lines
before the call of usage() to the start of usage() itself is fine.

>      However, I do not think this is a good idea in isolation, as it deprives 
> the user of the knowledge of where the default size comes from,

Not at all: where the value comes from is mentioned in the man page.
The usage text is not meant to include _all_ details about the program
-- that is what the man page is for.  And, unlike the man page, the
usage text _can_ include the actual value of the thing.  And if it can,
it should, in my opinion, as the value itself is much more useful than
saying "go look there".

> and additionally could cause the help message to print a warning!

That is actually better than referring to a file that happens to be
unreadable/unparsable, because then the help text would be lying.


Benno


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply

* Re: [PATCH 6/7] pipesz: report default size in --help, instead of referring the user
From: Nathan Sharp @ 2025-04-24 11:28 UTC (permalink / raw)
  To: Benno Schulenberg, util-linux@vger.kernel.org
In-Reply-To: <20250424093237.6432-6-bensberg@telfort.nl>

Hello Benno Schulenberg,

    I do not think that this change is a good idea, especially in this location. If it is to be done at all, it MUST be done inside the usage() function; so that it is unlikely that future changes will introduce a read of an uninitialized global variable.
 
    However, I do not think this is a good idea in isolation, as it deprives the user of the knowledge of where the default size comes from, and additionally could cause the help message to print a warning! A path forwards that I would support is to keep the existing text but include the value read from the file as a parenthetical, if and only if the parse was successful.

    Kind regards,
        Nathan Sharp
        Principal Consultant
        Scherpzinnige Oplossingen, B.V.

________________________________________
From: Benno Schulenberg <bensberg@telfort.nl>
Sent: Thursday, April 24, 2025 11:32 AM
To: util-linux@vger.kernel.org <util-linux@vger.kernel.org>
Cc: Nathan Sharp <nwsharp@live.com>
Subject: [PATCH 6/7] pipesz: report default size in --help, instead of referring the user
 
The man page says where this default size can be found.  In the --help
text it is more useful to directly say what this default size is.

CC: Nathan Sharp <nwsharp@live.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 misc-utils/pipesz.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/misc-utils/pipesz.c b/misc-utils/pipesz.c
index 48f07aed7..c317959e4 100644
--- a/misc-utils/pipesz.c
+++ b/misc-utils/pipesz.c
@@ -71,11 +71,8 @@ static void __attribute__((__noreturn__)) usage(void)
 
         fputs(USAGE_OPTIONS, stdout);
         fputsln(_(" -g, --get          examine pipe buffers"), stdout);
-       /* TRANSLATORS: '%s' refers to a system file */
         fprintf(stdout,
-            _(" -s, --set <size>   set pipe buffer sizes\n"
-              "                      size defaults to %s\n"),
-               PIPESZ_DEFAULT_SIZE_FILE);
+               _(" -s, --set <size>   the buffer size to be used (default: %u)\n"), opt_size);
 
         fputs(USAGE_SEPARATOR, stdout);
         fputsln(_(" -f, --file <path>  act on a file"), stdout);
@@ -232,6 +229,8 @@ int main(int argc, char **argv)
         while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
                 switch (c) {
                 case 'h':
+                       if (ul_path_read_s32(NULL, &opt_size, PIPESZ_DEFAULT_SIZE_FILE))
+                               warn(_("cannot parse %s"), PIPESZ_DEFAULT_SIZE_FILE);
                         usage();
                 case 'V':
                         print_version(EXIT_SUCCESS);
--
2.48.1

^ permalink raw reply related

* Re: [PATCH 4/7] docs,usage: harmonize description of --hyperlink, and add 2 missing ones
From: Karel Zak @ 2025-04-24 10:08 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux
In-Reply-To: <20250424093237.6432-4-bensberg@telfort.nl>

On Thu, Apr 24, 2025 at 11:32:34AM +0200, Benno Schulenberg wrote:
> -*--hyperlink*[=_mode_]::
> -Print paths as terminal hyperlinks. The _mode_ can be set to "always", "never", or "auto". The optional argument _when_ can be set to "auto", "never", or "always". If the _when_ argument is omitted, it will default to "auto". The "auto" setting means that hyperlinks will only be used if the output is on a terminal.
> +*--hyperlink*[**=**_when_]::
> +Print paths as terminal hyperlinks. The optional _when_ argument can be
> +*always*, *never*, or *auto*. If the argument is omitted, it defaults to *auto*,
> +which means that hyperlinks will only be used when the output goes to a terminal.

How about adding man-common/hyperlink and including it in the man pages?

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Re: [PATCH 3/7] lsfd: improve grammar, and use angular brackets around placeholder word
From: Karel Zak @ 2025-04-24 10:05 UTC (permalink / raw)
  To: Masatake YAMATO; +Cc: bensberg, util-linux
In-Reply-To: <20250424.185505.855258258029883426.yamato@redhat.com>

On Thu, Apr 24, 2025 at 06:55:05PM +0900, Masatake YAMATO wrote:
> > Also, use dots instead of "(s)" to indicate possible multiple arguments,
> > and don't use "<when>" when the possible arguments differ from "always",
> > "never", "auto".
> > 
> > Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
> > ---
> >  lsfd-cmd/lsfd.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c
> > index 2eb53935c..3610de8dd 100644
> > --- a/lsfd-cmd/lsfd.c
> > +++ b/lsfd-cmd/lsfd.c
> > @@ -2190,14 +2190,14 @@ static void __attribute__((__noreturn__)) usage(void)
> >  	fputs(_(" -o, --output <list>          output columns (see --list-columns)\n"), out);
> >  	fputs(_(" -r, --raw                    use raw output format\n"), out);
> >  	fputs(_(" -u, --notruncate             don't truncate text in columns\n"), out);
> > -	fputs(_(" -p, --pid  <pid(s)>          collect information only specified processes\n"), out);
> > +	fputs(_(" -p, --pid <pid>...           collect information only for specified processes\n"), out);
> 
> This change implies that --pid 1 2 3 works.
> However, specifying multiple pids to one --pid doesn't work.
> 
>    # lsfd --pid 1 $$
>    Try 'lsfd --help' for more information.
> 
> Only --pid "1 2 3"  or works. See double-quote chars.
> 
>    # lsfd --pid "1 $$"

It also supports comma, it means --pid 1,2,3

It would be better to not announce that space is possible to use as
separator, and use comma in the help and man page

  fputs(_(" -p, --pid <list>           restrict to specified processes (command separated pids)\nn"), out);

or so ...

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Re: [PATCH 01/10] bits: (man) normalize the markup and improve some layout
From: Karel Zak @ 2025-04-24  9:57 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux, Robin Jarry
In-Reply-To: <20250417094825.20870-1-bensberg@telfort.nl>

On Thu, Apr 17, 2025 at 11:48:15AM +0200, Benno Schulenberg wrote:
>  text-utils/bits.1.adoc | 80 ++++++++++++++++++++++--------------------
>  1 file changed, 42 insertions(+), 38 deletions(-)

Applied (all 10 patches), thanks.


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Re: [PATCH 3/7] lsfd: improve grammar, and use angular brackets around placeholder word
From: Masatake YAMATO @ 2025-04-24  9:55 UTC (permalink / raw)
  To: bensberg; +Cc: util-linux
In-Reply-To: <20250424093237.6432-3-bensberg@telfort.nl>

> Also, use dots instead of "(s)" to indicate possible multiple arguments,
> and don't use "<when>" when the possible arguments differ from "always",
> "never", "auto".
> 
> Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
> ---
>  lsfd-cmd/lsfd.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c
> index 2eb53935c..3610de8dd 100644
> --- a/lsfd-cmd/lsfd.c
> +++ b/lsfd-cmd/lsfd.c
> @@ -2190,14 +2190,14 @@ static void __attribute__((__noreturn__)) usage(void)
>  	fputs(_(" -o, --output <list>          output columns (see --list-columns)\n"), out);
>  	fputs(_(" -r, --raw                    use raw output format\n"), out);
>  	fputs(_(" -u, --notruncate             don't truncate text in columns\n"), out);
> -	fputs(_(" -p, --pid  <pid(s)>          collect information only specified processes\n"), out);
> +	fputs(_(" -p, --pid <pid>...           collect information only for specified processes\n"), out);

This change implies that --pid 1 2 3 works.
However, specifying multiple pids to one --pid doesn't work.

   # lsfd --pid 1 $$
   Try 'lsfd --help' for more information.

Only --pid "1 2 3"  or works. See double-quote chars.

   # lsfd --pid "1 $$"

Maybe a correct fix is rename --pid to --pids.

Masatake YAMATO

>  	fputs(_(" -i[4|6], --inet[=4|=6]       list only IPv4 and/or IPv6 sockets\n"), out);
>  	fputs(_(" -Q, --filter <expr>          apply display filter\n"), out);
>  	fputs(_("     --debug-filter           dump the internal data structure of filter and exit\n"), out);
>  	fputs(_(" -C, --counter <name>:<expr>  define custom counter for --summary output\n"), out);
>  	fputs(_("     --dump-counters          dump counter definitions\n"), out);
> -	fputs(_("     --hyperlink[=mode]       print paths as terminal hyperlinks (always, never, or auto)\n"), out);
> -	fputs(_("     --summary[=<when>]       print summary information (only, append, or never)\n"), out);
> +	fputs(_("     --hyperlink[=<when>]     print paths as terminal hyperlinks (always|never|auto)\n"), out);
> +	fputs(_("     --summary[=<mode>]       print summary information (append|only|never)\n"), out);
>  	fputs(_("     --_drop-privilege        (testing purpose) do setuid(1) just after starting\n"), out);
>  
>  	fputs(USAGE_SEPARATOR, out);
> -- 
> 2.48.1
> 
> 


^ permalink raw reply

* [PATCH 4/7] docs,usage: harmonize description of --hyperlink, and add 2 missing ones
From: Benno Schulenberg @ 2025-04-24  9:32 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20250424093237.6432-1-bensberg@telfort.nl>

Also, consistently use _when_/<when> as the optional argument,
since the possible values are: "always", "never", "auto".

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 lsfd-cmd/lsfd.1.adoc      | 6 ++++--
 lsfd-cmd/lsfd.c           | 2 +-
 misc-utils/findmnt.8.adoc | 9 ++++-----
 misc-utils/findmnt.c      | 2 ++
 misc-utils/lsblk.8.adoc   | 6 ++++--
 misc-utils/lsblk.c        | 2 ++
 6 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/lsfd-cmd/lsfd.1.adoc b/lsfd-cmd/lsfd.1.adoc
index b0ba2ba53..db228a09e 100644
--- a/lsfd-cmd/lsfd.1.adoc
+++ b/lsfd-cmd/lsfd.1.adoc
@@ -110,8 +110,10 @@ only for *lsfd* developers.
 *--dump-counters*::
 Dump the definition of counters used in *--summary* output.
 
-*--hyperlink*[=_mode_]::
-Print paths as terminal hyperlinks. The _mode_ can be set to "always", "never", or "auto". The optional argument _when_ can be set to "auto", "never", or "always". If the _when_ argument is omitted, it will default to "auto". The "auto" setting means that hyperlinks will only be used if the output is on a terminal.
+*--hyperlink*[**=**_when_]::
+Print paths as terminal hyperlinks. The optional _when_ argument can be
+*always*, *never*, or *auto*. If the argument is omitted, it defaults to *auto*,
+which means that hyperlinks will only be used when the output goes to a terminal.
 
 *-H*, *--list-columns*::
 List the columns that can be specified with the *--output* option.
diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c
index 3610de8dd..847a0ac8a 100644
--- a/lsfd-cmd/lsfd.c
+++ b/lsfd-cmd/lsfd.c
@@ -2196,7 +2196,7 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_("     --debug-filter           dump the internal data structure of filter and exit\n"), out);
 	fputs(_(" -C, --counter <name>:<expr>  define custom counter for --summary output\n"), out);
 	fputs(_("     --dump-counters          dump counter definitions\n"), out);
-	fputs(_("     --hyperlink[=<when>]     print paths as terminal hyperlinks (always|never|auto)\n"), out);
+	fputs(_("     --hyperlink[=<when>]     print paths as hyperlinks (always|never|auto)\n"), out);
 	fputs(_("     --summary[=<mode>]       print summary information (append|only|never)\n"), out);
 	fputs(_("     --_drop-privilege        (testing purpose) do setuid(1) just after starting\n"), out);
 
diff --git a/misc-utils/findmnt.8.adoc b/misc-utils/findmnt.8.adoc
index a26fb8ca2..025a311e9 100644
--- a/misc-utils/findmnt.8.adoc
+++ b/misc-utils/findmnt.8.adoc
@@ -67,11 +67,10 @@ Print the first matching filesystem only.
 List the columns that can be specified with the *--output* option.
 Can be used with *--json* or *--raw* to get the list in a machine-readable format.
 
-*--hyperlink*[**=**_mode_]::
-Print mountpoint paths as terminal hyperlinks. The optional _mode_ argument
-can be *always*, *never*, or *auto*. If the argument is omitted, it defaults
-to *auto*, which means that hyperlinks will only be used when the output goes
-to a terminal.
+*--hyperlink*[**=**_when_]::
+Print mountpoint paths as terminal hyperlinks. The optional _when_ argument can be
+*always*, *never*, or *auto*. If the argument is omitted, it defaults to *auto*,
+which means that hyperlinks will only be used when the output goes to a terminal.
 
 *-I*, *--dfi*::
 Imitate the output of *df*(1) with its *-i* option. This option is equivalent to *-o SOURCE,FSTYPE,INO.TOTAL,INO.USED,INO.AVAIL,INO.USE%,TARGET* but excludes all pseudo filesystems. Use *--all* to print all filesystems.
diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c
index 86258dfd3..862f00c63 100644
--- a/misc-utils/findmnt.c
+++ b/misc-utils/findmnt.c
@@ -1567,6 +1567,8 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -D, --df               imitate the output of df(1)\n"), out);
 	fputs(_(" -e, --evaluate         convert tags (LABEL,UUID,PARTUUID,PARTLABEL) \n"
 	        "                          to device names\n"), out);
+	fputs(_("     --hyperlink[=<when>]\n"
+		"                        print paths as hyperlinks (always|never|auto)\n"), out);
 	fputs(_(" -I, --dfi              imitate the output of df(1) with -i option\n"), out);
 	fputs(_(" -J, --json             use JSON output format\n"), out);
 	fputs(_(" -l, --list             use list format output\n"), out);
diff --git a/misc-utils/lsblk.8.adoc b/misc-utils/lsblk.8.adoc
index 8151525af..0e9734247 100644
--- a/misc-utils/lsblk.8.adoc
+++ b/misc-utils/lsblk.8.adoc
@@ -62,8 +62,10 @@ Exclude the devices specified by the comma-separated _list_ of major device numb
 *-f*, *--fs*::
 Output info about filesystems. This option is equivalent to *-o NAME,FSTYPE,FSVER,LABEL,UUID,FSAVAIL,FSUSE%,MOUNTPOINTS*. The authoritative information about filesystems and raids is provided by the *blkid*(8) command.
 
-*--hyperlink*[**=**_mode_]::
-Print mountpoint paths as terminal hyperlinks. The _mode_ can be set to "always", "never", or "auto". The optional argument _when_ can be set to "auto", "never", or "always". If the _when_ argument is omitted, it will default to "auto". The "auto" setting means that hyperlinks will only be used if the output is on a terminal.
+*--hyperlink*[**=**_when_]::
+Print mountpoint paths as terminal hyperlinks. The optional _when_ argument can be
+*always*, *never*, or *auto*. If the argument is omitted, it defaults to *auto*,
+which means that hyperlinks will only be used when the output goes to a terminal.
 
 *-I*, *--include* _list_::
 Include devices specified by the comma-separated _list_ of major device numbers. The filter is applied to the top-level devices only. This may be confusing for *--list* output format where hierarchy of the devices is not obvious.
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index 9f252d079..128217d62 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -2329,6 +2329,8 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -d, --nodeps         don't print slaves or holders\n"), out);
 	fputs(_(" -e, --exclude <list> exclude devices by major number (default: RAM disks)\n"), out);
 	fputs(_(" -f, --fs             output info about filesystems\n"), out);
+	fputs(_("     --hyperlink[=<when>]\n"
+		"                      print paths as hyperlinks (always|never|auto)\n"), out);
 	fputs(_(" -i, --ascii          use ascii characters only\n"), out);
 	fputs(_(" -l, --list           use list format output\n"), out);
 	fputs(_(" -m, --perms          output info about permissions\n"), out);
-- 
2.48.1


^ permalink raw reply related

* [PATCH 2/7] irqtop: make the wording of an error message identical to that of another
From: Benno Schulenberg @ 2025-04-24  9:32 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20250424093237.6432-1-bensberg@telfort.nl>

(Besides: the original looked like a statement, not like an error message.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 sys-utils/irqtop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-utils/irqtop.c b/sys-utils/irqtop.c
index 3dbd030e0..a42ece070 100644
--- a/sys-utils/irqtop.c
+++ b/sys-utils/irqtop.c
@@ -465,7 +465,7 @@ int main(int argc, char **argv)
 	if (!ctl.batch) {
 		is_tty = isatty(STDIN_FILENO);
 		if (is_tty && tcgetattr(STDIN_FILENO, &saved_tty) == -1)
-			fputs(_("terminal setting retrieval"), stdout);
+			fputs(_("failed to get terminal attributes"), stdout);
 
 		ctl.win = initscr();
 		get_terminal_dimension(&ctl.cols, &ctl.rows);
-- 
2.48.1


^ permalink raw reply related

* [PATCH 1/7] unshare: make the wording of a message identical to that of three others
From: Benno Schulenberg @ 2025-04-24  9:32 UTC (permalink / raw)
  To: util-linux

That is: spare translators having to translate different strings that
mean the exact same thing.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 sys-utils/unshare.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c
index 05db627be..fe140a0c7 100644
--- a/sys-utils/unshare.c
+++ b/sys-utils/unshare.c
@@ -1241,7 +1241,7 @@ int main(int argc, char *argv[])
 		newdir = newdir ?: "/";
 	}
 	if (newdir && chdir(newdir))
-		err(EXIT_FAILURE, _("cannot chdir to '%s'"), newdir);
+		err(EXIT_FAILURE, _("cannot change directory to %s"), newdir);
 
 	if (procmnt) {
 		/* When not changing root and using the default propagation flags
-- 
2.48.1


^ permalink raw reply related

* [PATCH 7/7] uuidd: put an option and its description in a single message
From: Benno Schulenberg @ 2025-04-24  9:32 UTC (permalink / raw)
  To: util-linux; +Cc: Michael Trapp
In-Reply-To: <20250424093237.6432-1-bensberg@telfort.nl>

Also, improve the markup and the wording in the man page.

CC: Michael Trapp <michael.trapp@sap.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 misc-utils/uuidd.8.adoc | 16 ++++++++++++----
 misc-utils/uuidd.c      |  4 ++--
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/misc-utils/uuidd.8.adoc b/misc-utils/uuidd.8.adoc
index f8001f986..f15d7b631 100644
--- a/misc-utils/uuidd.8.adoc
+++ b/misc-utils/uuidd.8.adoc
@@ -24,12 +24,20 @@ The *uuidd* daemon is used by the UUID library to generate universally unique id
 
 == OPTIONS
 
-*-C*, *--cont-clock*[**=**_time_]::
-Activate continuous clock handling for time based UUIDs. *uuidd* could use all possible clock values, beginning with the daemon's start time. The optional argument can be used to set a value for the max_clock_offset. This guarantees, that a clock value of a UUID will always be within the range of the max_clock_offset.
+*-C*, *--cont-clock*[**=**_number_[*hd*]]::
+Activate continuous clock handling for time-based UUIDs. *uuidd* could
+use all possible clock values, beginning with the daemon's start time.
+The optional argument can be used to set a value for 'max_clock_offset'.
+This guarantees that a clock value of a UUID will always be within the
+range of 'max_clock_offset'.
 +
-The option *-C* or *--cont-clock* enables the feature with a default max_clock_offset of 2 hours.
+The option *-C* or *--cont-clock* (without an argument) enables the
+feature with a default 'max_clock_offset' of 2 hours.
 +
-The option *-C<NUM>[hd]* or *--cont-clock=<NUM>[hd]* enables the feature with a max_clock_offset of NUM seconds. In case of an appended h or d, the NUM value is read in hours or days. The minimum value is 60 seconds, the maximum value is 365 days.
+The option **-C**_number_ or **--cont-clock=**_number_ enables the
+feature with a 'max_clock_offset' of _number_ seconds.
+In case of an appended *h* or *d*, _number_ is understood in hours or days.
+The minimum value is 60 seconds, the maximum value is 365 days.
 
 *-d*, *--debug*::
 Run *uuidd* in debugging mode. This prevents *uuidd* from running as a daemon.
diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c
index 961c3a5fa..74e950307 100644
--- a/misc-utils/uuidd.c
+++ b/misc-utils/uuidd.c
@@ -108,8 +108,8 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -P, --no-pid            do not create pid file\n"), out);
 	fputs(_(" -F, --no-fork           do not daemonize using double-fork\n"), out);
 	fputs(_(" -S, --socket-activation do not create listening socket\n"), out);
-	fputs(_(" -C, --cont-clock[=<NUM>[hd]]\n"), out);
-	fputs(_("                         activate continuous clock handling\n"), out);
+	fputs(_(" -C, --cont-clock[=<number>[hd]]\n"
+		"                         activate continuous clock handling\n"), out);
 	fputs(_(" -d, --debug             run in debugging mode\n"), out);
 	fputs(_(" -q, --quiet             turn on quiet mode\n"), out);
 	fputs(USAGE_SEPARATOR, out);
-- 
2.48.1


^ permalink raw reply related

* [PATCH 6/7] pipesz: report default size in --help, instead of referring the user
From: Benno Schulenberg @ 2025-04-24  9:32 UTC (permalink / raw)
  To: util-linux; +Cc: Nathan Sharp
In-Reply-To: <20250424093237.6432-1-bensberg@telfort.nl>

The man page says where this default size can be found.  In the --help
text it is more useful to directly say what this default size is.

CC: Nathan Sharp <nwsharp@live.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 misc-utils/pipesz.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/misc-utils/pipesz.c b/misc-utils/pipesz.c
index 48f07aed7..c317959e4 100644
--- a/misc-utils/pipesz.c
+++ b/misc-utils/pipesz.c
@@ -71,11 +71,8 @@ static void __attribute__((__noreturn__)) usage(void)
 
 	fputs(USAGE_OPTIONS, stdout);
 	fputsln(_(" -g, --get          examine pipe buffers"), stdout);
-	/* TRANSLATORS: '%s' refers to a system file */
 	fprintf(stdout,
-	     _(" -s, --set <size>   set pipe buffer sizes\n"
-	       "                      size defaults to %s\n"),
-		PIPESZ_DEFAULT_SIZE_FILE);
+		_(" -s, --set <size>   the buffer size to be used (default: %u)\n"), opt_size);
 
 	fputs(USAGE_SEPARATOR, stdout);
 	fputsln(_(" -f, --file <path>  act on a file"), stdout);
@@ -232,6 +229,8 @@ int main(int argc, char **argv)
 	while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
 		switch (c) {
 		case 'h':
+			if (ul_path_read_s32(NULL, &opt_size, PIPESZ_DEFAULT_SIZE_FILE))
+				warn(_("cannot parse %s"), PIPESZ_DEFAULT_SIZE_FILE);
 			usage();
 		case 'V':
 			print_version(EXIT_SUCCESS);
-- 
2.48.1


^ permalink raw reply related

* [PATCH 5/7] pipesz: (man) improve the markup and some wordings
From: Benno Schulenberg @ 2025-04-24  9:32 UTC (permalink / raw)
  To: util-linux; +Cc: Nathan Sharp
In-Reply-To: <20250424093237.6432-1-bensberg@telfort.nl>

CC: Nathan Sharp <nwsharp@live.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 misc-utils/pipesz.1.adoc | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/misc-utils/pipesz.1.adoc b/misc-utils/pipesz.1.adoc
index b51de5887..6bc9e46c3 100644
--- a/misc-utils/pipesz.1.adoc
+++ b/misc-utils/pipesz.1.adoc
@@ -12,15 +12,15 @@ pipesz - set or examine pipe and FIFO buffer sizes
 
 == SYNOPSIS
 
-*pipesz* [options] [--set _size_] [--] [_command_ [argument] ...]
+*pipesz* [options] [*--set* _size_] [--] [_command_ [_argument_...]]
 
-*pipesz* [options] --get
+*pipesz* [options] *--get*
 
 == DESCRIPTION
 
 Pipes and FIFOs maintain an internal buffer used to transfer data between the read end and the write end. In some cases, the default size of this internal buffer may not be appropriate. This program provides facilities to set and examine the size of these buffers.
 
-The *--set* operation sets pipe buffer sizes. If it is specified, it must be specified with an explicit _size_. Otherwise, it is implied and the size is read from */proc/sys/fs/pipe-max-size*. The kernel may adjust _size_ as described in *fcntl*(2). To determine the actual buffer sizes set, use the *--verbose* option. If neither *--file* nor *--fd* are specified, *--set* acts on standard output.
+The *--set* operation sets pipe buffer sizes. If it is specified, it must be specified with an explicit _size_. Otherwise, it is implied and the size is read from */proc/sys/fs/pipe-max-size*. The kernel may adjust _size_ as described in *fcntl*(2). To see the actual buffer sizes that get set, use the *--verbose* option. If neither *--file* nor *--fd* are specified, *--set* acts on standard output.
 
 The *--set* operation permits an optional _command_ to execute after setting the pipe buffer sizes. This command is executed with the adjusted pipes.
 
@@ -38,13 +38,13 @@ The kernel imposes limits on the amount of pipe buffer space unprivileged proces
 Report the size of pipe buffers to standard output and exit. As a special behavior, if neither *--file* nor *--fd* are specified, standard input is examined. It is an error to specify this option in combination with *--set*.
 
 *-s*, *--set* _size_::
-Set the size of the pipe buffers, in bytes. This option may be suffixed by _K_, _M_, _G_, _KiB_, _MiB_, or _GiB_ to indicate multiples of 1024. Fractional values are supported in this case. Additional suffixes are supported but are unlikely to be useful. If this option is not specified, a default value is used, as described above. If this option is specified multiple times, a warning is emitted and only the last-specified _size_ is used. As a special behavior, if neither *--file* nor *--fd* are specified, standard output is adjusted. It is an error to specify this option in combination with *--get*.
+Set the size of the pipe buffers, in bytes. This option may be suffixed by *K*, *M*, *G*, *KiB*, *MiB*, or *GiB* to indicate multiples of 1024. Fractional values are supported in this case. Additional suffixes are supported but are unlikely to be useful. If this option is not specified, a default value is used, as described above. If this option is specified multiple times, a warning is emitted and only the last-specified _size_ is used. As a special behavior, if neither *--file* nor *--fd* are specified, standard output is adjusted. It is an error to specify this option in combination with *--get*.
 
 *-f*, *--file* _path_::
 Set the buffer size of the FIFO or pipe at _path_, relative to the current working directory. You may specify this option multiple times to affect different files, and you may do so in combination with *--fd*. Generally, this option is used with FIFOs, but it will also operate on anonymous pipes such as those found in */proc/PID/fd*. Changes to the buffer size of FIFOs are not preserved across system restarts.
 
-*-n*, *--fd* _fd_::
-Set the buffer size of the pipe or FIFO passed to *pipesz* as the specified file descriptor number. You may specify this option multiple times to affect different file descriptors, and you may do so in combination with *--file*. Shorthand options are provided for the common cases of fd 0 (stdin), fd 1 (stdout), and fd 2 (stderr). These should suffice in most cases.
+*-n*, *--fd* _number_::
+Set the buffer size of the pipe or FIFO corresponding to file descriptor _number_. You may specify this option multiple times to affect different file descriptors, and you may do so in combination with *--file*. Shorthand options are provided for the common cases of fd 0 (stdin), fd 1 (stdout), and fd 2 (stderr). These should suffice in most cases.
 
 *-i*, *--stdin*::
 Shorthand for *--fd 0*.
@@ -59,7 +59,7 @@ Shorthand for *--fd 2*.
 Exit, without executing _command_, in case of any error while manipulating a file or file descriptor. The default behavior if this is not specified is to emit a warning to standard error and continue.
 
 *-q*, *--quiet*::
-Do not diagnose non-fatal errors to standard error. This option does not affect the normal output of *--get*, *--verbose*, *--help*, or *--version*.
+Do not report non-fatal errors to standard error. This option does not affect the normal output of *--get*, *--verbose*, *--help*, or *--version*.
 
 *-v*, *--verbose*::
 If specified with *--get*, *pipesz* will emit a descriptive header above the table. Otherwise, if specified, *pipesz* will print the actual buffer sizes set by the kernel to standard error.
-- 
2.48.1


^ permalink raw reply related

* [PATCH 3/7] lsfd: improve grammar, and use angular brackets around placeholder word
From: Benno Schulenberg @ 2025-04-24  9:32 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20250424093237.6432-1-bensberg@telfort.nl>

Also, use dots instead of "(s)" to indicate possible multiple arguments,
and don't use "<when>" when the possible arguments differ from "always",
"never", "auto".

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 lsfd-cmd/lsfd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c
index 2eb53935c..3610de8dd 100644
--- a/lsfd-cmd/lsfd.c
+++ b/lsfd-cmd/lsfd.c
@@ -2190,14 +2190,14 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -o, --output <list>          output columns (see --list-columns)\n"), out);
 	fputs(_(" -r, --raw                    use raw output format\n"), out);
 	fputs(_(" -u, --notruncate             don't truncate text in columns\n"), out);
-	fputs(_(" -p, --pid  <pid(s)>          collect information only specified processes\n"), out);
+	fputs(_(" -p, --pid <pid>...           collect information only for specified processes\n"), out);
 	fputs(_(" -i[4|6], --inet[=4|=6]       list only IPv4 and/or IPv6 sockets\n"), out);
 	fputs(_(" -Q, --filter <expr>          apply display filter\n"), out);
 	fputs(_("     --debug-filter           dump the internal data structure of filter and exit\n"), out);
 	fputs(_(" -C, --counter <name>:<expr>  define custom counter for --summary output\n"), out);
 	fputs(_("     --dump-counters          dump counter definitions\n"), out);
-	fputs(_("     --hyperlink[=mode]       print paths as terminal hyperlinks (always, never, or auto)\n"), out);
-	fputs(_("     --summary[=<when>]       print summary information (only, append, or never)\n"), out);
+	fputs(_("     --hyperlink[=<when>]     print paths as terminal hyperlinks (always|never|auto)\n"), out);
+	fputs(_("     --summary[=<mode>]       print summary information (append|only|never)\n"), out);
 	fputs(_("     --_drop-privilege        (testing purpose) do setuid(1) just after starting\n"), out);
 
 	fputs(USAGE_SEPARATOR, out);
-- 
2.48.1


^ permalink raw reply related

* util-linux-2.41 breaks static build of btrfs-progs
From: Stanislav Brabec @ 2025-04-20 19:24 UTC (permalink / raw)
  To: util-linux

Static build of btrfs-progs fails with util-linux-2.41 with a simple 
problem:
Symbol parse_range becomes visible in libblkid.a, breaking parse-utils.c 
in btrfs-progs, using the same symbol.

The question is:
Should be this fixed by util-linux by prefixing of ul_ to all symbols 
that are not declared as static?
Or should it be fixed by btrfs-progs?
Or could there be applied any type of symbol hiding in the static library?

/usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: 
/usr/lib64/gcc/x86_64-suse-linux/14/../../../../lib64/libblkid.a(libcommon_la-strutils.o): 
in function `parse_range':
[   29s] 
/home/abuild/rpmbuild/BUILD/util-linux-2.41-build/util-linux-2.41/lib/strutils.c:867: 
multiple definition of `parse_range'; common/parse-utils.static.o 
(symbol from plugin):(.text+0x0): first defined here

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                         e-mail: sbrabec@suse.com
Křižíkova 148/34 (Corso IIa)                    tel: +420 284 084 060
186 00 Praha 8-Karlín                          fax:  +420 284 084 001
Czech Republic                                    http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76


^ permalink raw reply

* Re: [PATCH 01/10] bits: (man) normalize the markup and improve some layout
From: Robin Jarry @ 2025-04-17  9:58 UTC (permalink / raw)
  To: Benno Schulenberg, util-linux
In-Reply-To: <20250417094825.20870-1-bensberg@telfort.nl>

Hi Beno,

Benno Schulenberg, Apr 17, 2025 at 11:48:
> The convention in man pages is: to put command arguments in lowercase
> and without angle brackets (these are for --help texts), and without
> unneeded abbreviations.  Literal values (as in some examples) should
> be in bold, not in italics.
>
> CC: Robin Jarry <robin@jarry.cc>
> Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>

Reviewed-by: Robin Jarry <robin@jarry.cc>

Thanks for the cleanup!

^ permalink raw reply

* [PATCH 09/10] docs: correct misspellings of "may be" and mistaken uses of "overwritten"
From: Benno Schulenberg @ 2025-04-17  9:48 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20250417094825.20870-1-bensberg@telfort.nl>

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 disk-utils/sfdisk.8.adoc    | 10 ++++++++--
 login-utils/lslogins.1.adoc |  8 ++++++--
 misc-utils/cal.1.adoc       |  8 ++++----
 sys-utils/lscpu.1.adoc      |  2 +-
 sys-utils/nsenter.1.adoc    |  4 +++-
 term-utils/agetty.8.adoc    |  4 +++-
 6 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/disk-utils/sfdisk.8.adoc b/disk-utils/sfdisk.8.adoc
index d61a031c2..1ffc61588 100644
--- a/disk-utils/sfdisk.8.adoc
+++ b/disk-utils/sfdisk.8.adoc
@@ -148,7 +148,9 @@ Move GPT backup header behind the last partition. Note that UEFI standard requir
 *-a*, *--append*::
 Don't create a new partition table, but only append the specified partitions.
 +
-Note that unused partition maybe be re-used in this case although it is not the last partition in the partition table. See also *-N* to specify entry in the partition table.
+Note that in this case an unused partition may be re-used even though it is
+not the last partition in the partition table. See also *-N* for addressing a
+specific entry in the partition table.
 
 *-b*, *--backup*::
 Back up the current partition table sectors before starting the partitioning. The default backup file name is _~/sfdisk-<device>-<offset>.bak_; to use another name see option *-O*, *--backup-file*. See section *BACKING UP THE PARTITION TABLE* for more details.
@@ -215,7 +217,11 @@ Specify the sector size of the disk. Valid values are 512, 1024, 2048, and 4096.
 Deprecated option. Only the sector unit is supported. This option is not supported when using the *--show-size* command.
 
 *-X*, *--label* _type_::
-Specify the disk label type (e.g., *dos*, *gpt*, ...). If this option is not given, then *sfdisk* defaults to the existing label, but if there is no label on the device yet, then the type defaults to *dos*. The default or the current label may be overwritten by the "label: <name>" script header line. The option *--label* does not force *sfdisk* to create empty disk label (see the *EMPTY DISK LABEL* section below).
+Specify the disk-label type (e.g., *dos*, *gpt*, ...). If this option is not given,
+then *sfdisk* defaults to the type of the existing label, but if there is no label
+on the device yet, then the type defaults to *dos*. This default may be overridden
+by the "label: <name>" script-header line. The option *--label* does not force
+*sfdisk* to create an empty disk label (see the *EMPTY DISK LABEL* section below).
 
 *-Y*, *--label-nested* _type_::
 Force editing of a nested disk label. The primary disk label has to exist already. This option allows editing for example a hybrid/protective MBR on devices with GPT.
diff --git a/login-utils/lslogins.1.adoc b/login-utils/lslogins.1.adoc
index debd87f5a..7a344a7f4 100644
--- a/login-utils/lslogins.1.adoc
+++ b/login-utils/lslogins.1.adoc
@@ -79,13 +79,17 @@ Display information related to login by password (see also *-afL*).
 Raw output (no columnation).
 
 *-s*, *--system-accs*::
-Show system accounts. These are by default all accounts with a UID between 101 and 999 (inclusive), with the exception of either nobody or nfsnobody (UID 65534). This hardcoded default may be overwritten by parameters *SYS_UID_MIN* and *SYS_UID_MAX* in the file _/etc/login.defs_.
+Show system accounts. These are by default all accounts with a UID between 101 and 999 (inclusive),
+with the exception of either nobody or nfsnobody (UID 65534). This hardcoded default may be
+overridden by the parameters *SYS_UID_MIN* and *SYS_UID_MAX* in the file _/etc/login.defs_.
 
 *--time-format* _type_::
 Display dates in short, full or iso format. The default is short, this time format is designed to be space efficient and human readable.
 
 *-u*, *--user-accs*::
-Show user accounts. These are by default all accounts with UID above 1000 (inclusive), with the exception of either nobody or nfsnobody (UID 65534). This hardcoded default maybe overwritten by parameters UID_MIN and UID_MAX in the file _/etc/login.defs_.
+Show user accounts. These are by default all accounts with a UID above 1000 (inclusive),
+with the exception of either nobody or nfsnobody (UID 65534). This hardcoded default may be
+overridden by the parameters *UID_MIN* and *UID_MAX* in the file _/etc/login.defs_.
 
 include::man-common/help-version.adoc[]
 
diff --git a/misc-utils/cal.1.adoc b/misc-utils/cal.1.adoc
index 9f1740620..43a9a3902 100644
--- a/misc-utils/cal.1.adoc
+++ b/misc-utils/cal.1.adoc
@@ -113,10 +113,10 @@ Display a calendar for the whole year.
 Display a calendar for the next twelve months.
 
 *-w*, *--week*[**=**_number_]::
-Display week numbers in the calendar according to the US or ISO-8601 format. If
-a _number_ is specified, the requested week will be printed in the desired or
-current year. The _number_ may be overwritten if _day_ and _month_ are also
-specified.
+Display week numbers in the calendar according to the US or ISO-8601 format.
+If a _number_ is specified, the requested week in the desired or current year
+will be printed and its number highlighted.
+The _number_ may be ignored if _month_ is also specified.
 +
 See the *NOTES* section for more details.
 
diff --git a/sys-utils/lscpu.1.adoc b/sys-utils/lscpu.1.adoc
index 940b1bfeb..795c3938b 100644
--- a/sys-utils/lscpu.1.adoc
+++ b/sys-utils/lscpu.1.adoc
@@ -18,7 +18,7 @@ lscpu - display information about the CPU architecture
 
 *lscpu* gathers CPU architecture information from _sysfs_, _/proc/cpuinfo_ and any applicable architecture-specific libraries (e.g. *librtas* on Powerpc). The command output can be optimized for parsing or for easy readability by humans. The information includes, for example, the number of CPUs, threads, cores, sockets, and Non-Uniform Memory Access (NUMA) nodes. There is also information about the CPU caches and cache sharing, family, model, bogoMIPS, byte order, and stepping.
 
-The default output formatting on terminal is subject to change and maybe optimized for better readability. The output for non-terminals (e.g., pipes) is never affected by this optimization and it is always in "Field: data\n" format. Use for example "*lscpu | less*" to see the default output without optimizations.
+The default output formatting on a terminal is subject to change and may be optimized for better readability. The output for non-terminals (e.g., pipes) is never affected by this optimization and it is always in "Field: data\n" format. Use for example "*lscpu | less*" to see the default output without optimizations.
 
 In virtualized environments, the CPU architecture information displayed reflects the configuration of the guest operating system which is typically different from the physical (host) system. On architectures that support retrieving physical topology information, *lscpu* also displays the number of physical sockets, chips, cores in the host system.
 
diff --git a/sys-utils/nsenter.1.adoc b/sys-utils/nsenter.1.adoc
index cb6419fda..c717d0ceb 100644
--- a/sys-utils/nsenter.1.adoc
+++ b/sys-utils/nsenter.1.adoc
@@ -51,7 +51,9 @@ Various of the options below that relate to namespaces take an optional _file_ a
 
 //TRANSLATORS: Keep {asterisk} untranslated.
 *-a*, *--all*::
-Enter all namespaces of the target process by the default _/proc/[pid]/ns/{asterisk}_ namespace paths. The default paths to the target process namespaces may be overwritten by namespace specific options (e.g., *--all --mount*=[_path_]).
+Enter all namespaces of the target process by the default _/proc/<pid>/ns/{asterisk}_
+namespace paths. The default paths to the target process namespaces may be overridden
+by namespace-specific options (e.g., **--all --mount=**_path_).
 +
 The user namespace will be ignored if 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(). See *setns*(2) for more details.
 
diff --git a/term-utils/agetty.8.adoc b/term-utils/agetty.8.adoc
index 988915865..a33f12a3f 100644
--- a/term-utils/agetty.8.adoc
+++ b/term-utils/agetty.8.adoc
@@ -237,7 +237,9 @@ Since version 2.35, additional locations for the issue file and directory are su
 
 Note that in versions 2.35 to 2.40, the additional locations were only read if the default _/etc/issue_ file did not exist. However, since version 2.41, the additional locations are always read, regardless of the existence of the _/etc/issue_ file. This change allows for the generation of issue files by default.
 
-The default paths maybe completely overridden by *--issue-file* option. In this case specified path has to be file or directory and all the default issue file and directory locations are ignored.
+The default paths may be completely overridden by the *--issue-file* option.
+In this case the specified path has to be a file or directory and
+all the default issue file and directory locations are ignored.
 
 The issue file feature can be completely disabled by *--noissue* option.
 
-- 
2.48.1


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox