8000 Merge branch 'PR/Benno-29Apr' of https://github.com/karelzak/util-lin… · util-linux/util-linux@d4ee078 · GitHub
[go: up one dir, main page]

Skip to content

Commit d4ee078

Browse files
committed
Merge branch 'PR/Benno-29Apr' of https://github.com/karelzak/util-linux-work
* 'PR/Benno-29Apr' of https://github.com/karelzak/util-linux-work: po-man: add hyperlink.adoc to po4a.cfg docs,usage: harmonize description of --hyperlink, and add 2 missing ones pipesz: report default size in --help, instead of referring the user lsfd: improve grammar, and use angular brackets around placeholder word uuidd: put an option and its description in a single message pipesz: (man) improve the markup and some wordings irqtop: make the wording of an error message identical to that of another unshare: make the wording of a message identical to that of three others
2 parents 48cf648 + 18e5242 commit d4ee078

16 files changed

+61
-48
lines changed

lsfd-cmd/lsfd.1.adoc

+17-19
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,22 @@ Use raw output format.
6060
*--notruncate*::
6161
Don't truncate text in columns.
6262

63-
*-p*, *--pid* _pids_::
64-
Collect information only for specified processes.
65-
_pids_ is a list of pids. A comma or whitespaces can be used as separators.
66-
You can use this option with *pidof*(1). See *FILTER EXAMPLES*.
67-
+
68-
Both *-Q* option with an expression including PID, e.g. -Q (PID == 1),
69-
and *-p* option, e.g. -p 1, may print the same output but using *-p*
70-
option is much more efficient because *-p* option works at a much earlier
71-
stage of processing than the *-Q* option.
63+
*-p*, *--pid* _list_::
64+
Collect information only for the specified processes.
65+
The _list_ is a comma-separated list of PIDs.
66+
See also *FILTER EXAMPLES*.
7267

73-
*-i*[4|6], *--inet*[=4|=6]::
68+
*-i*[*4*|*6*], *--inet*[**=4**|**=6**]::
7469
List only IPv4 sockets and/or IPv6 sockets.
7570

76-
*-Q*, *--filter* _expr_::
77-
Print only the files matching the condition represented by the _expr_.
71+
*-Q*, *--filter* _expression_::
72+
Print only the files matching the condition represented by the _expression_.
7873
See also *scols-filter*(5) and *FILTER EXAMPLES*.
74+
+
75+
The *-Q* option with a PID (for example: *-Q PID==1*) and the *-p*
76+
option (for example: *-p 1*) can be used to achieve the same result,
77+
but using the *-p* option is much more efficient because it works at
78+
a much earlier stage of processing than the *-Q* option.
7979

8080
*-C*, *--counter* __label__:__filter_expr__::
8181
Define a custom counter used in *--summary* output. *lsfd* makes a
@@ -85,14 +85,13 @@ counter named _label_. *lsfd* applies filters defined with *--filter*
8585
options before counting; files excluded by the filters are not counted.
8686
+
8787
See *scols-filter*(5) about _filter_expr_.
88-
_label_ should not include `{` nor `:`. You can define multiple
88+
_label_ should not include *{* nor *:*. You can define multiple
8989
counters by specifying this option multiple times.
90-
+
9190
See also *COUNTER EXAMPLES*.
9291

93-
*--summary*[**=**__when__]::
94-
This option controls summary lines output. The optional argument _when_
95-
can be *only*, *append* or *never*. If the _when_ argument is omitted,
92+
*--summary*[**=**_mode_]::
93+
This option controls summary lines output. The optional argument _mode_
94+
can be *only*, *append*, or *never*. If the _mode_ argument is omitted,
9695
it defaults to *only*.
9796
+
9897
The summary reports counters. A counter consists of a label and an
@@ -110,8 +109,7 @@ only for *lsfd* developers.
110109
*--dump-counters*::
111110
Dump the definition of counters used in *--summary* output.
112111

113-
*--hyperlink*[=_mode_]::
114-
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.
112+
include::man-common/hyperlink.adoc[]
115113

116114
*-H*, *--list-columns*::
117115
List the columns that can be specified with the *--output* option.

lsfd-cmd/lsfd.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -2190,14 +2190,14 @@ static void __attribute__((__noreturn__)) usage(void)
21902190
fputs(_(" -o, --output <list> output columns (see --list-columns)\n"), out);
21912191
fputs(_(" -r, --raw use raw output format\n"), out);
21922192
fputs(_(" -u, --notruncate don't truncate text in columns\n"), out);
2193-
fputs(_(" -p, --pid <pid(s)> collect information only specified processes\n"), out);
2193+
fputs(_(" -p, --pid <list> collect information only for specified processes\n"), out);
21942194
fputs(_(" -i[4|6], --inet[=4|=6] list only IPv4 and/or IPv6 sockets\n"), out);
21952195
fputs(_(" -Q, --filter <expr> apply display filter\n"), out);
21962196
fputs(_(" --debug-filter dump the internal data structure of filter and exit\n"), out);
21972197
fputs(_(" -C, --counter <name>:<expr> define custom counter for --summary output\n"), out);
21982198
fputs(_(" --dump-counters dump counter definitions\n"), out);
2199-
fputs(_(" --hyperlink[=mode] print paths as terminal hyperlinks (always, never, or auto)\n"), out);
2200-
fputs(_(" --summary[=<when>] print summary information (only, append, or never)\n"), out);
2199+
fputs(_(" --hyperlink[=<when>] print paths as hyperlinks (always|never|auto)\n"), out);
2200+
fputs(_(" --summary[=<mode>] print summary information (append|only|never)\n"), out);
22012201
fputs(_(" --_drop-privilege (testing purpose) do setuid(1) just after starting\n"), out);
22022202

22032203
fputs(USAGE_SEPARATOR, out);

man-common/Makemodule.am

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ADOCFILES_COMMON += \
55
man-common/footer-config.adoc \
66
man-common/footer-lib.adoc \
77
man-common/help-version.adoc \
8+
man-common/hyperlink.adoc \
89
man-common/in-bytes.adoc \
910
man-common/manpage-stub.adoc \
1011
man-common/translation.adoc

man-common/hyperlink.adoc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*--hyperlink*[**=**_when_]::
2+
Print paths as terminal hyperlinks. The optional _when_ argument can be
3+
*always*, *never*, or *auto*. If the argument is omitted, it defaults to
4+
*auto*, which means that hyperlinks will only be used when the output
5+
goes to a terminal.

man-common/meson.build

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ man_common_adocs = files(
55
'footer-config.adoc',
66
'footer-lib.adoc',
77
'help-version.adoc',
8+
'hyperlink.adoc',
89
'in-bytes.adoc',
910
'manpage-stub.adoc',
1011
'translation.adoc',

misc-utils/findmnt.8.adoc

+1-5
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,7 @@ Print the first matching filesystem only.
6767
List the columns that can be specified with the *--output* option.
6868
Can be used with *--json* or *--raw* to get the list in a machine-readable format.
6969

70-
*--hyperlink*[**=**_mode_]::
71-
Print mountpoint paths as terminal hyperlinks. The optional _mode_ argument
72-
can be *always*, *never*, or *auto*. If the argument is omitted, it defaults
73-
to *auto*, which means that hyperlinks will only be used when the output goes
74-
to a terminal.
70+
include::man-common/hyperlink.adoc[]
7571

7672
*-I*, *--dfi*::
7773
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.

misc-utils/findmnt.c

+2
Original file line numberDiff line numberDiff line change
@@ -1568,6 +1568,8 @@ static void __attribute__((__noreturn__)) usage(void)
15681568
fputs(_(" -D, --df imitate the output of df(1)\n"), out);
15691569
fputs(_(" -e, --evaluate convert tags (LABEL,UUID,PARTUUID,PARTLABEL) \n"
15701570
" to device names\n"), out);
1571+
fputs(_(" --hyperlink[=<when>]\n"
1572+
" print paths as hyperlinks (always|never|auto)\n"), out);
15711573
fputs(_(" -I, --dfi imitate the output of df(1) with -i option\n"), out);
15721574
fputs(_(" -J, --json use JSON output format\n"), out);
15731575
fputs(_(" -l, --list use list format output\n"), out);

misc-utils/lsblk.8.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ Exclude the devices specified by the comma-separated _list_ of major device numb
6262
*-f*, *--fs*::
6363
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.
6464

65-
*--hyperlink*[**=**_mode_]::
66-
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.
65+
include::man-common/hyperlink.adoc[]
6766

6867
*-I*, *--include* _list_::
6968
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.

misc-utils/lsblk.c

+2
Original file line numberDiff line numberDiff line change
@@ -2330,6 +2330,8 @@ static void __attribute__((__noreturn__)) usage(void)
23302330
fputs(_(" -d, --nodeps don't print slaves or holders\n"), out);
23312331
fputs(_(" -e, --exclude <list> exclude devices by major number (default: RAM disks)\n"), out);
23322332
fputs(_(" -f, --fs output info about filesystems\n"), out);
2333+
fputs(_(" --hyperlink[=<when>]\n"
2334+
" print paths as hyperlinks (always|never|auto)\n"), out);
23332335
fputs(_(" -i, --ascii use ascii characters only\n"), out);
23342336
fputs(_(" -l, --list use list format output\n"), out);
23352337
fputs(_(" -m, --perms output info about permissions\n"), out);

misc-utils/pipesz.1.adoc

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ pipesz - set or examine pipe and FIFO buffer sizes
1212

1313
== SYNOPSIS
1414

15-
*pipesz* [options] [--set _size_] [--] [_command_ [argument] ...]
15+
*pipesz* [options] [*--set* _size_] [--] [_command_ [_argument_...]]
1616

17-
*pipesz* [options] --get
17+
*pipesz* [options] *--get*
1818

1919
== DESCRIPTION
2020

2121
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.
2222

23-
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.
23+
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.
2424

2525
The *--set* operation permits an optional _command_ to execute after setting the pipe buffer sizes. This command is executed with the adjusted pipes.
2626

@@ -38,13 +38,13 @@ The kernel imposes limits on the amount of pipe buffer space unprivileged proces
3838
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*.
3939

4040
*-s*, *--set* _size_::
41-
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*.
41+
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*.
4242

4343
*-f*, *--file* _path_::
4444
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.
4545

46-
*-n*, *--fd* _fd_::
47-
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.
46+
*-n*, *--fd* _number_::
47+
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.
4848

4949
*-i*, *--stdin*::
5050
Shorthand for *--fd 0*.
@@ -59,7 +59,7 @@ Shorthand for *--fd 2*.
5959
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 10000 to standard error and continue.
6060

6161
*-q*, *--quiet*::
62-
Do not diagnose non-fatal errors to standard error. This option does not affect the normal output of *--get*, *--verbose*, *--help*, or *--version*.
62+
Do not report non-fatal errors to standard error. This option does not affect the normal output of *--get*, *--verbose*, *--help*, or *--version*.
6363

6464
*-v*, *--verbose*::
6565
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.

misc-utils/pipesz.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ static char opt_verbose = 0; /* --verbose */
6161

6262
static void __attribute__((__noreturn__)) usage(void)
6363
{
64+
if (ul_path_read_s32(NULL, &opt_size, PIPESZ_DEFAULT_SIZE_FILE))
65+
warn(_("cannot parse %s"), PIPESZ_DEFAULT_SIZE_FILE);
66+
6467
fputs(USAGE_HEADER, stdout);
6568
fprintf(stdout, _(" %s [options] [--set <size>] [--] [command]\n"), program_invocation_short_name);
6669
fprintf(stdout, _(" %s [options] --get\n"), program_invocation_short_name);
@@ -71,11 +74,8 @@ static void __attribute__((__noreturn__)) usage(void)
7174

7275
fputs(USAGE_OPTIONS, stdout);
7376
fputsln(_(" -g, --get examine pipe buffers"), stdout);
74-
/* TRANSLATORS: '%s' refers to a system file */
7577
fprintf(stdout,
76-
_(" -s, --set <size> set pipe buffer sizes\n"
77-
" size defaults to %s\n"),
78-
PIPESZ_DEFAULT_SIZE_FILE);
78+
_(" -s, --set <size> the buffer size to be used (default: %u)\n"), opt_size);
7979

8080
fputs(USAGE_SEPARATOR, stdout);
8181
fputsln(_(" -f, --file <path> act on a file"), stdout);

misc-utils/uuidd.8.adoc

+12-4
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,20 @@ The *uuidd* daemon is used by the UUID library to generate universally unique id
2424

2525
== OPTIONS
2626

27-
*-C*, *--cont-clock*[**=**_time_]::
28-
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.
27+
*-C*, *--cont-clock*[**=**_number_[*hd*]]::
28+
Activate continuous clock handling for time-based UUIDs. *uuidd* could
29+
use all possible clock values, beginning with the daemon's start time.
30+
The optional argument can be used to set a value for 'max_clock_offset'.
31+
This guarantees that a clock value of a UUID will always be within the
32+
range of 'max_clock_offset'.
2933
+
30-
The option *-C* or *--cont-clock* enables the feature with a default max_clock_offset of 2 hours.
34+
The option *-C* or *--cont-clock* (without an argument) enables the
35+
feature with a default 'max_clock_offset' of 2 hours.
3136
+
32-
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.
37+
The option **-C**_number_ or **--cont-clock=**_number_ enables the
38+
feature with a 'max_clock_offset' of _number_ seconds.
39+
In case of an appended *h* or *d*, _number_ is understood in hours or days.
40+
The minimum value is 60 seconds, the maximum value is 365 days.
3341

3442
*-d*, *--debug*::
3543
Run *uuidd* in debugging mode. This prevents *uuidd* from running as a daemon.

misc-utils/uuidd.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ static void __attribute__((__noreturn__)) usage(void)
108108
fputs(_(" -P, --no-pid do not create pid file\n"), out);
109109
fputs(_(" -F, --no-fork do not daemonize using double-fork\n"), out);
110110
fputs(_(" -S, --socket-activation do not create listening socket\n"), out);
111-
fputs(_(" -C, --cont-clock[=<NUM>[hd]]\n"), out);
112-
fputs(_(" activate continuous clock handling\n"), out);
111+
fputs(_(" -C, --cont-clock[=<number>[hd]]\n"
112+
" activate continuous clock handling\n"), out);
113113
fputs(_(" -d, --debug run in debugging mode\n"), out);
114114
fputs(_(" -q, --quiet turn on quiet mode\n"), out);
115115
fputs(USAGE_SEPARATOR, out);

po-man/po4a.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[type:asciidoc] ../man-common/footer-lib.adoc $lang:$lang/man-common/footer-lib.adoc opt:"--keep 0"
88
[type:asciidoc] ../man-common/footer.adoc $lang:$lang/man-common/footer.adoc opt:"--keep 0"
99
[type:asciidoc] ../man-common/help-version.adoc $lang:$lang/man-common/help-version.adoc opt:"--keep 0"
10+
[type:asciidoc] ../man-common/hyperlink.adoc $lang:$lang/man-common/hyperlink.adoc opt:"--keep 0"
1011
[type:asciidoc] ../man-common/in-bytes.adoc $lang:$lang/man-common/in-bytes.adoc opt:"--keep 0"
1112
[type:asciidoc] ../man-common/translation.adoc $lang:$lang/man-common/translation.adoc opt:"--keep 0"
1213

sys-utils/irqtop.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ int main(int argc, char **argv)
465465
if (!ctl.batch) {
466466
is_tty = isatty(STDIN_FILENO);
467467
if (is_tty && tcgetattr(STDIN_FILENO, &saved_tty) == -1)
468-
fputs(_("terminal setting retrieval"), stdout);
468+
fputs(_("failed to get terminal attributes"), stdout);
469469

470470
ctl.win = initscr();
471471
get_terminal_dimension(&ctl.cols, &ctl.rows);

sys-utils/unshare.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ int main(int argc, char *argv[])
12411241
newdir = newdir ?: "/";
12421242
}
12431243
if (newdir && chdir(newdir))
1244-
err(EXIT_FAILURE, _("cannot chdir to '%s'"), newdir);
1244+
err(EXIT_FAILURE, _("cannot change directory to %s"), newdir);
12451245

12461246
if (procmnt) {
12471247
/* When not changing root and using the default propagation flags

0 commit comments

Comments
 (0)
0