diff options
| author | Eric Andersen <andersen@codepoet.org> | 1999-11-10 23:13:02 +0000 |
|---|---|---|
| committer | Eric Andersen <andersen@codepoet.org> | 1999-11-10 23:13:02 +0000 |
| commit | d73dc5b07390fb90e7f605871c993a28eedf1d46 (patch) | |
| tree | 3e448e6550da52d2709e5f52fbae56e9df9462cc /util-linux | |
| parent | 84d85680712573c7a8bd7d0491c3f944dc08ad10 (diff) | |
| download | busybox-w32-d73dc5b07390fb90e7f605871c993a28eedf1d46.tar.gz busybox-w32-d73dc5b07390fb90e7f605871c993a28eedf1d46.tar.bz2 busybox-w32-d73dc5b07390fb90e7f605871c993a28eedf1d46.zip | |
Updates to usage, and made tar work.
-Erik
Diffstat (limited to 'util-linux')
| -rw-r--r-- | util-linux/fsck_minix.c | 14 | ||||
| -rw-r--r-- | util-linux/mkfs_minix.c | 13 | ||||
| -rw-r--r-- | util-linux/mkswap.c | 9 | ||||
| -rw-r--r-- | util-linux/more.c | 2 | ||||
| -rw-r--r-- | util-linux/mount.c | 21 | ||||
| -rw-r--r-- | util-linux/umount.c | 6 |
6 files changed, 38 insertions, 27 deletions
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index 125274734..d31de20a8 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c | |||
| @@ -191,9 +191,17 @@ static void leave(int status) | |||
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | static void show_usage(void) { | 193 | static void show_usage(void) { |
| 194 | fprintf(stderr, | 194 | fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n", BB_VER, BB_BT); |
| 195 | "Usage: %s [-larvsmf] /dev/name\n", | 195 | fprintf(stderr, "Usage: %s [-larvsmf] /dev/name\n\n", program_name); |
| 196 | program_name); | 196 | fprintf(stderr, "Performs a consistency check for MINIX filesystems.\n\n"); |
| 197 | fprintf(stderr, "OPTIONS:\n"); | ||
| 198 | fprintf(stderr, "\t-l\tLists all filenames\n"); | ||
| 199 | fprintf(stderr, "\t-r\tPerform interactive repairs\n"); | ||
| 200 | fprintf(stderr, "\t-a\tPerform automatic repairs\n"); | ||
| 201 | fprintf(stderr, "\t-v\tverbose\n"); | ||
| 202 | fprintf(stderr, "\t-s\tOutputs super-block information\n"); | ||
| 203 | fprintf(stderr, "\t-m\tActivates MINIX-like \"mode not cleared\" warnings\n"); | ||
| 204 | fprintf(stderr, "\t-f\tForce file system check.\n\n"); | ||
| 197 | leave(16); | 205 | leave(16); |
| 198 | } | 206 | } |
| 199 | 207 | ||
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index 926a023b4..b90d3a700 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c | |||
| @@ -171,10 +171,15 @@ static volatile void die(char *str) { | |||
| 171 | 171 | ||
| 172 | static volatile void show_usage() | 172 | static volatile void show_usage() |
| 173 | { | 173 | { |
| 174 | fprintf(stderr, "%s\n", program_name); | 174 | fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n", BB_VER, BB_BT); |
| 175 | fprintf(stderr, | 175 | fprintf(stderr, "Usage: %s [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]\n\n", program_name); |
| 176 | "Usage: %s [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]\n", | 176 | fprintf(stderr, "Make a MINIX filesystem.\n\n"); |
| 177 | program_name); | 177 | fprintf(stderr, "OPTIONS:\n"); |
| 178 | fprintf(stderr, "\t-c\t\tCheck the device for bad blocks\n"); | ||
| 179 | fprintf(stderr, "\t-n [14|30]\tSpecify the maximum length of filenames\n"); | ||
| 180 | fprintf(stderr, "\t-i\t\tSpecify the number of inodes for the filesystem\n"); | ||
| 181 | fprintf(stderr, "\t-l FILENAME\tRead the bad blocks list from FILENAME\n"); | ||
| 182 | fprintf(stderr, "\t-v\t\tMake a Minix version 2 filesystem\n\n"); | ||
| 178 | exit(16); | 183 | exit(16); |
| 179 | } | 184 | } |
| 180 | 185 | ||
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index fceeb28dd..601188f86 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c | |||
| @@ -47,11 +47,12 @@ | |||
| 47 | /* we also get PAGE_SIZE via getpagesize() */ | 47 | /* we also get PAGE_SIZE via getpagesize() */ |
| 48 | 48 | ||
| 49 | 49 | ||
| 50 | static const char mkswap_usage[] = "mkswap [-c] [-v0|-v1] device [block-count]\n" | 50 | static const char mkswap_usage[] = "mkswap [-c] [-v0|-v1] device [block-count]\n\n" |
| 51 | "Prepare a disk partition to be used as a swap partition.\n\n" | 51 | "Prepare a disk partition to be used as a swap partition.\n\n" |
| 52 | "\t-c\tCheck for read-ability.\n" | 52 | "Options:\n" |
| 53 | "\t-v0\tMake version 0 swap [max 128 Megs].\n" | 53 | "\t-c\t\tCheck for read-ability.\n" |
| 54 | "\t-v1\tMake version 1 swap [big!] (default for kernels > 2.1.117).\n" | 54 | "\t-v0\t\tMake version 0 swap [max 128 Megs].\n" |
| 55 | "\t-v1\t\tMake version 1 swap [big!] (default for kernels > 2.1.117).\n" | ||
| 55 | "\tblock-count\tNumber of block to use (default is entire partition).\n"; | 56 | "\tblock-count\tNumber of block to use (default is entire partition).\n"; |
| 56 | 57 | ||
| 57 | 58 | ||
diff --git a/util-linux/more.c b/util-linux/more.c index 469316128..515857e0f 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | #include <signal.h> | 37 | #include <signal.h> |
| 38 | #include <sys/ioctl.h> | 38 | #include <sys/ioctl.h> |
| 39 | 39 | ||
| 40 | static const char more_usage[] = "[file ...]"; | 40 | static const char more_usage[] = "more [file ...]\n"; |
| 41 | 41 | ||
| 42 | /* ED: sparc termios is broken: revert back to old termio handling. */ | 42 | /* ED: sparc termios is broken: revert back to old termio handling. */ |
| 43 | #ifdef BB_FEATURE_USE_TERMIOS | 43 | #ifdef BB_FEATURE_USE_TERMIOS |
diff --git a/util-linux/mount.c b/util-linux/mount.c index 4c085d01b..827a56f0a 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | 43 | ||
| 44 | extern const char mtab_file[]; /* Defined in utility.c */ | 44 | extern const char mtab_file[]; /* Defined in utility.c */ |
| 45 | 45 | ||
| 46 | static const char mount_usage[] = "Usage:\tmount [flags]\n" | 46 | static const char mount_usage[] = "\tmount [flags]\n" |
| 47 | "\tmount [flags] device directory [-o options,more-options]\n" | 47 | "\tmount [flags] device directory [-o options,more-options]\n" |
| 48 | "\n" | 48 | "\n" |
| 49 | "Flags:\n" | 49 | "Flags:\n" |
| @@ -248,8 +248,7 @@ extern int mount_main (int argc, char **argv) | |||
| 248 | while (i>0 && *++(*argv)) switch (**argv) { | 248 | while (i>0 && *++(*argv)) switch (**argv) { |
| 249 | case 'o': | 249 | case 'o': |
| 250 | if (--i == 0) { | 250 | if (--i == 0) { |
| 251 | fprintf (stderr, "%s\n", mount_usage); | 251 | goto goodbye; |
| 252 | exit( FALSE); | ||
| 253 | } | 252 | } |
| 254 | parse_mount_options (*(++argv), &flags, string_flags); | 253 | parse_mount_options (*(++argv), &flags, string_flags); |
| 255 | --i; | 254 | --i; |
| @@ -260,8 +259,7 @@ extern int mount_main (int argc, char **argv) | |||
| 260 | break; | 259 | break; |
| 261 | case 't': | 260 | case 't': |
| 262 | if (--i == 0) { | 261 | if (--i == 0) { |
| 263 | fprintf (stderr, "%s\n", mount_usage); | 262 | goto goodbye; |
| 264 | exit( FALSE); | ||
| 265 | } | 263 | } |
| 266 | filesystemType = *(++argv); | 264 | filesystemType = *(++argv); |
| 267 | --i; | 265 | --i; |
| @@ -284,9 +282,7 @@ extern int mount_main (int argc, char **argv) | |||
| 284 | case 'v': | 282 | case 'v': |
| 285 | case 'h': | 283 | case 'h': |
| 286 | case '-': | 284 | case '-': |
| 287 | fprintf (stderr, "%s\n", mount_usage); | 285 | goto goodbye; |
| 288 | exit( TRUE); | ||
| 289 | break; | ||
| 290 | } | 286 | } |
| 291 | } else { | 287 | } else { |
| 292 | if (device == NULL) | 288 | if (device == NULL) |
| @@ -294,8 +290,7 @@ extern int mount_main (int argc, char **argv) | |||
| 294 | else if (directory == NULL) | 290 | else if (directory == NULL) |
| 295 | directory=*argv; | 291 | directory=*argv; |
| 296 | else { | 292 | else { |
| 297 | fprintf (stderr, "%s\n", mount_usage); | 293 | goto goodbye; |
| 298 | exit( TRUE); | ||
| 299 | } | 294 | } |
| 300 | } | 295 | } |
| 301 | i--; | 296 | i--; |
| @@ -331,9 +326,11 @@ extern int mount_main (int argc, char **argv) | |||
| 331 | exit (mount_one (device, directory, filesystemType, | 326 | exit (mount_one (device, directory, filesystemType, |
| 332 | flags, string_flags, useMtab, fakeIt)); | 327 | flags, string_flags, useMtab, fakeIt)); |
| 333 | } else { | 328 | } else { |
| 334 | fprintf (stderr, "%s\n", mount_usage); | 329 | goto goodbye; |
| 335 | exit( FALSE); | ||
| 336 | } | 330 | } |
| 337 | } | 331 | } |
| 338 | exit( TRUE); | 332 | exit( TRUE); |
| 333 | |||
| 334 | goodbye: | ||
| 335 | usage( mount_usage); | ||
| 339 | } | 336 | } |
diff --git a/util-linux/umount.c b/util-linux/umount.c index 89c59f9ee..0d105d9c1 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c | |||
| @@ -29,8 +29,8 @@ | |||
| 29 | #include <errno.h> | 29 | #include <errno.h> |
| 30 | 30 | ||
| 31 | static const char umount_usage[] = | 31 | static const char umount_usage[] = |
| 32 | "Usage: umount [flags] filesystem|directory\n" | 32 | "Usage: umount [flags] filesystem|directory\n\n" |
| 33 | "Optional Flags:\n" | 33 | "Flags:\n" |
| 34 | "\t-a:\tUnmount all file systems" | 34 | "\t-a:\tUnmount all file systems" |
| 35 | #ifdef BB_MTAB | 35 | #ifdef BB_MTAB |
| 36 | " in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries\n" | 36 | " in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries\n" |
| @@ -108,7 +108,7 @@ umount_main(int argc, char** argv) | |||
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | /* Parse any options */ | 110 | /* Parse any options */ |
| 111 | while (argc-- > 0 && **(argv++) == '-') { | 111 | while (--argc > 0 && **(++argv) == '-') { |
| 112 | while (*++(*argv)) switch (**argv) { | 112 | while (*++(*argv)) switch (**argv) { |
| 113 | case 'a': | 113 | case 'a': |
| 114 | umountAll = TRUE; | 114 | umountAll = TRUE; |
