aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fbset.c16
-rw-r--r--util-linux/fdflush.c6
-rw-r--r--util-linux/freeramdisk.c7
-rw-r--r--util-linux/fsck_minix.c6
-rw-r--r--util-linux/mkfs_minix.c6
-rw-r--r--util-linux/mkswap.c9
-rw-r--r--util-linux/more.c11
-rw-r--r--util-linux/mount.c18
-rw-r--r--util-linux/swaponoff.c18
-rw-r--r--util-linux/umount.c7
10 files changed, 71 insertions, 33 deletions
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index 4e5609e41..de4c82425 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -105,9 +105,9 @@ struct cmdoptions_t {
105 "-vsync", 1, CMD_VSYNC}, { 105 "-vsync", 1, CMD_VSYNC}, {
106 "-laced", 1, CMD_LACED}, { 106 "-laced", 1, CMD_LACED}, {
107 "-double", 1, CMD_DOUBLE}, { 107 "-double", 1, CMD_DOUBLE}, {
108 "--help", 0, CMD_HELP}, { 108 "-help", 0, CMD_HELP}, {
109#ifdef BB_FEATURE_FBSET_FANCY 109#ifdef BB_FEATURE_FBSET_FANCY
110 "--help", 0, CMD_HELP}, { 110 "-help", 0, CMD_HELP}, {
111 "-all", 0, CMD_ALL}, { 111 "-all", 0, CMD_ALL}, {
112 "-xres", 1, CMD_XRES}, { 112 "-xres", 1, CMD_XRES}, {
113 "-yres", 1, CMD_YRES}, { 113 "-yres", 1, CMD_YRES}, {
@@ -115,7 +115,7 @@ struct cmdoptions_t {
115 "-vyres", 1, CMD_VYRES}, { 115 "-vyres", 1, CMD_VYRES}, {
116 "-depth", 1, CMD_DEPTH}, { 116 "-depth", 1, CMD_DEPTH}, {
117 "-match", 0, CMD_MATCH}, { 117 "-match", 0, CMD_MATCH}, {
118 "--geometry", 5, CMD_GEOMETRY}, { 118 "-geometry", 5, CMD_GEOMETRY}, {
119 "-pixclock", 1, CMD_PIXCLOCK}, { 119 "-pixclock", 1, CMD_PIXCLOCK}, {
120 "-left", 1, CMD_LEFT}, { 120 "-left", 1, CMD_LEFT}, {
121 "-right", 1, CMD_RIGHT}, { 121 "-right", 1, CMD_RIGHT}, {
@@ -123,7 +123,7 @@ struct cmdoptions_t {
123 "-lower", 1, CMD_LOWER}, { 123 "-lower", 1, CMD_LOWER}, {
124 "-hslen", 1, CMD_HSLEN}, { 124 "-hslen", 1, CMD_HSLEN}, {
125 "-vslen", 1, CMD_VSLEN}, { 125 "-vslen", 1, CMD_VSLEN}, {
126 "--timings", 7, CMD_TIMING}, { 126 "-timings", 7, CMD_TIMING}, {
127 "-csync", 1, CMD_CSYNC}, { 127 "-csync", 1, CMD_CSYNC}, {
128 "-gsync", 1, CMD_GSYNC}, { 128 "-gsync", 1, CMD_GSYNC}, {
129 "-extsync", 1, CMD_EXTSYNC}, { 129 "-extsync", 1, CMD_EXTSYNC}, {
@@ -221,17 +221,21 @@ static void showmode(struct fb_var_screeninfo *v)
221 221
222static void fbset_usage(void) 222static void fbset_usage(void)
223{ 223{
224#ifndef BB_FEATURE_TRIVIAL_HELP
224 int i; 225 int i;
226#endif
225 227
226#ifndef STANDALONE 228#ifndef STANDALONE
227 fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n", 229 fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n",
228 BB_VER, BB_BT); 230 BB_VER, BB_BT);
229#endif 231#endif
230 fprintf(stderr, "Usage: fbset [options] [mode]\n\n"); 232 fprintf(stderr, "Usage: fbset [options] [mode]\n");
231 fprintf(stderr, "Show and modify frame buffer device settings\n\n"); 233#ifndef BB_FEATURE_TRIVIAL_HELP
234 fprintf(stderr, "\nShows and modifies frame buffer device settings\n\n");
232 fprintf(stderr, "The following options are recognized:\n"); 235 fprintf(stderr, "The following options are recognized:\n");
233 for (i = 0; g_cmdoptions[i].name; i++) 236 for (i = 0; g_cmdoptions[i].name; i++)
234 fprintf(stderr, "\t%s\n", g_cmdoptions[i].name); 237 fprintf(stderr, "\t%s\n", g_cmdoptions[i].name);
238#endif
235 exit(-1); 239 exit(-1);
236} 240}
237 241
diff --git a/util-linux/fdflush.c b/util-linux/fdflush.c
index 56ea2244d..4ec0a8886 100644
--- a/util-linux/fdflush.c
+++ b/util-linux/fdflush.c
@@ -34,7 +34,11 @@ extern int fdflush_main(int argc, char **argv)
34 int fd; 34 int fd;
35 35
36 if (argc <= 1 || **(++argv) == '-') { 36 if (argc <= 1 || **(++argv) == '-') {
37 usage("fdflush device\n\nForce floppy disk drive to detect disk change\n"); 37 usage("fdflush DEVICE\n"
38#ifndef BB_FEATURE_TRIVIAL_HELP
39 "\nForces floppy disk drive to detect disk change\n"
40#endif
41 );
38 } 42 }
39 43
40 fd = open(*argv, 0); 44 fd = open(*argv, 0);
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c
index d373bcbf7..4106cf144 100644
--- a/util-linux/freeramdisk.c
+++ b/util-linux/freeramdisk.c
@@ -34,8 +34,11 @@
34 34
35 35
36static const char freeramdisk_usage[] = 36static const char freeramdisk_usage[] =
37 "freeramdisk DEVICE\n\n" 37 "freeramdisk DEVICE\n"
38 "Free all memory used by the specified ramdisk.\n"; 38#ifndef BB_FEATURE_TRIVIAL_HELP
39 "\nFrees all memory used by the specified ramdisk.\n"
40#endif
41 ;
39 42
40extern int 43extern int
41freeramdisk_main(int argc, char **argv) 44freeramdisk_main(int argc, char **argv)
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index c890dff7d..7d27566b8 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -198,9 +198,10 @@ static void show_usage(void)
198{ 198{
199 fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n", 199 fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n",
200 BB_VER, BB_BT); 200 BB_VER, BB_BT);
201 fprintf(stderr, "Usage: %s [-larvsmf] /dev/name\n\n", program_name); 201 fprintf(stderr, "Usage: %s [-larvsmf] /dev/name\n", program_name);
202#ifndef BB_FEATURE_TRIVIAL_HELP
202 fprintf(stderr, 203 fprintf(stderr,
203 "Performs a consistency check for MINIX filesystems.\n\n"); 204 "\nPerforms a consistency check for MINIX filesystems.\n\n");
204 fprintf(stderr, "OPTIONS:\n"); 205 fprintf(stderr, "OPTIONS:\n");
205 fprintf(stderr, "\t-l\tLists all filenames\n"); 206 fprintf(stderr, "\t-l\tLists all filenames\n");
206 fprintf(stderr, "\t-r\tPerform interactive repairs\n"); 207 fprintf(stderr, "\t-r\tPerform interactive repairs\n");
@@ -210,6 +211,7 @@ static void show_usage(void)
210 fprintf(stderr, 211 fprintf(stderr,
211 "\t-m\tActivates MINIX-like \"mode not cleared\" warnings\n"); 212 "\t-m\tActivates MINIX-like \"mode not cleared\" warnings\n");
212 fprintf(stderr, "\t-f\tForce file system check.\n\n"); 213 fprintf(stderr, "\t-f\tForce file system check.\n\n");
214#endif
213 leave(16); 215 leave(16);
214} 216}
215 217
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index be180a46b..bf4bda9fd 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -179,9 +179,10 @@ static volatile void show_usage()
179 fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n", 179 fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n\n",
180 BB_VER, BB_BT); 180 BB_VER, BB_BT);
181 fprintf(stderr, 181 fprintf(stderr,
182 "Usage: %s [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]\n\n", 182 "Usage: %s [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]\n",
183 program_name); 183 program_name);
184 fprintf(stderr, "Make a MINIX filesystem.\n\n"); 184#ifndef BB_FEATURE_TRIVIAL_HELP
185 fprintf(stderr, "\nMake a MINIX filesystem.\n\n");
185 fprintf(stderr, "OPTIONS:\n"); 186 fprintf(stderr, "OPTIONS:\n");
186 fprintf(stderr, "\t-c\t\tCheck the device for bad blocks\n"); 187 fprintf(stderr, "\t-c\t\tCheck the device for bad blocks\n");
187 fprintf(stderr, 188 fprintf(stderr,
@@ -191,6 +192,7 @@ static volatile void show_usage()
191 fprintf(stderr, 192 fprintf(stderr,
192 "\t-l FILENAME\tRead the bad blocks list from FILENAME\n"); 193 "\t-l FILENAME\tRead the bad blocks list from FILENAME\n");
193 fprintf(stderr, "\t-v\t\tMake a Minix version 2 filesystem\n\n"); 194 fprintf(stderr, "\t-v\t\tMake a Minix version 2 filesystem\n\n");
195#endif
194 exit(16); 196 exit(16);
195} 197}
196 198
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index 17866a735..7d76916f0 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -49,13 +49,16 @@
49 49
50 50
51static const char mkswap_usage[] = 51static const char mkswap_usage[] =
52 "mkswap [-c] [-v0|-v1] device [block-count]\n\n" 52 "mkswap [-c] [-v0|-v1] device [block-count]\n"
53 "Prepare a disk partition to be used as a swap partition.\n\n" 53#ifndef BB_FEATURE_TRIVIAL_HELP
54 "\nPrepare a disk partition to be used as a swap partition.\n\n"
54 "Options:\n" "\t-c\t\tCheck for read-ability.\n" 55 "Options:\n" "\t-c\t\tCheck for read-ability.\n"
55 "\t-v0\t\tMake version 0 swap [max 128 Megs].\n" 56 "\t-v0\t\tMake version 0 swap [max 128 Megs].\n"
56 "\t-v1\t\tMake version 1 swap [big!] (default for kernels > 2.1.117).\n" 57 "\t-v1\t\tMake version 1 swap [big!] (default for kernels > 2.1.117).\n"
57 58
58 "\tblock-count\tNumber of block to use (default is entire partition).\n"; 59 "\tblock-count\tNumber of block to use (default is entire partition).\n"
60#endif
61 ;
59 62
60 63
61#ifndef _IO 64#ifndef _IO
diff --git a/util-linux/more.c b/util-linux/more.c
index 30d2757cd..50446861e 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -30,8 +30,15 @@
30#include <fcntl.h> 30#include <fcntl.h>
31#include <signal.h> 31#include <signal.h>
32#include <sys/ioctl.h> 32#include <sys/ioctl.h>
33#define BB_DECLARE_EXTERN
34#define bb_need_help
35#include "messages.c"
33 36
34static const char more_usage[] = "more [file ...]\n"; 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 ;
35 42
36/* ED: sparc termios is broken: revert back to old termio handling. */ 43/* ED: sparc termios is broken: revert back to old termio handling. */
37#ifdef BB_FEATURE_USE_TERMIOS 44#ifdef BB_FEATURE_USE_TERMIOS
@@ -92,7 +99,7 @@ extern int more_main(int argc, char **argv)
92 argv++; 99 argv++;
93 100
94 if (argc > 0 101 if (argc > 0
95 && (strcmp(*argv, "--help") == 0 || strcmp(*argv, "-h") == 0)) { 102 && (strcmp(*argv, dash_dash_help) == 0 || strcmp(*argv, "-h") == 0)) {
96 usage(more_usage); 103 usage(more_usage);
97 } 104 }
98 do { 105 do {
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 00a774a53..bde55d155 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -64,10 +64,12 @@ static int use_loop = FALSE;
64 64
65extern const char mtab_file[]; /* Defined in utility.c */ 65extern const char mtab_file[]; /* Defined in utility.c */
66 66
67static const char mount_usage[] = "\tmount [flags]\n" 67static const char mount_usage[] =
68 "\tmount [flags] device directory [-o options,more-options]\n" 68 "mount [flags] device directory [-o options,more-options]\n"
69 "\n" "Flags:\n" 69#ifndef BB_FEATURE_TRIVIAL_HELP
70 "\t-a:\t\tMount all file systems in fstab.\n" 70 "\nMount a filesystem\n\n"
71 "Flags:\n"
72 "\t-a:\t\tMount all filesystems in fstab.\n"
71#ifdef BB_MTAB 73#ifdef BB_MTAB
72 "\t-f:\t\t\"Fake\" mount. Add entry to mount table but don't mount it.\n" 74 "\t-f:\t\t\"Fake\" mount. Add entry to mount table but don't mount it.\n"
73 "\t-n:\t\tDon't write a mount table entry.\n" 75 "\t-n:\t\tDon't write a mount table entry.\n"
@@ -88,8 +90,10 @@ static const char mount_usage[] = "\tmount [flags]\n"
88 "\tsuid/nosuid:\tAllow set-user-id-root programs / disallow them.\n" 90 "\tsuid/nosuid:\tAllow set-user-id-root programs / disallow them.\n"
89 "\tremount:\tRe-mount a currently-mounted filesystem, changing its flags.\n" 91 "\tremount:\tRe-mount a currently-mounted filesystem, changing its flags.\n"
90 "\tro/rw:\t\tMount for read-only / read-write.\n" 92 "\tro/rw:\t\tMount for read-only / read-write.\n"
91 "There are EVEN MORE flags that are specific to each filesystem.\n" 93 "\nThere are EVEN MORE flags that are specific to each filesystem.\n"
92 "You'll have to see the written documentation for those.\n"; 94 "You'll have to see the written documentation for those.\n"
95#endif
96 ;
93 97
94 98
95struct mount_options { 99struct mount_options {
@@ -451,7 +455,7 @@ extern int mount_main(int argc, char **argv)
451 fatalError( "\nCannot read /etc/fstab: %s\n", strerror (errno)); 455 fatalError( "\nCannot read /etc/fstab: %s\n", strerror (errno));
452 456
453 while ((m = getmntent(f)) != NULL) { 457 while ((m = getmntent(f)) != NULL) {
454 // If the file system isn't noauto, 458 // If the filesystem isn't noauto,
455 // and isn't swap or nfs, then mount it 459 // and isn't swap or nfs, then mount it
456 if ((!strstr(m->mnt_opts, "noauto")) && 460 if ((!strstr(m->mnt_opts, "noauto")) &&
457 (!strstr(m->mnt_type, "swap")) && 461 (!strstr(m->mnt_type, "swap")) &&
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index aa961dac9..0f8c4f5f3 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -36,16 +36,22 @@ static int whichApp;
36static const char *appName; 36static const char *appName;
37 37
38static const char swapoff_usage[] = 38static const char swapoff_usage[] =
39 "swapoff [OPTION] [device]\n\n" 39 "swapoff [OPTION] [device]\n"
40 "Stop swapping virtual memory pages on the given device.\n\n" 40#ifndef BB_FEATURE_TRIVIAL_HELP
41 "\nStop swapping virtual memory pages on the given device.\n\n"
41 "Options:\n" 42 "Options:\n"
42 "\t-a\tStop swapping on all swap devices\n"; 43 "\t-a\tStop swapping on all swap devices\n"
44#endif
45 ;
43 46
44static const char swapon_usage[] = 47static const char swapon_usage[] =
45 "swapon [OPTION] [device]\n\n" 48 "swapon [OPTION] [device]\n"
46 "Start swapping virtual memory pages on the given device.\n\n" 49#ifndef BB_FEATURE_TRIVIAL_HELP
50 "\nStart swapping virtual memory pages on the given device.\n\n"
47 "Options:\n" 51 "Options:\n"
48 "\t-a\tStart swapping on all swap devices\n"; 52 "\t-a\tStart swapping on all swap devices\n"
53#endif
54 ;
49 55
50 56
51#define SWAPON_APP 1 57#define SWAPON_APP 1
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 18a5afe80..86833b717 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -30,8 +30,10 @@
30 30
31 31
32static const char umount_usage[] = 32static const char umount_usage[] =
33 "umount [flags] filesystem|directory\n\n" 33 "umount [flags] filesystem|directory\n"
34 "Flags:\n" "\t-a:\tUnmount all file systems" 34#ifndef BB_FEATURE_TRIVIAL_HELP
35 "Unmount file systems\n"
36 "\nFlags:\n" "\t-a:\tUnmount all file systems"
35#ifdef BB_MTAB 37#ifdef BB_MTAB
36 " in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries\n" 38 " in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries\n"
37#else 39#else
@@ -44,6 +46,7 @@ static const char umount_usage[] =
44#if defined BB_FEATURE_MOUNT_LOOP 46#if defined BB_FEATURE_MOUNT_LOOP
45 "\t-l:\tDo not free loop device (if a loop device has been used)\n" 47 "\t-l:\tDo not free loop device (if a loop device has been used)\n"
46#endif 48#endif
49#endif
47; 50;
48 51
49struct _mtab_entry_t { 52struct _mtab_entry_t {