]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mkfs.cramfs: reduce the synopsis to the standard, succinct form
authorBenno Schulenberg <bensberg@telfort.nl>
Tue, 25 Mar 2025 10:43:02 +0000 (11:43 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 27 Mar 2025 09:50:46 +0000 (10:50 +0100)
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

index 51fa2122a9808c88940fb73c309ff7ce1e773999..74f51a2801b7d358c2f9b783b8f8d182f801b5fb 100644 (file)
@@ -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 a compressed ROM file system."), stdout);
+
        fputs(USAGE_SEPARATOR, stdout);
-       fputsln(_("Make compressed ROM file system."), 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);
 }