aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-07-14 23:28:47 +0000
committerMatt Kraai <kraai@debian.org>2000-07-14 23:28:47 +0000
commit3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217 (patch)
tree6a217bf17e7c00e98a47f657015535f21b53cedd /util-linux
parent464c5de00d3dfb5f01e866f703d95bbb2bb9443c (diff)
downloadbusybox-3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217.tar.gz
Don't use strings directly in calls to usage(). This is in preparation
for their extraction to a separate file.
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fsck_minix.c33
-rw-r--r--util-linux/mkfs_minix.c32
2 files changed, 30 insertions, 35 deletions
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 74281a71e..ea27c236c 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -288,25 +288,24 @@ static void leave(int status)
exit(status);
}
-static void show_usage(void)
-{
- fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n",
- BB_VER, BB_BT);
- fprintf(stderr, "Usage: %s [-larvsmf] /dev/name\n", applet_name);
+const char fsck_minix_usage[] =
+ "Usage: fsck.minix [-larvsmf] /dev/name\n"
#ifndef BB_FEATURE_TRIVIAL_HELP
- fprintf(stderr,
- "\nPerforms a consistency check for MINIX filesystems.\n\n");
- fprintf(stderr, "Options:\n");
- fprintf(stderr, "\t-l\tLists all filenames\n");
- fprintf(stderr, "\t-r\tPerform interactive repairs\n");
- fprintf(stderr, "\t-a\tPerform automatic repairs\n");
- fprintf(stderr, "\t-v\tverbose\n");
- fprintf(stderr, "\t-s\tOutputs super-block information\n");
- fprintf(stderr,
- "\t-m\tActivates MINIX-like \"mode not cleared\" warnings\n");
- fprintf(stderr, "\t-f\tForce file system check.\n\n");
+ "\nPerforms a consistency check for MINIX filesystems.\n\n"
+ "Options:\n"
+ "\t-l\tLists all filenames\n"
+ "\t-r\tPerform interactive repairs\n"
+ "\t-a\tPerform automatic repairs\n"
+ "\t-v\tverbose\n"
+ "\t-s\tOutputs super-block information\n"
+ "\t-m\tActivates MINIX-like \"mode not cleared\" warnings\n"
+ "\t-f\tForce file system check.\n\n"
#endif
- leave(16);
+ ;
+
+static void show_usage(void)
+{
+ usage(fsck_minix_usage);
}
static void die(const char *str)
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index e4dedaf82..9ae4b569c 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -267,27 +267,23 @@ static volatile void die(char *str)
exit(8);
}
+const char mkfs_minix_usage[] =
+ "mkfs.minix [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]\n"
+#ifndef BB_FEATURE_TRIVIAL_HELP
+ "\nMake a MINIX filesystem.\n\n"
+ "Options:\n"
+ "\t-c\t\tCheck the device for bad blocks\n"
+ "\t-n [14|30]\tSpecify the maximum length of filenames\n"
+ "\t-i INODES\tSpecify the number of inodes for the filesystem\n"
+ "\t-l FILENAME\tRead the bad blocks list from FILENAME\n"
+ "\t-v\t\tMake a Minix version 2 filesystem\n\n"
+#endif
+ ;
+
static volatile void show_usage() __attribute__ ((noreturn));
static volatile void show_usage()
{
- fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n",
- BB_VER, BB_BT);
- fprintf(stderr,
- "Usage: %s [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]\n",
- applet_name);
-#ifndef BB_FEATURE_TRIVIAL_HELP
- fprintf(stderr, "\nMake a MINIX filesystem.\n\n");
- fprintf(stderr, "Options:\n");
- fprintf(stderr, "\t-c\t\tCheck the device for bad blocks\n");
- fprintf(stderr,
- "\t-n [14|30]\tSpecify the maximum length of filenames\n");
- fprintf(stderr,
- "\t-i INODES\tSpecify the number of inodes for the filesystem\n");
- fprintf(stderr,
- "\t-l FILENAME\tRead the bad blocks list from FILENAME\n");
- fprintf(stderr, "\t-v\t\tMake a Minix version 2 filesystem\n\n");
-#endif
- exit(16);
+ usage(mkfs_minix_usage);
}
/*