aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
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 961e532b0..a8c61c7b4 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);
32# include <sys/klog.h> 32# include <sys/klog.h>
33#endif 33#endif
34 34
35static const char dmesg_usage[] = "dmesg [-c] [-n LEVEL] [-s SIZE]\n"
36#ifndef BB_FEATURE_TRIVIAL_HELP
37 "\nPrints or controls the kernel ring buffer\n\n"
38 "Options:\n"
39 "\t-c\t\tClears the ring buffer's contents after printing\n"
40 "\t-n LEVEL\tSets console logging level\n"
41 "\t-s SIZE\t\tUse a buffer of size SIZE\n"
42#endif
43 ;
44
45int dmesg_main(int argc, char **argv) 35int dmesg_main(int argc, char **argv)
46{ 36{
47 char *buf, c; 37 char *buf, c;
diff --git a/util-linux/fdflush.c b/util-linux/fdflush.c
index d9937355f..6bc3e7d66 100644
--- a/util-linux/fdflush.c
+++ b/util-linux/fdflush.c
@@ -34,13 +34,8 @@ extern int fdflush_main(int argc, char **argv)
34 int value; 34 int value;
35 int fd; 35 int fd;
36 36
37 if (argc <= 1 || **(++argv) == '-') { 37 if (argc <= 1 || **(++argv) == '-')
38 usage("fdflush DEVICE\n" 38 usage(fdflush_usage);
39#ifndef BB_FEATURE_TRIVIAL_HELP
40 "\nForces floppy disk drive to detect disk change\n"
41#endif
42 );
43 }
44 39
45 fd = open(*argv, 0); 40 fd = open(*argv, 0);
46 if (fd < 0) { 41 if (fd < 0) {
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c
index 927c16946..2da2427c1 100644
--- a/util-linux/freeramdisk.c
+++ b/util-linux/freeramdisk.c
@@ -34,14 +34,6 @@
34/* From linux/fs.h */ 34/* From linux/fs.h */
35#define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */ 35#define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */
36 36
37
38static const char freeramdisk_usage[] =
39 "freeramdisk DEVICE\n"
40#ifndef BB_FEATURE_TRIVIAL_HELP
41 "\nFrees all memory used by the specified ramdisk.\n"
42#endif
43 ;
44
45extern int 37extern int
46freeramdisk_main(int argc, char **argv) 38freeramdisk_main(int argc, char **argv)
47{ 39{
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index ea27c236c..5807b9af5 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -288,21 +288,6 @@ static void leave(int status)
288 exit(status); 288 exit(status);
289} 289}
290 290
291const char fsck_minix_usage[] =
292 "Usage: fsck.minix [-larvsmf] /dev/name\n"
293#ifndef BB_FEATURE_TRIVIAL_HELP
294 "\nPerforms a consistency check for MINIX filesystems.\n\n"
295 "Options:\n"
296 "\t-l\tLists all filenames\n"
297 "\t-r\tPerform interactive repairs\n"
298 "\t-a\tPerform automatic repairs\n"
299 "\t-v\tverbose\n"
300 "\t-s\tOutputs super-block information\n"
301 "\t-m\tActivates MINIX-like \"mode not cleared\" warnings\n"
302 "\t-f\tForce file system check.\n\n"
303#endif
304 ;
305
306static void show_usage(void) 291static void show_usage(void)
307{ 292{
308 usage(fsck_minix_usage); 293 usage(fsck_minix_usage);
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 9ae4b569c..dec310d30 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -267,19 +267,6 @@ static volatile void die(char *str)
267 exit(8); 267 exit(8);
268} 268}
269 269
270const char mkfs_minix_usage[] =
271 "mkfs.minix [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]\n"
272#ifndef BB_FEATURE_TRIVIAL_HELP
273 "\nMake a MINIX filesystem.\n\n"
274 "Options:\n"
275 "\t-c\t\tCheck the device for bad blocks\n"
276 "\t-n [14|30]\tSpecify the maximum length of filenames\n"
277 "\t-i INODES\tSpecify the number of inodes for the filesystem\n"
278 "\t-l FILENAME\tRead the bad blocks list from FILENAME\n"
279 "\t-v\t\tMake a Minix version 2 filesystem\n\n"
280#endif
281 ;
282
283static volatile void show_usage() __attribute__ ((noreturn)); 270static volatile void show_usage() __attribute__ ((noreturn));
284static volatile void show_usage() 271static volatile void show_usage()
285{ 272{
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index 5a33945c8..eacd8816c 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -47,20 +47,6 @@
47#include <asm/page.h> /* for PAGE_SIZE and PAGE_SHIFT */ 47#include <asm/page.h> /* for PAGE_SIZE and PAGE_SHIFT */
48 /* we also get PAGE_SIZE via getpagesize() */ 48 /* we also get PAGE_SIZE via getpagesize() */
49 49
50
51static const char mkswap_usage[] =
52 "mkswap [-c] [-v0|-v1] device [block-count]\n"
53#ifndef BB_FEATURE_TRIVIAL_HELP
54 "\nPrepare a disk partition to be used as a swap partition.\n\n"
55 "Options:\n" "\t-c\t\tCheck for read-ability.\n"
56 "\t-v0\t\tMake version 0 swap [max 128 Megs].\n"
57 "\t-v1\t\tMake version 1 swap [big!] (default for kernels > 2.1.117).\n"
58
59 "\tblock-count\tNumber of block to use (default is entire partition).\n"
60#endif
61 ;
62
63
64#ifndef _IO 50#ifndef _IO
65/* pre-1.3.45 */ 51/* pre-1.3.45 */
66#define BLKGETSIZE 0x1260 52#define BLKGETSIZE 0x1260
diff --git a/util-linux/more.c b/util-linux/more.c
index 91c281563..2334576c0 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -34,12 +34,6 @@
34#define bb_need_help 34#define bb_need_help
35#include "messages.c" 35#include "messages.c"
36 36
37static const char more_usage[] = "more [FILE ...]\n"
38#ifndef BB_FEATURE_TRIVIAL_HELP
39 "\nMore is a filter for viewing FILE one screenful at a time.\n"
40#endif
41 ;
42
43/* ED: sparc termios is broken: revert back to old termio handling. */ 37/* ED: sparc termios is broken: revert back to old termio handling. */
44#ifdef BB_FEATURE_USE_TERMIOS 38#ifdef BB_FEATURE_USE_TERMIOS
45# if #cpu(sparc) 39# if #cpu(sparc)
diff --git a/util-linux/mount.c b/util-linux/mount.c
index addeb0925..610d12d34 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -80,38 +80,6 @@ extern int umount2 (__const char *__special_file, int __flags);
80 80
81extern const char mtab_file[]; /* Defined in utility.c */ 81extern const char mtab_file[]; /* Defined in utility.c */
82 82
83static const char mount_usage[] =
84 "mount [flags] device directory [-o options,more-options]\n"
85#ifndef BB_FEATURE_TRIVIAL_HELP
86 "\nMount a filesystem\n\n"
87 "Flags:\n"
88 "\t-a:\t\tMount all filesystems in fstab.\n"
89#ifdef BB_MTAB
90 "\t-f:\t\t\"Fake\" mount. Add entry to mount table but don't mount it.\n"
91 "\t-n:\t\tDon't write a mount table entry.\n"
92#endif
93 "\t-o option:\tOne of many filesystem options, listed below.\n"
94 "\t-r:\t\tMount the filesystem read-only.\n"
95 "\t-t fs-type:\tSpecify the filesystem type.\n"
96 "\t-w:\t\tMount for reading and writing (default).\n"
97 "\n"
98 "Options for use with the \"-o\" flag:\n"
99 "\tasync/sync:\tWrites are asynchronous / synchronous.\n"
100 "\tatime/noatime:\tEnable / disable updates to inode access times.\n"
101 "\tdev/nodev:\tAllow use of special device files / disallow them.\n"
102 "\texec/noexec:\tAllow use of executable files / disallow them.\n"
103#if defined BB_FEATURE_MOUNT_LOOP
104 "\tloop:\t\tMounts a file via loop device.\n"
105#endif
106 "\tsuid/nosuid:\tAllow set-user-id-root programs / disallow them.\n"
107 "\tremount:\tRe-mount a currently-mounted filesystem, changing its flags.\n"
108 "\tro/rw:\t\tMount for read-only / read-write.\n"
109 "\nThere are EVEN MORE flags that are specific to each filesystem.\n"
110 "You'll have to see the written documentation for those.\n"
111#endif
112 ;
113
114
115struct mount_options { 83struct mount_options {
116 const char *name; 84 const char *name;
117 unsigned long and; 85 unsigned long and;
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index a79b93a23..6aafe51a2 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -35,25 +35,6 @@ _syscall1(int, swapoff, const char *, path);
35 35
36static int whichApp; 36static int whichApp;
37 37
38static const char swapoff_usage[] =
39 "swapoff [OPTION] [device]\n"
40#ifndef BB_FEATURE_TRIVIAL_HELP
41 "\nStop swapping virtual memory pages on the given device.\n\n"
42 "Options:\n"
43 "\t-a\tStop swapping on all swap devices\n"
44#endif
45 ;
46
47static const char swapon_usage[] =
48 "swapon [OPTION] [device]\n"
49#ifndef BB_FEATURE_TRIVIAL_HELP
50 "\nStart swapping virtual memory pages on the given device.\n\n"
51 "Options:\n"
52 "\t-a\tStart swapping on all swap devices\n"
53#endif
54 ;
55
56
57#define SWAPON_APP 1 38#define SWAPON_APP 1
58#define SWAPOFF_APP 2 39#define SWAPOFF_APP 2
59 40
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 1b250fd3a..df075f7d9 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,
39extern int umount (__const char *__special_file); 39extern int umount (__const char *__special_file);
40extern int umount2 (__const char *__special_file, int __flags); 40extern int umount2 (__const char *__special_file, int __flags);
41 41
42
43
44static const char umount_usage[] =
45 "umount [flags] filesystem|directory\n"
46#ifndef BB_FEATURE_TRIVIAL_HELP
47 "Unmount file systems\n"
48 "\nFlags:\n" "\t-a:\tUnmount all file systems"
49#ifdef BB_MTAB
50 " in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries\n"
51#else
52 "\n"
53#endif
54 "\t-r:\tTry to remount devices as read-only if mount is busy\n"
55#if defined BB_FEATURE_MOUNT_FORCE
56 "\t-f:\tForce filesystem umount (i.e. unreachable NFS server)\n"
57#endif
58#if defined BB_FEATURE_MOUNT_LOOP
59 "\t-l:\tDo not free loop device (if a loop device has been used)\n"
60#endif
61#endif
62;
63
64struct _mtab_entry_t { 42struct _mtab_entry_t {
65 char *device; 43 char *device;
66 char *mountpt; 44 char *mountpt;