From: Benno Schulenberg Date: Thu, 12 Mar 2026 15:55:31 +0000 (+0100) Subject: copyfilerange: (usage) correct the markup and improve the wording X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=923de58c326ea21502a4d114fcd0a77dd6076ab4;p=thirdparty%2Futil-linux.git copyfilerange: (usage) correct the markup and improve the wording The , , and 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 argument and put it after the options, 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 Signed-off-by: Benno Schulenberg --- diff --git a/misc-utils/copyfilerange.c b/misc-utils/copyfilerange.c index 20f0373bd..5ee562d22 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] [] [] [...]\n"), + _(" %1$s [options] ...\n"), program_invocation_short_name); fputs(USAGE_SEPARATOR, out); - fputsln(_("Copy file ranges 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(_("Copy the specified range(s) from source to destination file."), 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 read ranges 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)); + + fputs(USAGE_ARGUMENTS, out); + fputsln(_(" is of the form ::,\n" + " with all values in bytes. If is 0, as much data as available\n" + " is copied. When an offset is omitted, the last file position is used."), out); fprintf(out, USAGE_MAN_TAIL("copyfilerange(1)")); exit(EXIT_SUCCESS);