8000 pipesz: report default size in --help, instead of referring the user · util-linux/util-linux@fa6d89e · GitHub
[go: up one dir, main page]

Skip to content

Commit fa6d89e

Browse files
Benno Schulenbergkarelzak
Benno Schulenberg
authored andcommitted
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>
1 parent ecd6167 commit fa6d89e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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);

0 commit comments

Comments
 (0)
0