From: Benno Schulenberg <bensberg@telfort.nl>
To: util-linux@vger.kernel.org
Cc: Dick Marinus <dick@mrns.nl>
Subject: [PATCH 1/2] copyfilerange: (usage) correct the markup and improve the wording
Date: Mon, 9 Mar 2026 17:09:02 +0100 [thread overview]
Message-ID: <20260309160903.15490-1-bensberg@telfort.nl> (raw)
The <source>, <destination>, and <range> arguments are required,
so do not mark them as optional (with the square brackets).
Also, trim the redundant lines about the source and destination
files, improve the explanation for the <range> argument, and
keep the text within 80 columns.
Furthermore, list the short options first (as is custom), and
match the indentaion of the -h and -V options to the others.
CC: Dick Marinus <dick@mrns.nl>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
misc-utils/copyfilerange.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/misc-utils/copyfilerange.c b/misc-utils/copyfilerange.c
index 20f0373bd..a72c81cd1 100644
--- a/misc-utils/copyfilerange.c
+++ b/misc-utils/copyfilerange.c
@@ -55,25 +55,23 @@ static void __attribute__((__noreturn__)) usage(void)
FILE *out = stdout;
fputs(USAGE_HEADER, out);
fprintf(out,
- _(" %1$s [options] [<source>] [<destination>] [<range>...]\n"),
+ _(" %1$s [options] <source> <destination> <range>...\n"),
program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
- fputsln(_("Copy file ranges from source to destination file."), out);
+ fputsln(_("Copy the specified range(s) from source to destination file."), out);
fputs(USAGE_SEPARATOR, out);
- fputsln(_(" source source filename"), out);
- fputsln(_(" destination destination filename"), out);
- fputsln(_(" range source_offset:dest_offset:length, all values are in bytes"), out);
- fputsln(_(" if length is set to 0 as much as available will be copied"), out);
- fputsln(_(" when the offset is omitted the last file position is used"), out);
+ fputsln(_("Each <range> is of the form <source_offset>:<destination_offset>:<length>,\n"
+ "with all values in bytes. If <length> is 0, as much data as available will\n"
+ "be copied. When an offset is omitted, the last file position is used."), out);
fputs(USAGE_OPTIONS, out);
- fputsln(_(" --ranges, -r filename read range(s) separated by newlines from filename"), out);
- fputsln(_(" --verbose, -v verbose mode"), out);
+ fputsln(_(" -r, --ranges <file> read range(s) separated by newlines from this file"), out);
+ fputsln(_(" -v, --verbose verbose mode"), out);
fputs(USAGE_SEPARATOR, out);
- fprintf(out, USAGE_HELP_OPTIONS(16));
+ fprintf(out, USAGE_HELP_OPTIONS(25));
fprintf(out, USAGE_MAN_TAIL("copyfilerange(1)"));
exit(EXIT_SUCCESS);
--
2.53.0
next reply other threads:[~2026-03-09 16:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 16:09 Benno Schulenberg [this message]
2026-03-09 16:09 ` [PATCH 2/2] copyfilerange: (man) correct the markup and improve the wordings Benno Schulenberg
2026-03-10 7:47 ` Dick Marinus
2026-03-11 12:14 ` [PATCH 1/2] copyfilerange: (usage) correct the markup and improve the wording Karel Zak
2026-03-12 15:52 ` Benno Schulenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260309160903.15490-1-bensberg@telfort.nl \
--to=bensberg@telfort.nl \
--cc=dick@mrns.nl \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox