summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fsck_minix.c14
-rw-r--r--util-linux/mkfs_minix.c13
-rw-r--r--util-linux/mkswap.c9
-rw-r--r--util-linux/more.c2
-rw-r--r--util-linux/mount.c21
-rw-r--r--util-linux/umount.c6
6 files changed, 38 insertions, 27 deletions
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 1252747..d31de20 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -191,9 +191,17 @@ static void leave(int status)
}
static void show_usage(void) {
- fprintf(stderr,
- "Usage: %s [-larvsmf] /dev/name\n",
- program_name);
+ fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n", BB_VER, BB_BT);
+ fprintf(stderr, "Usage: %s [-larvsmf] /dev/name\n\n", program_name);
+ fprintf(stderr, "Performs 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");
leave(16);
}
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 926a023..b90d3a7 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -171,10 +171,15 @@ static volatile void die(char *str) {
static volatile void show_usage()
{
- fprintf(stderr, "%s\n", program_name);
- fprintf(stderr,
- "Usage: %s [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]\n",
- program_name);
+ 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\n", program_name);
+ fprintf(stderr, "Make 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\t\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");
exit(16);
}
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index fceeb28..601188f 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -47,11 +47,12 @@
/* we also get PAGE_SIZE via getpagesize() */
-static const char mkswap_usage[] = "mkswap [-c] [-v0|-v1] device [block-count]\n"
+static const char mkswap_usage[] = "mkswap [-c] [-v0|-v1] device [block-count]\n\n"
"Prepare a disk partition to be used as a swap partition.\n\n"
-"\t-c\tCheck for read-ability.\n"
-"\t-v0\tMake version 0 swap [max 128 Megs].\n"
-"\t-v1\tMake version 1 swap [big!] (default for kernels > 2.1.117).\n"
+"Options:\n"
+"\t-c\t\tCheck for read-ability.\n"
+"\t-v0\t\tMake version 0 swap [max 128 Megs].\n"
+"\t-v1\t\tMake version 1 swap [big!] (default for kernels > 2.1.117).\n"
"\tblock-count\tNumber of block to use (default is entire partition).\n";
diff --git a/util-linux/more.c b/util-linux/more.c
index 4693161..515857e 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -37,7 +37,7 @@
#include <signal.h>
#include <sys/ioctl.h>
-static const char more_usage[] = "[file ...]";
+static const char more_usage[] = "more [file ...]\n";
/* ED: sparc termios is broken: revert back to old termio handling. */
#ifdef BB_FEATURE_USE_TERMIOS
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 4c085d0..827a56f 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -43,7 +43,7 @@
extern const char mtab_file[]; /* Defined in utility.c */
-static const char mount_usage[] = "Usage:\tmount [flags]\n"
+static const char mount_usage[] = "\tmount [flags]\n"
"\tmount [flags] device directory [-o options,more-options]\n"
"\n"
"Flags:\n"
@@ -248,8 +248,7 @@ extern int mount_main (int argc, char **argv)
while (i>0 && *++(*argv)) switch (**argv) {
case 'o':
if (--i == 0) {
- fprintf (stderr, "%s\n", mount_usage);
- exit( FALSE);
+ goto goodbye;
}
parse_mount_options (*(++argv), &flags, string_flags);
--i;
@@ -260,8 +259,7 @@ extern int mount_main (int argc, char **argv)
break;
case 't':
if (--i == 0) {
- fprintf (stderr, "%s\n", mount_usage);
- exit( FALSE);
+ goto goodbye;
}
filesystemType = *(++argv);
--i;
@@ -284,9 +282,7 @@ extern int mount_main (int argc, char **argv)
case 'v':
case 'h':
case '-':
- fprintf (stderr, "%s\n", mount_usage);
- exit( TRUE);
- break;
+ goto goodbye;
}
} else {
if (device == NULL)
@@ -294,8 +290,7 @@ extern int mount_main (int argc, char **argv)
else if (directory == NULL)
directory=*argv;
else {
- fprintf (stderr, "%s\n", mount_usage);
- exit( TRUE);
+ goto goodbye;
}
}
i--;
@@ -331,9 +326,11 @@ extern int mount_main (int argc, char **argv)
exit (mount_one (device, directory, filesystemType,
flags, string_flags, useMtab, fakeIt));
} else {
- fprintf (stderr, "%s\n", mount_usage);
- exit( FALSE);
+ goto goodbye;
}
}
exit( TRUE);
+
+goodbye:
+ usage( mount_usage);
}
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 89c59f9..0d105d9 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -29,8 +29,8 @@
#include <errno.h>
static const char umount_usage[] =
-"Usage: umount [flags] filesystem|directory\n"
-"Optional Flags:\n"
+"Usage: umount [flags] filesystem|directory\n\n"
+"Flags:\n"
"\t-a:\tUnmount all file systems"
#ifdef BB_MTAB
" in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries\n"
@@ -108,7 +108,7 @@ umount_main(int argc, char** argv)
}
/* Parse any options */
- while (argc-- > 0 && **(argv++) == '-') {
+ while (--argc > 0 && **(++argv) == '-') {
while (*++(*argv)) switch (**argv) {
case 'a':
umountAll = TRUE;