From bd0c8c85e6d35161cfa03a3d40863f5eb28f1cb4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 18 Oct 2022 12:47:39 +0200 Subject: [PATCH] mkfs.bfs, mkfs.cramfs: cleanup optional argument use * fix --help * fix getopt() call Signed-off-by: Karel Zak --- disk-utils/mkfs.bfs.c | 2 +- disk-utils/mkfs.cramfs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/disk-utils/mkfs.bfs.c b/disk-utils/mkfs.bfs.c index 541aa0315c..40f00105e5 100644 --- a/disk-utils/mkfs.bfs.c +++ b/disk-utils/mkfs.bfs.c @@ -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=[=] use exclusive device lock (yes, no or nonblock)\n" + " --lock[=] use exclusive device lock (yes, no or nonblock)\n" )); printf(USAGE_HELP_OPTIONS(21)); diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c index 20966526f5..ca1d0410c0 100644 --- a/disk-utils/mkfs.cramfs.c +++ b/disk-utils/mkfs.cramfs.c @@ -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[=] 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(); -- 2.47.3