]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mkfs.bfs, mkfs.cramfs: cleanup optional argument use
authorKarel Zak <kzak@redhat.com>
Tue, 18 Oct 2022 10:47:39 +0000 (12:47 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 18 Oct 2022 10:47:39 +0000 (12:47 +0200)
* fix --help
* fix getopt() call

Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/mkfs.bfs.c
disk-utils/mkfs.cramfs.c

index 541aa0315c8ad0f3a910403b94f4f7297f543068..40f00105e5cba004b11bea89f1246b0b5e200021 100644 (file)
@@ -85,7 +85,7 @@ static void __attribute__((__noreturn__)) usage(void)
                       " -v, --verbose       explain what is being done\n"
                       " -c                  this option is silently ignored\n"
                       " -l                  this option is silently ignored\n"
-                      " --lock=[=<mode>]    use exclusive device lock (yes, no or nonblock)\n"
+                      " --lock[=<mode>]     use exclusive device lock (yes, no or nonblock)\n"
                       ));
        printf(USAGE_HELP_OPTIONS(21));
 
index 20966526f500f595fabcad8fdaa57e4b779de9fa..ca1d0410c0be77d1df4e4951001391e7724bb91d 100644 (file)
@@ -141,7 +141,7 @@ static void __attribute__((__noreturn__)) usage(void)
        printf(_(" -p             pad by %d bytes for boot code\n"), PAD_SIZE);
        puts(_(  " -s             sort directory entries (old option, ignored)"));
        puts(_(  " -z             make explicit holes"));
-       puts(_(  " -l lockmode    use exclusive device lock (yes, no or nonblock)"));
+       puts(_(  " -l[=<mode>]    use exclusive device lock (yes, no or nonblock)"));
        puts(_(  " dirname        root of the filesystem to be compressed"));
        puts(_(  " outfile        output file"));
        fputs(USAGE_SEPARATOR, stdout);
@@ -733,7 +733,7 @@ int main(int argc, char **argv)
        strutils_set_exitcode(MKFS_EX_USAGE);
 
        /* command line options */
-       while ((c = getopt(argc, argv, "hb:Ee:i:n:N:l:psVvz")) != EOF) {
+       while ((c = getopt(argc, argv, "hb:Ee:i:n:N:l::psVvz")) != EOF) {
                switch (c) {
                case 'h':
                        usage();