summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorMatt Kraai2000-07-16 20:57:15 +0000
committerMatt Kraai2000-07-16 20:57:15 +0000
commitbf181b9338152759fd56c8009e9a962a84808e7c (patch)
treee8c416c791c690f661c513340662e4e98ff3464a /util-linux
parent3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217 (diff)
downloadbusybox-bf181b9338152759fd56c8009e9a962a84808e7c.zip
busybox-bf181b9338152759fd56c8009e9a962a84808e7c.tar.gz
Extract usage information into a separate file.
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/dmesg.c10
-rw-r--r--util-linux/fdflush.c9
-rw-r--r--util-linux/freeramdisk.c8
-rw-r--r--util-linux/fsck_minix.c15
-rw-r--r--util-linux/mkfs_minix.c13
-rw-r--r--util-linux/mkswap.c14
-rw-r--r--util-linux/more.c6
-rw-r--r--util-linux/mount.c32
-rw-r--r--util-linux/swaponoff.c19
-rw-r--r--util-linux/umount.c22
10 files changed, 2 insertions, 146 deletions
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index 961e532..a8c61c7 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -32,16 +32,6 @@ static inline _syscall3(int, klogctl, int, type, char *, b, int, len);
# include <sys/klog.h>
#endif
-static const char dmesg_usage[] = "dmesg [-c] [-n LEVEL] [-s SIZE]\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nPrints or controls the kernel ring buffer\n\n"
- "Options:\n"
- "\t-c\t\tClears the ring buffer's contents after printing\n"
- "\t-n LEVEL\tSets console logging level\n"
- "\t-s SIZE\t\tUse a buffer of size SIZE\n"
-#endif
- ;
-
int dmesg_main(int argc, char **argv)
{
char *buf, c;
diff --git a/util-linux/fdflush.c b/util-linux/fdflush.c
index d993735..6bc3e7d 100644
--- a/util-linux/fdflush.c
+++ b/util-linux/fdflush.c
@@ -34,13 +34,8 @@ extern int fdflush_main(int argc, char **argv)
int value;
int fd;
- if (argc <= 1 || **(++argv) == '-') {
- usage("fdflush DEVICE\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nForces floppy disk drive to detect disk change\n"
-#endif
- );
- }
+ if (argc <= 1 || **(++argv) == '-')
+ usage(fdflush_usage);
fd = open(*argv, 0);
if (fd < 0) {
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c
index 927c169..2da2427 100644
--- a/util-linux/freeramdisk.c
+++ b/util-linux/freeramdisk.c
@@ -34,14 +34,6 @@
/* From linux/fs.h */
#define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */
-
-static const char freeramdisk_usage[] =
- "freeramdisk DEVICE\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nFrees all memory used by the specified ramdisk.\n"
-#endif
- ;
-
extern int
freeramdisk_main(int argc, char **argv)
{
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index ea27c23..5807b9a 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -288,21 +288,6 @@ static void leave(int status)
exit(status);
}
-const char fsck_minix_usage[] =
- "Usage: fsck.minix [-larvsmf] /dev/name\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "\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
- ;
-
static void show_usage(void)
{
usage(fsck_minix_usage);
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 9ae4b56..dec310d 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -267,19 +267,6 @@ 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()
{
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index 5a33945..eacd881 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -47,20 +47,6 @@
#include <asm/page.h> /* for PAGE_SIZE and PAGE_SHIFT */
/* we also get PAGE_SIZE via getpagesize() */
-
-static const char mkswap_usage[] =
- "mkswap [-c] [-v0|-v1] device [block-count]\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nPrepare a disk partition to be used as a swap partition.\n\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"
-#endif
- ;
-
-
#ifndef _IO
/* pre-1.3.45 */
#define BLKGETSIZE 0x1260
diff --git a/util-linux/more.c b/util-linux/more.c
index 91c2815..2334576 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -34,12 +34,6 @@
#define bb_need_help
#include "messages.c"
-static const char more_usage[] = "more [FILE ...]\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nMore is a filter for viewing FILE one screenful at a time.\n"
-#endif
- ;
-
/* ED: sparc termios is broken: revert back to old termio handling. */
#ifdef BB_FEATURE_USE_TERMIOS
# if #cpu(sparc)
diff --git a/util-linux/mount.c b/util-linux/mount.c
index addeb09..610d12d 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -80,38 +80,6 @@ extern int umount2 (__const char *__special_file, int __flags);
extern const char mtab_file[]; /* Defined in utility.c */
-static const char mount_usage[] =
- "mount [flags] device directory [-o options,more-options]\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nMount a filesystem\n\n"
- "Flags:\n"
- "\t-a:\t\tMount all filesystems in fstab.\n"
-#ifdef BB_MTAB
- "\t-f:\t\t\"Fake\" mount. Add entry to mount table but don't mount it.\n"
- "\t-n:\t\tDon't write a mount table entry.\n"
-#endif
- "\t-o option:\tOne of many filesystem options, listed below.\n"
- "\t-r:\t\tMount the filesystem read-only.\n"
- "\t-t fs-type:\tSpecify the filesystem type.\n"
- "\t-w:\t\tMount for reading and writing (default).\n"
- "\n"
- "Options for use with the \"-o\" flag:\n"
- "\tasync/sync:\tWrites are asynchronous / synchronous.\n"
- "\tatime/noatime:\tEnable / disable updates to inode access times.\n"
- "\tdev/nodev:\tAllow use of special device files / disallow them.\n"
- "\texec/noexec:\tAllow use of executable files / disallow them.\n"
-#if defined BB_FEATURE_MOUNT_LOOP
- "\tloop:\t\tMounts a file via loop device.\n"
-#endif
- "\tsuid/nosuid:\tAllow set-user-id-root programs / disallow them.\n"
- "\tremount:\tRe-mount a currently-mounted filesystem, changing its flags.\n"
- "\tro/rw:\t\tMount for read-only / read-write.\n"
- "\nThere are EVEN MORE flags that are specific to each filesystem.\n"
- "You'll have to see the written documentation for those.\n"
-#endif
- ;
-
-
struct mount_options {
const char *name;
unsigned long and;
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index a79b93a..6aafe51 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -35,25 +35,6 @@ _syscall1(int, swapoff, const char *, path);
static int whichApp;
-static const char swapoff_usage[] =
- "swapoff [OPTION] [device]\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nStop swapping virtual memory pages on the given device.\n\n"
- "Options:\n"
- "\t-a\tStop swapping on all swap devices\n"
-#endif
- ;
-
-static const char swapon_usage[] =
- "swapon [OPTION] [device]\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nStart swapping virtual memory pages on the given device.\n\n"
- "Options:\n"
- "\t-a\tStart swapping on all swap devices\n"
-#endif
- ;
-
-
#define SWAPON_APP 1
#define SWAPOFF_APP 2
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 1b250fd..df075f7 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -39,28 +39,6 @@ extern int mount (__const char *__special_file, __const char *__dir,
extern int umount (__const char *__special_file);
extern int umount2 (__const char *__special_file, int __flags);
-
-
-static const char umount_usage[] =
- "umount [flags] filesystem|directory\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "Unmount file systems\n"
- "\nFlags:\n" "\t-a:\tUnmount all file systems"
-#ifdef BB_MTAB
- " in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries\n"
-#else
- "\n"
-#endif
- "\t-r:\tTry to remount devices as read-only if mount is busy\n"
-#if defined BB_FEATURE_MOUNT_FORCE
- "\t-f:\tForce filesystem umount (i.e. unreachable NFS server)\n"
-#endif
-#if defined BB_FEATURE_MOUNT_LOOP
- "\t-l:\tDo not free loop device (if a loop device has been used)\n"
-#endif
-#endif
-;
-
struct _mtab_entry_t {
char *device;
char *mountpt;