Util-Linux package development
 help / color / mirror / Atom feed
From: Benno Schulenberg <bensberg@telfort.nl>
To: util-linux@vger.kernel.org
Subject: [PATCH 08/11] mkfs.cramfs: reduce the synopsis to the standard, succinct form
Date: Tue, 25 Mar 2025 11:43:02 +0100	[thread overview]
Message-ID: <20250325104305.23980-8-bensberg@telfort.nl> (raw)
In-Reply-To: <20250325104305.23980-1-bensberg@telfort.nl>

The old synopsis was 1) incomplete (mentioning -h and -v, but not
-V and -E and -z, for example), and 2) overlong, being wider than
80 columns.  So, change the synposis to what most other utilities
nowadays use: "<name> [options] <arguments>..." -- this makes it
much clearer what the two required arguments are.

Also, reshuffle the descriptions of the two arguments, to not hide
them among the options.

And remove the description of option -s, as listing an option that
does nothing is not helpful.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 disk-utils/mkfs.cramfs.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c
index 51fa2122a..74f51a280 100644
--- a/disk-utils/mkfs.cramfs.c
+++ b/disk-utils/mkfs.cramfs.c
@@ -128,10 +128,15 @@ struct entry {
 static void __attribute__((__noreturn__)) usage(void)
 {
 	fputs(USAGE_HEADER, stdout);
-	fprintf(stdout, _(" %s [-h] [-v] [-b blksize] [-e edition] [-N endian] [-i file] [-n name] dirname outfile\n"),
-		program_invocation_short_name);
+	fprintf(stdout, _(" %s [options] dirname outfile\n"), program_invocation_short_name);
+
 	fputs(USAGE_SEPARATOR, stdout);
-	fputsln(_("Make compressed ROM file system."), stdout);
+	fputsln(_("Make a compressed ROM file system."), stdout);
+
+	fputs(USAGE_SEPARATOR, stdout);
+	fputsln(_(  " dirname        root of the filesystem to be compressed"), stdout);
+	fputsln(_(  " outfile        output file"), stdout);
+
 	fputs(USAGE_OPTIONS, stdout);
 	fputsln(_(  " -v             be verbose"), stdout);
 	fputsln(_(  " -E             make all warnings errors (non-zero exit status)"), stdout);
@@ -141,14 +146,12 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputsln(_(  " -i file        insert a file image into the filesystem"), stdout);
 	fputsln(_(  " -n name        set name of cramfs filesystem"), stdout);
 	fprintf(stdout, _(" -p             pad by %d bytes for boot code\n"), PAD_SIZE);
-	fputsln(_(  " -s             sort directory entries (old option, ignored)"), stdout);
 	fputsln(_(  " -z             make explicit holes"), stdout);
 	fputsln(_(  " -l[=<mode>]    use exclusive device lock (yes, no or nonblock)"), stdout);
-	fputs(USAGE_SEPARATOR, stdout);
-	fputsln(_(  " dirname        root of the filesystem to be compressed"), stdout);
-	fputsln(_(  " outfile        output file"), stdout);
+
 	fputs(USAGE_SEPARATOR, stdout);
 	fprintf(stdout, USAGE_HELP_OPTIONS(16));
+
 	fprintf(stdout, USAGE_MAN_TAIL("mkfs.cramfs(8)"));
 	exit(MKFS_EX_OK);
 }
-- 
2.48.1


  parent reply	other threads:[~2025-03-25 10:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 10:42 [PATCH 01/11] ipcrm: move a constant argument in order to gettextize the message Benno Schulenberg
2025-03-25 10:42 ` [PATCH 02/11] ipcrm: in usage text, use two lines when option+arguments is very long Benno Schulenberg
2025-03-25 10:42 ` [PATCH 03/11] ipcutils, lsipc: unabbreviate two words in some error messages Benno Schulenberg
2025-03-25 10:42 ` [PATCH 04/11] chmem: print warnings about failures always (not only with --verbose) Benno Schulenberg
2025-03-25 10:42 ` [PATCH 05/11] chmem: (man) add missing end-of-bold marker, and add missing OR bar Benno Schulenberg
2025-03-25 10:43 ` [PATCH 06/11] fstrim: mark only the mountpoint as placeholder, not options -A and -a Benno Schulenberg
2025-03-25 10:43 ` [PATCH 07/11] swapon: improve a translator hint, and remove a pointless one Benno Schulenberg
2025-03-25 10:43 ` Benno Schulenberg [this message]
2025-03-25 10:43 ` [PATCH 09/11] mkfs.cramfs: vertically align the option descriptions of the usage text Benno Schulenberg
2025-03-25 10:43 ` [PATCH 10/11] mkfs.cramfs: (man) mark arguments of -N and -l in bold, not italics Benno Schulenberg
2025-03-25 10:43 ` [PATCH 11/11] ipcs: align the first group of options with later ones in the usage text Benno Schulenberg
2025-03-27  9:54 ` [PATCH 01/11] ipcrm: move a constant argument in order to gettextize the message Karel Zak

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=20250325104305.23980-8-bensberg@telfort.nl \
    --to=bensberg@telfort.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