[PATCH 08/11] mkfs.cramfs: reduce the synopsis to the standard, succinct form

Benno Schulenberg <[email protected]>
Newsgroups org.kernel.vger.util-linux
Message-ID <[email protected]>
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 <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.