diff options
author | Ron Yorston <rmy@pobox.com> | 2012-03-22 15:41:00 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2012-03-22 15:41:00 +0000 |
commit | 1118c95535ea51961437089fc3dece5ab4ea7e1b (patch) | |
tree | 1515bd2376a6d6c5123791662307ce2ed90cdf36 /coreutils | |
parent | 0d8b2c4a929ea9d3ac37499319fe0d8e7941a0c2 (diff) | |
parent | 066f39956641300c1e5c6bfe6c11a115cea3e2cf (diff) | |
download | busybox-w32-1118c95535ea51961437089fc3dece5ab4ea7e1b.tar.gz busybox-w32-1118c95535ea51961437089fc3dece5ab4ea7e1b.tar.bz2 busybox-w32-1118c95535ea51961437089fc3dece5ab4ea7e1b.zip |
Merge commit '066f39956641300c1e5c6bfe6c11a115cea3e2cf' into merge
Conflicts:
procps/ps.c
Diffstat (limited to 'coreutils')
51 files changed, 78 insertions, 93 deletions
diff --git a/coreutils/Config.src b/coreutils/Config.src index 2769aa07d..dcb5add8f 100644 --- a/coreutils/Config.src +++ b/coreutils/Config.src | |||
@@ -276,12 +276,6 @@ config HOSTID | |||
276 | hostid prints the numeric identifier (in hexadecimal) for | 276 | hostid prints the numeric identifier (in hexadecimal) for |
277 | the current host. | 277 | the current host. |
278 | 278 | ||
279 | config ID | ||
280 | bool "id" | ||
281 | default y | ||
282 | help | ||
283 | id displays the current user and group ID names. | ||
284 | |||
285 | config INSTALL | 279 | config INSTALL |
286 | bool "install" | 280 | bool "install" |
287 | default y | 281 | default y |
diff --git a/coreutils/Kbuild.src b/coreutils/Kbuild.src index 6a41c8318..0681e44b0 100644 --- a/coreutils/Kbuild.src +++ b/coreutils/Kbuild.src | |||
@@ -37,7 +37,6 @@ lib-$(CONFIG_FOLD) += fold.o | |||
37 | lib-$(CONFIG_FSYNC) += fsync.o | 37 | lib-$(CONFIG_FSYNC) += fsync.o |
38 | lib-$(CONFIG_HEAD) += head.o | 38 | lib-$(CONFIG_HEAD) += head.o |
39 | lib-$(CONFIG_HOSTID) += hostid.o | 39 | lib-$(CONFIG_HOSTID) += hostid.o |
40 | lib-$(CONFIG_ID) += id.o | ||
41 | lib-$(CONFIG_INSTALL) += install.o | 40 | lib-$(CONFIG_INSTALL) += install.o |
42 | #lib-$(CONFIG_LENGTH) += length.o | 41 | #lib-$(CONFIG_LENGTH) += length.o |
43 | lib-$(CONFIG_LN) += ln.o | 42 | lib-$(CONFIG_LN) += ln.o |
diff --git a/coreutils/cal.c b/coreutils/cal.c index ef1c29bb9..b470ad968 100644 --- a/coreutils/cal.c +++ b/coreutils/cal.c | |||
@@ -21,7 +21,6 @@ | |||
21 | //usage: "[-jy] [[MONTH] YEAR]" | 21 | //usage: "[-jy] [[MONTH] YEAR]" |
22 | //usage:#define cal_full_usage "\n\n" | 22 | //usage:#define cal_full_usage "\n\n" |
23 | //usage: "Display a calendar\n" | 23 | //usage: "Display a calendar\n" |
24 | //usage: "\nOptions:" | ||
25 | //usage: "\n -j Use julian dates" | 24 | //usage: "\n -j Use julian dates" |
26 | //usage: "\n -y Display the entire year" | 25 | //usage: "\n -y Display the entire year" |
27 | 26 | ||
diff --git a/coreutils/catv.c b/coreutils/catv.c index 37c7ed2d1..214b4311a 100644 --- a/coreutils/catv.c +++ b/coreutils/catv.c | |||
@@ -14,7 +14,6 @@ | |||
14 | //usage: "[-etv] [FILE]..." | 14 | //usage: "[-etv] [FILE]..." |
15 | //usage:#define catv_full_usage "\n\n" | 15 | //usage:#define catv_full_usage "\n\n" |
16 | //usage: "Display nonprinting characters as ^x or M-x\n" | 16 | //usage: "Display nonprinting characters as ^x or M-x\n" |
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -e End each line with $" | 17 | //usage: "\n -e End each line with $" |
19 | //usage: "\n -t Show tabs as ^I" | 18 | //usage: "\n -t Show tabs as ^I" |
20 | //usage: "\n -v Don't use ^x or M-x escapes" | 19 | //usage: "\n -v Don't use ^x or M-x escapes" |
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c index bc9608362..7076db62f 100644 --- a/coreutils/chgrp.c +++ b/coreutils/chgrp.c | |||
@@ -15,7 +15,6 @@ | |||
15 | //usage: "[-RhLHP"IF_DESKTOP("cvf")"]... GROUP FILE..." | 15 | //usage: "[-RhLHP"IF_DESKTOP("cvf")"]... GROUP FILE..." |
16 | //usage:#define chgrp_full_usage "\n\n" | 16 | //usage:#define chgrp_full_usage "\n\n" |
17 | //usage: "Change the group membership of each FILE to GROUP\n" | 17 | //usage: "Change the group membership of each FILE to GROUP\n" |
18 | //usage: "\nOptions:" | ||
19 | //usage: "\n -R Recurse" | 18 | //usage: "\n -R Recurse" |
20 | //usage: "\n -h Affect symlinks instead of symlink targets" | 19 | //usage: "\n -h Affect symlinks instead of symlink targets" |
21 | //usage: "\n -L Traverse all symlinks to directories" | 20 | //usage: "\n -L Traverse all symlinks to directories" |
diff --git a/coreutils/chmod.c b/coreutils/chmod.c index 0bcd6bb66..5ee45b942 100644 --- a/coreutils/chmod.c +++ b/coreutils/chmod.c | |||
@@ -19,7 +19,6 @@ | |||
19 | //usage:#define chmod_full_usage "\n\n" | 19 | //usage:#define chmod_full_usage "\n\n" |
20 | //usage: "Each MODE is one or more of the letters ugoa, one of the\n" | 20 | //usage: "Each MODE is one or more of the letters ugoa, one of the\n" |
21 | //usage: "symbols +-= and one or more of the letters rwxst\n" | 21 | //usage: "symbols +-= and one or more of the letters rwxst\n" |
22 | //usage: "\nOptions:" | ||
23 | //usage: "\n -R Recurse" | 22 | //usage: "\n -R Recurse" |
24 | //usage: IF_DESKTOP( | 23 | //usage: IF_DESKTOP( |
25 | //usage: "\n -c List changed files" | 24 | //usage: "\n -c List changed files" |
diff --git a/coreutils/chown.c b/coreutils/chown.c index c4c182d3c..bb166d8fe 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c | |||
@@ -14,7 +14,6 @@ | |||
14 | //usage: "[-RhLHP"IF_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..." | 14 | //usage: "[-RhLHP"IF_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..." |
15 | //usage:#define chown_full_usage "\n\n" | 15 | //usage:#define chown_full_usage "\n\n" |
16 | //usage: "Change the owner and/or group of each FILE to OWNER and/or GROUP\n" | 16 | //usage: "Change the owner and/or group of each FILE to OWNER and/or GROUP\n" |
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -R Recurse" | 17 | //usage: "\n -R Recurse" |
19 | //usage: "\n -h Affect symlinks instead of symlink targets" | 18 | //usage: "\n -h Affect symlinks instead of symlink targets" |
20 | //usage: "\n -L Traverse all symlinks to directories" | 19 | //usage: "\n -L Traverse all symlinks to directories" |
diff --git a/coreutils/comm.c b/coreutils/comm.c index 7da6b25f9..cd450950b 100644 --- a/coreutils/comm.c +++ b/coreutils/comm.c | |||
@@ -11,7 +11,6 @@ | |||
11 | //usage: "[-123] FILE1 FILE2" | 11 | //usage: "[-123] FILE1 FILE2" |
12 | //usage:#define comm_full_usage "\n\n" | 12 | //usage:#define comm_full_usage "\n\n" |
13 | //usage: "Compare FILE1 with FILE2\n" | 13 | //usage: "Compare FILE1 with FILE2\n" |
14 | //usage: "\nOptions:" | ||
15 | //usage: "\n -1 Suppress lines unique to FILE1" | 14 | //usage: "\n -1 Suppress lines unique to FILE1" |
16 | //usage: "\n -2 Suppress lines unique to FILE2" | 15 | //usage: "\n -2 Suppress lines unique to FILE2" |
17 | //usage: "\n -3 Suppress lines common to both files" | 16 | //usage: "\n -3 Suppress lines common to both files" |
diff --git a/coreutils/cp.c b/coreutils/cp.c index c35dc2872..f276d25d7 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c | |||
@@ -19,7 +19,6 @@ | |||
19 | //usage: "[OPTIONS] SOURCE DEST" | 19 | //usage: "[OPTIONS] SOURCE DEST" |
20 | //usage:#define cp_full_usage "\n\n" | 20 | //usage:#define cp_full_usage "\n\n" |
21 | //usage: "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n" | 21 | //usage: "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n" |
22 | //usage: "\nOptions:" | ||
23 | //usage: "\n -a Same as -dpR" | 22 | //usage: "\n -a Same as -dpR" |
24 | //usage: IF_SELINUX( | 23 | //usage: IF_SELINUX( |
25 | //usage: "\n -c Preserve security context" | 24 | //usage: "\n -c Preserve security context" |
diff --git a/coreutils/cut.c b/coreutils/cut.c index dfa1833b4..2c27b704f 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c | |||
@@ -13,7 +13,6 @@ | |||
13 | //usage: "[OPTIONS] [FILE]..." | 13 | //usage: "[OPTIONS] [FILE]..." |
14 | //usage:#define cut_full_usage "\n\n" | 14 | //usage:#define cut_full_usage "\n\n" |
15 | //usage: "Print selected fields from each input FILE to stdout\n" | 15 | //usage: "Print selected fields from each input FILE to stdout\n" |
16 | //usage: "\nOptions:" | ||
17 | //usage: "\n -b LIST Output only bytes from LIST" | 16 | //usage: "\n -b LIST Output only bytes from LIST" |
18 | //usage: "\n -c LIST Output only characters from LIST" | 17 | //usage: "\n -c LIST Output only characters from LIST" |
19 | //usage: "\n -d CHAR Use CHAR instead of tab as the field delimiter" | 18 | //usage: "\n -d CHAR Use CHAR instead of tab as the field delimiter" |
diff --git a/coreutils/date.c b/coreutils/date.c index 497031991..d90e620a0 100644 --- a/coreutils/date.c +++ b/coreutils/date.c | |||
@@ -98,7 +98,6 @@ | |||
98 | //usage: "[OPTIONS] [+FMT] [TIME]" | 98 | //usage: "[OPTIONS] [+FMT] [TIME]" |
99 | //usage:#define date_full_usage "\n\n" | 99 | //usage:#define date_full_usage "\n\n" |
100 | //usage: "Display time (using +FMT), or set time\n" | 100 | //usage: "Display time (using +FMT), or set time\n" |
101 | //usage: "\nOptions:" | ||
102 | //usage: IF_NOT_LONG_OPTS( | 101 | //usage: IF_NOT_LONG_OPTS( |
103 | //usage: "\n [-s] TIME Set time to TIME" | 102 | //usage: "\n [-s] TIME Set time to TIME" |
104 | //usage: "\n -u Work in UTC (don't convert to local time)" | 103 | //usage: "\n -u Work in UTC (don't convert to local time)" |
diff --git a/coreutils/dd.c b/coreutils/dd.c index e4b53c0af..f6869cb26 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c | |||
@@ -13,7 +13,6 @@ | |||
13 | //usage: " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]") | 13 | //usage: " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]") |
14 | //usage:#define dd_full_usage "\n\n" | 14 | //usage:#define dd_full_usage "\n\n" |
15 | //usage: "Copy a file with converting and formatting\n" | 15 | //usage: "Copy a file with converting and formatting\n" |
16 | //usage: "\nOptions:" | ||
17 | //usage: "\n if=FILE Read from FILE instead of stdin" | 16 | //usage: "\n if=FILE Read from FILE instead of stdin" |
18 | //usage: "\n of=FILE Write to FILE instead of stdout" | 17 | //usage: "\n of=FILE Write to FILE instead of stdout" |
19 | //usage: "\n bs=N Read and write N bytes at a time" | 18 | //usage: "\n bs=N Read and write N bytes at a time" |
diff --git a/coreutils/df.c b/coreutils/df.c index 518e856a2..846cb38ad 100644 --- a/coreutils/df.c +++ b/coreutils/df.c | |||
@@ -29,7 +29,6 @@ | |||
29 | //usage: "] [FILESYSTEM]..." | 29 | //usage: "] [FILESYSTEM]..." |
30 | //usage:#define df_full_usage "\n\n" | 30 | //usage:#define df_full_usage "\n\n" |
31 | //usage: "Print filesystem usage statistics\n" | 31 | //usage: "Print filesystem usage statistics\n" |
32 | //usage: "\nOptions:" | ||
33 | //usage: "\n -P POSIX output format" | 32 | //usage: "\n -P POSIX output format" |
34 | //usage: "\n -k 1024-byte blocks (default)" | 33 | //usage: "\n -k 1024-byte blocks (default)" |
35 | //usage: IF_FEATURE_HUMAN_READABLE( | 34 | //usage: IF_FEATURE_HUMAN_READABLE( |
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c index add1da666..e1fbe8538 100644 --- a/coreutils/dos2unix.c +++ b/coreutils/dos2unix.c | |||
@@ -17,7 +17,6 @@ | |||
17 | //usage:#define dos2unix_full_usage "\n\n" | 17 | //usage:#define dos2unix_full_usage "\n\n" |
18 | //usage: "Convert FILE in-place from DOS to Unix format.\n" | 18 | //usage: "Convert FILE in-place from DOS to Unix format.\n" |
19 | //usage: "When no file is given, use stdin/stdout.\n" | 19 | //usage: "When no file is given, use stdin/stdout.\n" |
20 | //usage: "\nOptions:" | ||
21 | //usage: "\n -u dos2unix" | 20 | //usage: "\n -u dos2unix" |
22 | //usage: "\n -d unix2dos" | 21 | //usage: "\n -d unix2dos" |
23 | //usage: | 22 | //usage: |
@@ -26,7 +25,6 @@ | |||
26 | //usage:#define unix2dos_full_usage "\n\n" | 25 | //usage:#define unix2dos_full_usage "\n\n" |
27 | //usage: "Convert FILE in-place from Unix to DOS format.\n" | 26 | //usage: "Convert FILE in-place from Unix to DOS format.\n" |
28 | //usage: "When no file is given, use stdin/stdout.\n" | 27 | //usage: "When no file is given, use stdin/stdout.\n" |
29 | //usage: "\nOptions:" | ||
30 | //usage: "\n -u dos2unix" | 28 | //usage: "\n -u dos2unix" |
31 | //usage: "\n -d unix2dos" | 29 | //usage: "\n -d unix2dos" |
32 | 30 | ||
diff --git a/coreutils/du.c b/coreutils/du.c index 7a6662d1e..b8bbe3d9e 100644 --- a/coreutils/du.c +++ b/coreutils/du.c | |||
@@ -31,7 +31,6 @@ | |||
31 | //usage: IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") | 31 | //usage: IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") |
32 | //usage: IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") | 32 | //usage: IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") |
33 | //usage: " bytes.\n" | 33 | //usage: " bytes.\n" |
34 | //usage: "\nOptions:" | ||
35 | //usage: "\n -a Show file sizes too" | 34 | //usage: "\n -a Show file sizes too" |
36 | //usage: "\n -L Follow all symlinks" | 35 | //usage: "\n -L Follow all symlinks" |
37 | //usage: "\n -H Follow symlinks on command line" | 36 | //usage: "\n -H Follow symlinks on command line" |
diff --git a/coreutils/echo.c b/coreutils/echo.c index 0895e2940..9663894ec 100644 --- a/coreutils/echo.c +++ b/coreutils/echo.c | |||
@@ -28,7 +28,6 @@ | |||
28 | //usage:#define echo_full_usage "\n\n" | 28 | //usage:#define echo_full_usage "\n\n" |
29 | //usage: "Print the specified ARGs to stdout" | 29 | //usage: "Print the specified ARGs to stdout" |
30 | //usage: IF_FEATURE_FANCY_ECHO( "\n" | 30 | //usage: IF_FEATURE_FANCY_ECHO( "\n" |
31 | //usage: "\nOptions:" | ||
32 | //usage: "\n -n Suppress trailing newline" | 31 | //usage: "\n -n Suppress trailing newline" |
33 | //usage: "\n -e Interpret backslash escapes (i.e., \\t=tab)" | 32 | //usage: "\n -e Interpret backslash escapes (i.e., \\t=tab)" |
34 | //usage: "\n -E Don't interpret backslash escapes (default)" | 33 | //usage: "\n -E Don't interpret backslash escapes (default)" |
diff --git a/coreutils/env.c b/coreutils/env.c index 747c668da..807ef13e9 100644 --- a/coreutils/env.c +++ b/coreutils/env.c | |||
@@ -36,7 +36,6 @@ | |||
36 | //usage:#define env_full_usage "\n\n" | 36 | //usage:#define env_full_usage "\n\n" |
37 | //usage: "Print the current environment or run PROG after setting up\n" | 37 | //usage: "Print the current environment or run PROG after setting up\n" |
38 | //usage: "the specified environment\n" | 38 | //usage: "the specified environment\n" |
39 | //usage: "\nOptions:" | ||
40 | //usage: "\n -, -i Start with an empty environment" | 39 | //usage: "\n -, -i Start with an empty environment" |
41 | //usage: "\n -u Remove variable from the environment" | 40 | //usage: "\n -u Remove variable from the environment" |
42 | 41 | ||
diff --git a/coreutils/expand.c b/coreutils/expand.c index 73ab0ece3..25bbffc66 100644 --- a/coreutils/expand.c +++ b/coreutils/expand.c | |||
@@ -25,7 +25,6 @@ | |||
25 | //usage: "[-i] [-t N] [FILE]..." | 25 | //usage: "[-i] [-t N] [FILE]..." |
26 | //usage:#define expand_full_usage "\n\n" | 26 | //usage:#define expand_full_usage "\n\n" |
27 | //usage: "Convert tabs to spaces, writing to stdout\n" | 27 | //usage: "Convert tabs to spaces, writing to stdout\n" |
28 | //usage: "\nOptions:" | ||
29 | //usage: IF_FEATURE_EXPAND_LONG_OPTIONS( | 28 | //usage: IF_FEATURE_EXPAND_LONG_OPTIONS( |
30 | //usage: "\n -i,--initial Don't convert tabs after non blanks" | 29 | //usage: "\n -i,--initial Don't convert tabs after non blanks" |
31 | //usage: "\n -t,--tabs=N Tabstops every N chars" | 30 | //usage: "\n -t,--tabs=N Tabstops every N chars" |
@@ -39,7 +38,6 @@ | |||
39 | //usage: "[-fa][-t N] [FILE]..." | 38 | //usage: "[-fa][-t N] [FILE]..." |
40 | //usage:#define unexpand_full_usage "\n\n" | 39 | //usage:#define unexpand_full_usage "\n\n" |
41 | //usage: "Convert spaces to tabs, writing to stdout\n" | 40 | //usage: "Convert spaces to tabs, writing to stdout\n" |
42 | //usage: "\nOptions:" | ||
43 | //usage: IF_FEATURE_UNEXPAND_LONG_OPTIONS( | 41 | //usage: IF_FEATURE_UNEXPAND_LONG_OPTIONS( |
44 | //usage: "\n -a,--all Convert all blanks" | 42 | //usage: "\n -a,--all Convert all blanks" |
45 | //usage: "\n -f,--first-only Convert only leading blanks" | 43 | //usage: "\n -f,--first-only Convert only leading blanks" |
diff --git a/coreutils/fold.c b/coreutils/fold.c index 3fe668512..0e7306377 100644 --- a/coreutils/fold.c +++ b/coreutils/fold.c | |||
@@ -14,7 +14,6 @@ | |||
14 | //usage: "[-bs] [-w WIDTH] [FILE]..." | 14 | //usage: "[-bs] [-w WIDTH] [FILE]..." |
15 | //usage:#define fold_full_usage "\n\n" | 15 | //usage:#define fold_full_usage "\n\n" |
16 | //usage: "Wrap input lines in each FILE (or stdin), writing to stdout\n" | 16 | //usage: "Wrap input lines in each FILE (or stdin), writing to stdout\n" |
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -b Count bytes rather than columns" | 17 | //usage: "\n -b Count bytes rather than columns" |
19 | //usage: "\n -s Break at spaces" | 18 | //usage: "\n -s Break at spaces" |
20 | //usage: "\n -w Use WIDTH columns instead of 80" | 19 | //usage: "\n -w Use WIDTH columns instead of 80" |
diff --git a/coreutils/fsync.c b/coreutils/fsync.c index 518c5642b..652a41c33 100644 --- a/coreutils/fsync.c +++ b/coreutils/fsync.c | |||
@@ -11,7 +11,6 @@ | |||
11 | //usage: "[-d] FILE..." | 11 | //usage: "[-d] FILE..." |
12 | //usage:#define fsync_full_usage "\n\n" | 12 | //usage:#define fsync_full_usage "\n\n" |
13 | //usage: "Write files' buffered blocks to disk\n" | 13 | //usage: "Write files' buffered blocks to disk\n" |
14 | //usage: "\nOptions:" | ||
15 | //usage: "\n -d Avoid syncing metadata" | 14 | //usage: "\n -d Avoid syncing metadata" |
16 | 15 | ||
17 | #include "libbb.h" | 16 | #include "libbb.h" |
diff --git a/coreutils/head.c b/coreutils/head.c index f49320ef4..ec4512765 100644 --- a/coreutils/head.c +++ b/coreutils/head.c | |||
@@ -16,7 +16,6 @@ | |||
16 | //usage:#define head_full_usage "\n\n" | 16 | //usage:#define head_full_usage "\n\n" |
17 | //usage: "Print first 10 lines of each FILE (or stdin) to stdout.\n" | 17 | //usage: "Print first 10 lines of each FILE (or stdin) to stdout.\n" |
18 | //usage: "With more than one FILE, precede each with a filename header.\n" | 18 | //usage: "With more than one FILE, precede each with a filename header.\n" |
19 | //usage: "\nOptions:" | ||
20 | //usage: "\n -n N[kbm] Print first N lines" | 19 | //usage: "\n -n N[kbm] Print first N lines" |
21 | //usage: IF_FEATURE_FANCY_HEAD( | 20 | //usage: IF_FEATURE_FANCY_HEAD( |
22 | //usage: "\n -c N[kbm] Print first N bytes" | 21 | //usage: "\n -c N[kbm] Print first N bytes" |
diff --git a/coreutils/id.c b/coreutils/id.c index 42ed4c749..399d25e34 100644 --- a/coreutils/id.c +++ b/coreutils/id.c | |||
@@ -15,11 +15,28 @@ | |||
15 | * Added -G option Tito Ragusa (C) 2008 for SUSv3. | 15 | * Added -G option Tito Ragusa (C) 2008 for SUSv3. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | //config:config ID | ||
19 | //config: bool "id" | ||
20 | //config: default y | ||
21 | //config: help | ||
22 | //config: id displays the current user and group ID names. | ||
23 | |||
24 | //config:config GROUPS | ||
25 | //config: bool "groups" | ||
26 | //config: default y | ||
27 | //config: help | ||
28 | //config: Print the group names associated with current user id. | ||
29 | |||
30 | //kbuild:lib-$(CONFIG_GROUPS) += id.o | ||
31 | //kbuild:lib-$(CONFIG_ID) += id.o | ||
32 | |||
33 | //applet:IF_GROUPS(APPLET_NOEXEC(groups, id, BB_DIR_USR_BIN, BB_SUID_DROP, groups)) | ||
34 | //applet:IF_ID( APPLET_NOEXEC(id, id, BB_DIR_USR_BIN, BB_SUID_DROP, id )) | ||
35 | |||
18 | //usage:#define id_trivial_usage | 36 | //usage:#define id_trivial_usage |
19 | //usage: "[OPTIONS] [USER]" | 37 | //usage: "[OPTIONS] [USER]" |
20 | //usage:#define id_full_usage "\n\n" | 38 | //usage:#define id_full_usage "\n\n" |
21 | //usage: "Print information about USER or the current user\n" | 39 | //usage: "Print information about USER or the current user\n" |
22 | //usage: "\nOptions:" | ||
23 | //usage: IF_SELINUX( | 40 | //usage: IF_SELINUX( |
24 | //usage: "\n -Z Security context" | 41 | //usage: "\n -Z Security context" |
25 | //usage: ) | 42 | //usage: ) |
@@ -33,6 +50,15 @@ | |||
33 | //usage: "$ id\n" | 50 | //usage: "$ id\n" |
34 | //usage: "uid=1000(andersen) gid=1000(andersen)\n" | 51 | //usage: "uid=1000(andersen) gid=1000(andersen)\n" |
35 | 52 | ||
53 | //usage:#define groups_trivial_usage | ||
54 | //usage: "[USER]" | ||
55 | //usage:#define groups_full_usage "\n\n" | ||
56 | //usage: "Print the group memberships of USER or for the current process" | ||
57 | //usage: | ||
58 | //usage:#define groups_example_usage | ||
59 | //usage: "$ groups\n" | ||
60 | //usage: "andersen lp dialout cdrom floppy\n" | ||
61 | |||
36 | #include "libbb.h" | 62 | #include "libbb.h" |
37 | 63 | ||
38 | /* This is a NOEXEC applet. Be very careful! */ | 64 | /* This is a NOEXEC applet. Be very careful! */ |
@@ -91,7 +117,7 @@ static int print_user(uid_t id, const char *prefix) | |||
91 | 117 | ||
92 | /* On error set *n < 0 and return >= 0 | 118 | /* On error set *n < 0 and return >= 0 |
93 | * If *n is too small, update it and return < 0 | 119 | * If *n is too small, update it and return < 0 |
94 | * (ok to trash groups[] in both cases) | 120 | * (ok to trash groups[] in both cases) |
95 | * Otherwise fill in groups[] and return >= 0 | 121 | * Otherwise fill in groups[] and return >= 0 |
96 | */ | 122 | */ |
97 | static int get_groups(const char *username, gid_t rgid, gid_t *groups, int *n) | 123 | static int get_groups(const char *username, gid_t rgid, gid_t *groups, int *n) |
@@ -105,20 +131,19 @@ static int get_groups(const char *username, gid_t rgid, gid_t *groups, int *n) | |||
105 | m = getgrouplist(username, rgid, groups, n); | 131 | m = getgrouplist(username, rgid, groups, n); |
106 | /* I guess *n < 0 might indicate error. Anyway, | 132 | /* I guess *n < 0 might indicate error. Anyway, |
107 | * malloc'ing -1 bytes won't be good, so: */ | 133 | * malloc'ing -1 bytes won't be good, so: */ |
108 | //if (*n < 0) | 134 | if (*n < 0) |
109 | // return 0; | 135 | return 0; |
110 | //return m; | 136 | return m; |
111 | //commented out here, happens below anyway | ||
112 | } else { | ||
113 | /* On error -1 is returned, which ends up in *n */ | ||
114 | int nn = getgroups(*n, groups); | ||
115 | /* 0: nn <= *n, groups[] was big enough; -1 otherwise */ | ||
116 | m = - (nn > *n); | ||
117 | *n = nn; | ||
118 | } | 137 | } |
119 | if (*n < 0) | 138 | |
120 | return 0; /* error, don't return < 0! */ | 139 | *n = getgroups(*n, groups); |
121 | return m; | 140 | if (*n >= 0) |
141 | return *n; | ||
142 | /* Error */ | ||
143 | if (errno == EINVAL) /* *n is too small? */ | ||
144 | *n = getgroups(0, groups); /* get needed *n */ | ||
145 | /* if *n >= 0, return -1 (got new *n), else return 0 (error): */ | ||
146 | return -(*n >= 0); | ||
122 | } | 147 | } |
123 | 148 | ||
124 | int id_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 149 | int id_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
@@ -136,11 +161,22 @@ int id_main(int argc UNUSED_PARAM, char **argv) | |||
136 | #if ENABLE_SELINUX | 161 | #if ENABLE_SELINUX |
137 | security_context_t scontext = NULL; | 162 | security_context_t scontext = NULL; |
138 | #endif | 163 | #endif |
139 | /* Don't allow -n -r -nr -ug -rug -nug -rnug -uZ -gZ -GZ*/ | 164 | |
140 | /* Don't allow more than one username */ | 165 | if (ENABLE_GROUPS && (!ENABLE_ID || applet_name[0] == 'g')) { |
141 | opt_complementary = "?1:u--g:g--u:G--u:u--G:g--G:G--g:r?ugG:n?ugG" | 166 | /* TODO: coreutils groups prepend "USER : " prefix, |
167 | * and accept many usernames. Example: | ||
168 | * # groups root root | ||
169 | * root : root | ||
170 | * root : root | ||
171 | */ | ||
172 | opt = option_mask32 = getopt32(argv, "") | JUST_ALL_GROUPS | NAME_NOT_NUMBER; | ||
173 | } else { | ||
174 | /* Don't allow -n -r -nr -ug -rug -nug -rnug -uZ -gZ -GZ*/ | ||
175 | /* Don't allow more than one username */ | ||
176 | opt_complementary = "?1:u--g:g--u:G--u:u--G:g--G:G--g:r?ugG:n?ugG" | ||
142 | IF_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G"); | 177 | IF_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G"); |
143 | opt = getopt32(argv, "rnugG" IF_SELINUX("Z")); | 178 | opt = getopt32(argv, "rnugG" IF_SELINUX("Z")); |
179 | } | ||
144 | 180 | ||
145 | username = argv[optind]; | 181 | username = argv[optind]; |
146 | if (username) { | 182 | if (username) { |
@@ -177,11 +213,11 @@ int id_main(int argc UNUSED_PARAM, char **argv) | |||
177 | /* We are supplying largish buffer, trying | 213 | /* We are supplying largish buffer, trying |
178 | * to not run get_groups() twice. That might be slow | 214 | * to not run get_groups() twice. That might be slow |
179 | * ("user database in remote SQL server" case) */ | 215 | * ("user database in remote SQL server" case) */ |
180 | groups = xmalloc(64 * sizeof(gid_t)); | 216 | groups = xmalloc(64 * sizeof(groups[0])); |
181 | n = 64; | 217 | n = 64; |
182 | if (get_groups(username, rgid, groups, &n) < 0) { | 218 | if (get_groups(username, rgid, groups, &n) < 0) { |
183 | /* Need bigger buffer after all */ | 219 | /* Need bigger buffer after all */ |
184 | groups = xrealloc(groups, n * sizeof(gid_t)); | 220 | groups = xrealloc(groups, n * sizeof(groups[0])); |
185 | get_groups(username, rgid, groups, &n); | 221 | get_groups(username, rgid, groups, &n); |
186 | } | 222 | } |
187 | if (n > 0) { | 223 | if (n > 0) { |
diff --git a/coreutils/install.c b/coreutils/install.c index fe5f26e79..445497f9a 100644 --- a/coreutils/install.c +++ b/coreutils/install.c | |||
@@ -11,7 +11,6 @@ | |||
11 | //usage: "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [SOURCE]... DEST" | 11 | //usage: "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [SOURCE]... DEST" |
12 | //usage:#define install_full_usage "\n\n" | 12 | //usage:#define install_full_usage "\n\n" |
13 | //usage: "Copy files and set attributes\n" | 13 | //usage: "Copy files and set attributes\n" |
14 | //usage: "\nOptions:" | ||
15 | //usage: "\n -c Just copy (default)" | 14 | //usage: "\n -c Just copy (default)" |
16 | //usage: "\n -d Create directories" | 15 | //usage: "\n -d Create directories" |
17 | //usage: "\n -D Create leading target directories" | 16 | //usage: "\n -D Create leading target directories" |
diff --git a/coreutils/ln.c b/coreutils/ln.c index 2da915a68..88a9a8f91 100644 --- a/coreutils/ln.c +++ b/coreutils/ln.c | |||
@@ -15,7 +15,6 @@ | |||
15 | //usage: "[OPTIONS] TARGET... LINK|DIR" | 15 | //usage: "[OPTIONS] TARGET... LINK|DIR" |
16 | //usage:#define ln_full_usage "\n\n" | 16 | //usage:#define ln_full_usage "\n\n" |
17 | //usage: "Create a link LINK or DIR/TARGET to the specified TARGET(s)\n" | 17 | //usage: "Create a link LINK or DIR/TARGET to the specified TARGET(s)\n" |
18 | //usage: "\nOptions:" | ||
19 | //usage: "\n -s Make symlinks instead of hardlinks" | 18 | //usage: "\n -s Make symlinks instead of hardlinks" |
20 | //usage: "\n -f Remove existing destinations" | 19 | //usage: "\n -f Remove existing destinations" |
21 | //usage: "\n -n Don't dereference symlinks - treat like normal file" | 20 | //usage: "\n -n Don't dereference symlinks - treat like normal file" |
diff --git a/coreutils/ls.c b/coreutils/ls.c index c967fd462..4abf84513 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -42,7 +42,6 @@ | |||
42 | //usage: IF_FEATURE_AUTOWIDTH(" [-w WIDTH]") " [FILE]..." | 42 | //usage: IF_FEATURE_AUTOWIDTH(" [-w WIDTH]") " [FILE]..." |
43 | //usage:#define ls_full_usage "\n\n" | 43 | //usage:#define ls_full_usage "\n\n" |
44 | //usage: "List directory contents\n" | 44 | //usage: "List directory contents\n" |
45 | //usage: "\nOptions:" | ||
46 | //usage: "\n -1 One column output" | 45 | //usage: "\n -1 One column output" |
47 | //usage: "\n -a Include entries which start with ." | 46 | //usage: "\n -a Include entries which start with ." |
48 | //usage: "\n -A Like -a, but exclude . and .." | 47 | //usage: "\n -A Like -a, but exclude . and .." |
@@ -183,11 +182,10 @@ LIST_LONG = LIST_MODEBITS | LIST_NLINKS | LIST_ID_NAME | LIST_SIZE | \ | |||
183 | /* -Q GNU option, busybox always supports */ | 182 | /* -Q GNU option, busybox always supports */ |
184 | /* -k SELinux option, busybox always supports (ignores if !SELinux) */ | 183 | /* -k SELinux option, busybox always supports (ignores if !SELinux) */ |
185 | /* Std has -k which means "show sizes in kbytes" */ | 184 | /* Std has -k which means "show sizes in kbytes" */ |
186 | /* -FLHRctur Std options, busybox optionally supports */ | 185 | /* -LHRctur Std options, busybox optionally supports */ |
187 | /* -p Std option, busybox optionally supports */ | 186 | /* -Fp Std options, busybox optionally supports */ |
188 | /* Not fully compatible - we show not only '/' but other chars too */ | ||
189 | /* -SXvhTw GNU options, busybox optionally supports */ | 187 | /* -SXvhTw GNU options, busybox optionally supports */ |
190 | /* -T TABWIDTH is ignored (we don't use tabs on output) */ | 188 | /* -T WIDTH Ignored (we don't use tabs on output) */ |
191 | /* -KZ SELinux mandated options, busybox optionally supports */ | 189 | /* -KZ SELinux mandated options, busybox optionally supports */ |
192 | /* (coreutils 8.4 has no -K, remove it?) */ | 190 | /* (coreutils 8.4 has no -K, remove it?) */ |
193 | /* -e I think we made this one up (looks similar to GNU --full-time) */ | 191 | /* -e I think we made this one up (looks similar to GNU --full-time) */ |
@@ -884,19 +882,29 @@ static int sortcmp(const void *a, const void *b) | |||
884 | // instead of branch forest | 882 | // instead of branch forest |
885 | if (sort_opts == SORT_SIZE) { | 883 | if (sort_opts == SORT_SIZE) { |
886 | dif = (d2->dn_size - d1->dn_size); | 884 | dif = (d2->dn_size - d1->dn_size); |
887 | } else if (sort_opts == SORT_ATIME) { | 885 | } else |
886 | if (sort_opts == SORT_ATIME) { | ||
888 | dif = (d2->dn_atime - d1->dn_atime); | 887 | dif = (d2->dn_atime - d1->dn_atime); |
889 | } else if (sort_opts == SORT_CTIME) { | 888 | } else |
889 | if (sort_opts == SORT_CTIME) { | ||
890 | dif = (d2->dn_ctime - d1->dn_ctime); | 890 | dif = (d2->dn_ctime - d1->dn_ctime); |
891 | } else if (sort_opts == SORT_MTIME) { | 891 | } else |
892 | if (sort_opts == SORT_MTIME) { | ||
892 | dif = (d2->dn_mtime - d1->dn_mtime); | 893 | dif = (d2->dn_mtime - d1->dn_mtime); |
893 | } else if (sort_opts == SORT_DIR) { | 894 | } else |
895 | if (sort_opts == SORT_DIR) { | ||
894 | dif = S_ISDIR(d2->dn_mode) - S_ISDIR(d1->dn_mode); | 896 | dif = S_ISDIR(d2->dn_mode) - S_ISDIR(d1->dn_mode); |
895 | /* } else if (sort_opts == SORT_VERSION) { */ | 897 | } else |
896 | /* } else if (sort_opts == SORT_EXT) { */ | 898 | #if defined(HAVE_STRVERSCMP) && HAVE_STRVERSCMP == 1 |
899 | if (sort_opts == SORT_VERSION) { | ||
900 | dif = strverscmp(d1->name, d2->name); | ||
901 | } else | ||
902 | #endif | ||
903 | if (sort_opts == SORT_EXT) { | ||
904 | dif = strcmp(strchrnul(d1->name, '.'), strchrnul(d2->name, '.')); | ||
897 | } | 905 | } |
898 | if (dif == 0) { | 906 | if (dif == 0) { |
899 | /* sort by name, or tie_breaker for other sorts */ | 907 | /* sort by name, use as tie breaker for other sorts */ |
900 | if (ENABLE_LOCALE_SUPPORT) | 908 | if (ENABLE_LOCALE_SUPPORT) |
901 | dif = strcoll(d1->name, d2->name); | 909 | dif = strcoll(d1->name, d2->name); |
902 | else | 910 | else |
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c index 050d46701..53fd4d1a8 100644 --- a/coreutils/md5_sha1_sum.c +++ b/coreutils/md5_sha1_sum.c | |||
@@ -12,7 +12,6 @@ | |||
12 | //usage:#define md5sum_full_usage "\n\n" | 12 | //usage:#define md5sum_full_usage "\n\n" |
13 | //usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" | 13 | //usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" |
14 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" | 14 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" |
15 | //usage: "\nOptions:" | ||
16 | //usage: "\n -c Check sums against given list" | 15 | //usage: "\n -c Check sums against given list" |
17 | //usage: "\n -s Don't output anything, status code shows success" | 16 | //usage: "\n -s Don't output anything, status code shows success" |
18 | //usage: "\n -w Warn about improperly formatted checksum lines" | 17 | //usage: "\n -w Warn about improperly formatted checksum lines" |
@@ -34,7 +33,6 @@ | |||
34 | //usage:#define sha1sum_full_usage "\n\n" | 33 | //usage:#define sha1sum_full_usage "\n\n" |
35 | //usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums" | 34 | //usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums" |
36 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" | 35 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" |
37 | //usage: "\nOptions:" | ||
38 | //usage: "\n -c Check sums against given list" | 36 | //usage: "\n -c Check sums against given list" |
39 | //usage: "\n -s Don't output anything, status code shows success" | 37 | //usage: "\n -s Don't output anything, status code shows success" |
40 | //usage: "\n -w Warn about improperly formatted checksum lines" | 38 | //usage: "\n -w Warn about improperly formatted checksum lines" |
@@ -46,7 +44,6 @@ | |||
46 | //usage:#define sha256sum_full_usage "\n\n" | 44 | //usage:#define sha256sum_full_usage "\n\n" |
47 | //usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA256 checksums" | 45 | //usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA256 checksums" |
48 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" | 46 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" |
49 | //usage: "\nOptions:" | ||
50 | //usage: "\n -c Check sums against given list" | 47 | //usage: "\n -c Check sums against given list" |
51 | //usage: "\n -s Don't output anything, status code shows success" | 48 | //usage: "\n -s Don't output anything, status code shows success" |
52 | //usage: "\n -w Warn about improperly formatted checksum lines" | 49 | //usage: "\n -w Warn about improperly formatted checksum lines" |
@@ -58,7 +55,6 @@ | |||
58 | //usage:#define sha512sum_full_usage "\n\n" | 55 | //usage:#define sha512sum_full_usage "\n\n" |
59 | //usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA512 checksums" | 56 | //usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA512 checksums" |
60 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" | 57 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" |
61 | //usage: "\nOptions:" | ||
62 | //usage: "\n -c Check sums against given list" | 58 | //usage: "\n -c Check sums against given list" |
63 | //usage: "\n -s Don't output anything, status code shows success" | 59 | //usage: "\n -s Don't output anything, status code shows success" |
64 | //usage: "\n -w Warn about improperly formatted checksum lines" | 60 | //usage: "\n -w Warn about improperly formatted checksum lines" |
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index e425bbe5e..a4429b1cb 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c | |||
@@ -23,7 +23,6 @@ | |||
23 | //usage: "[OPTIONS] DIRECTORY..." | 23 | //usage: "[OPTIONS] DIRECTORY..." |
24 | //usage:#define mkdir_full_usage "\n\n" | 24 | //usage:#define mkdir_full_usage "\n\n" |
25 | //usage: "Create DIRECTORY\n" | 25 | //usage: "Create DIRECTORY\n" |
26 | //usage: "\nOptions:" | ||
27 | //usage: "\n -m MODE Mode" | 26 | //usage: "\n -m MODE Mode" |
28 | //usage: "\n -p No error if exists; make parent directories as needed" | 27 | //usage: "\n -p No error if exists; make parent directories as needed" |
29 | //usage: IF_SELINUX( | 28 | //usage: IF_SELINUX( |
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c index 84d8d99dd..ef58325b3 100644 --- a/coreutils/mkfifo.c +++ b/coreutils/mkfifo.c | |||
@@ -14,7 +14,6 @@ | |||
14 | //usage: "[-m MODE] " IF_SELINUX("[-Z] ") "NAME" | 14 | //usage: "[-m MODE] " IF_SELINUX("[-Z] ") "NAME" |
15 | //usage:#define mkfifo_full_usage "\n\n" | 15 | //usage:#define mkfifo_full_usage "\n\n" |
16 | //usage: "Create named pipe\n" | 16 | //usage: "Create named pipe\n" |
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -m MODE Mode (default a=rw)" | 17 | //usage: "\n -m MODE Mode (default a=rw)" |
19 | //usage: IF_SELINUX( | 18 | //usage: IF_SELINUX( |
20 | //usage: "\n -Z Set security context" | 19 | //usage: "\n -Z Set security context" |
diff --git a/coreutils/mknod.c b/coreutils/mknod.c index 50dbd62e3..32d3659ac 100644 --- a/coreutils/mknod.c +++ b/coreutils/mknod.c | |||
@@ -13,7 +13,6 @@ | |||
13 | //usage: "[-m MODE] " IF_SELINUX("[-Z] ") "NAME TYPE MAJOR MINOR" | 13 | //usage: "[-m MODE] " IF_SELINUX("[-Z] ") "NAME TYPE MAJOR MINOR" |
14 | //usage:#define mknod_full_usage "\n\n" | 14 | //usage:#define mknod_full_usage "\n\n" |
15 | //usage: "Create a special file (block, character, or pipe)\n" | 15 | //usage: "Create a special file (block, character, or pipe)\n" |
16 | //usage: "\nOptions:" | ||
17 | //usage: "\n -m MODE Creation mode (default a=rw)" | 16 | //usage: "\n -m MODE Creation mode (default a=rw)" |
18 | //usage: IF_SELINUX( | 17 | //usage: IF_SELINUX( |
19 | //usage: "\n -Z Set security context" | 18 | //usage: "\n -Z Set security context" |
diff --git a/coreutils/mv.c b/coreutils/mv.c index 399f391b2..87f4cd5a5 100644 --- a/coreutils/mv.c +++ b/coreutils/mv.c | |||
@@ -21,7 +21,6 @@ | |||
21 | //usage: "or: mv [-fin] SOURCE... DIRECTORY" | 21 | //usage: "or: mv [-fin] SOURCE... DIRECTORY" |
22 | //usage:#define mv_full_usage "\n\n" | 22 | //usage:#define mv_full_usage "\n\n" |
23 | //usage: "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY\n" | 23 | //usage: "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY\n" |
24 | //usage: "\nOptions:" | ||
25 | //usage: "\n -f Don't prompt before overwriting" | 24 | //usage: "\n -f Don't prompt before overwriting" |
26 | //usage: "\n -i Interactive, prompt before overwrite" | 25 | //usage: "\n -i Interactive, prompt before overwrite" |
27 | //usage: "\n -n Don't overwrite an existing file" | 26 | //usage: "\n -n Don't overwrite an existing file" |
diff --git a/coreutils/nice.c b/coreutils/nice.c index 2763986e7..ce759916f 100644 --- a/coreutils/nice.c +++ b/coreutils/nice.c | |||
@@ -11,7 +11,6 @@ | |||
11 | //usage: "[-n ADJUST] [PROG ARGS]" | 11 | //usage: "[-n ADJUST] [PROG ARGS]" |
12 | //usage:#define nice_full_usage "\n\n" | 12 | //usage:#define nice_full_usage "\n\n" |
13 | //usage: "Change scheduling priority, run PROG\n" | 13 | //usage: "Change scheduling priority, run PROG\n" |
14 | //usage: "\nOptions:" | ||
15 | //usage: "\n -n ADJUST Adjust priority by ADJUST" | 14 | //usage: "\n -n ADJUST Adjust priority by ADJUST" |
16 | 15 | ||
17 | #include <sys/resource.h> | 16 | #include <sys/resource.h> |
diff --git a/coreutils/readlink.c b/coreutils/readlink.c index 1a0eca646..f7ad791ec 100644 --- a/coreutils/readlink.c +++ b/coreutils/readlink.c | |||
@@ -12,7 +12,6 @@ | |||
12 | //usage:#define readlink_full_usage "\n\n" | 12 | //usage:#define readlink_full_usage "\n\n" |
13 | //usage: "Display the value of a symlink" | 13 | //usage: "Display the value of a symlink" |
14 | //usage: IF_FEATURE_READLINK_FOLLOW( "\n" | 14 | //usage: IF_FEATURE_READLINK_FOLLOW( "\n" |
15 | //usage: "\nOptions:" | ||
16 | //usage: "\n -f Canonicalize by following all symlinks" | 15 | //usage: "\n -f Canonicalize by following all symlinks" |
17 | //usage: "\n -n Don't add newline" | 16 | //usage: "\n -n Don't add newline" |
18 | //usage: "\n -v Verbose" | 17 | //usage: "\n -v Verbose" |
diff --git a/coreutils/rm.c b/coreutils/rm.c index 8efd895cc..042fba162 100644 --- a/coreutils/rm.c +++ b/coreutils/rm.c | |||
@@ -19,7 +19,6 @@ | |||
19 | //usage: "[-irf] FILE..." | 19 | //usage: "[-irf] FILE..." |
20 | //usage:#define rm_full_usage "\n\n" | 20 | //usage:#define rm_full_usage "\n\n" |
21 | //usage: "Remove (unlink) FILEs\n" | 21 | //usage: "Remove (unlink) FILEs\n" |
22 | //usage: "\nOptions:" | ||
23 | //usage: "\n -i Always prompt before removing" | 22 | //usage: "\n -i Always prompt before removing" |
24 | //usage: "\n -f Never prompt" | 23 | //usage: "\n -f Never prompt" |
25 | //usage: "\n -R,-r Recurse" | 24 | //usage: "\n -R,-r Recurse" |
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c index 0dbd940a1..2840d1cfa 100644 --- a/coreutils/rmdir.c +++ b/coreutils/rmdir.c | |||
@@ -14,7 +14,6 @@ | |||
14 | //usage: "[OPTIONS] DIRECTORY..." | 14 | //usage: "[OPTIONS] DIRECTORY..." |
15 | //usage:#define rmdir_full_usage "\n\n" | 15 | //usage:#define rmdir_full_usage "\n\n" |
16 | //usage: "Remove DIRECTORY if it is empty\n" | 16 | //usage: "Remove DIRECTORY if it is empty\n" |
17 | //usage: "\nOptions:" | ||
18 | //usage: IF_FEATURE_RMDIR_LONG_OPTIONS( | 17 | //usage: IF_FEATURE_RMDIR_LONG_OPTIONS( |
19 | //usage: "\n -p|--parents Include parents" | 18 | //usage: "\n -p|--parents Include parents" |
20 | //usage: "\n --ignore-fail-on-non-empty" | 19 | //usage: "\n --ignore-fail-on-non-empty" |
diff --git a/coreutils/seq.c b/coreutils/seq.c index b600266fd..898619293 100644 --- a/coreutils/seq.c +++ b/coreutils/seq.c | |||
@@ -12,7 +12,6 @@ | |||
12 | //usage:#define seq_full_usage "\n\n" | 12 | //usage:#define seq_full_usage "\n\n" |
13 | //usage: "Print numbers from FIRST to LAST, in steps of INC.\n" | 13 | //usage: "Print numbers from FIRST to LAST, in steps of INC.\n" |
14 | //usage: "FIRST, INC default to 1.\n" | 14 | //usage: "FIRST, INC default to 1.\n" |
15 | //usage: "\nOptions:" | ||
16 | //usage: "\n -w Pad to last with leading zeros" | 15 | //usage: "\n -w Pad to last with leading zeros" |
17 | //usage: "\n -s SEP String separator" | 16 | //usage: "\n -s SEP String separator" |
18 | 17 | ||
diff --git a/coreutils/sort.c b/coreutils/sort.c index f709ea1b3..1df07285c 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c | |||
@@ -18,7 +18,6 @@ | |||
18 | //usage: "] [FILE]..." | 18 | //usage: "] [FILE]..." |
19 | //usage:#define sort_full_usage "\n\n" | 19 | //usage:#define sort_full_usage "\n\n" |
20 | //usage: "Sort lines of text\n" | 20 | //usage: "Sort lines of text\n" |
21 | //usage: "\nOptions:" | ||
22 | //usage: IF_FEATURE_SORT_BIG( | 21 | //usage: IF_FEATURE_SORT_BIG( |
23 | //usage: "\n -b Ignore leading blanks" | 22 | //usage: "\n -b Ignore leading blanks" |
24 | //usage: "\n -c Check whether input is sorted" | 23 | //usage: "\n -c Check whether input is sorted" |
diff --git a/coreutils/split.c b/coreutils/split.c index f0077077e..11e640442 100644 --- a/coreutils/split.c +++ b/coreutils/split.c | |||
@@ -13,8 +13,7 @@ | |||
13 | //usage:#define split_trivial_usage | 13 | //usage:#define split_trivial_usage |
14 | //usage: "[OPTIONS] [INPUT [PREFIX]]" | 14 | //usage: "[OPTIONS] [INPUT [PREFIX]]" |
15 | //usage:#define split_full_usage "\n\n" | 15 | //usage:#define split_full_usage "\n\n" |
16 | //usage: "Options:" | 16 | //usage: " -b N[k|m] Split by N (kilo|mega)bytes" |
17 | //usage: "\n -b N[k|m] Split by N (kilo|mega)bytes" | ||
18 | //usage: "\n -l N Split by N lines" | 17 | //usage: "\n -l N Split by N lines" |
19 | //usage: "\n -a N Use N letters as suffix" | 18 | //usage: "\n -a N Use N letters as suffix" |
20 | //usage: | 19 | //usage: |
diff --git a/coreutils/stat.c b/coreutils/stat.c index e85e51033..2797719dd 100644 --- a/coreutils/stat.c +++ b/coreutils/stat.c | |||
@@ -17,7 +17,6 @@ | |||
17 | //usage: "[OPTIONS] FILE..." | 17 | //usage: "[OPTIONS] FILE..." |
18 | //usage:#define stat_full_usage "\n\n" | 18 | //usage:#define stat_full_usage "\n\n" |
19 | //usage: "Display file (default) or filesystem status\n" | 19 | //usage: "Display file (default) or filesystem status\n" |
20 | //usage: "\nOptions:" | ||
21 | //usage: IF_FEATURE_STAT_FORMAT( | 20 | //usage: IF_FEATURE_STAT_FORMAT( |
22 | //usage: "\n -c fmt Use the specified format" | 21 | //usage: "\n -c fmt Use the specified format" |
23 | //usage: ) | 22 | //usage: ) |
diff --git a/coreutils/stty.c b/coreutils/stty.c index af2347161..7f057ead2 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -26,7 +26,6 @@ | |||
26 | //usage:#define stty_full_usage "\n\n" | 26 | //usage:#define stty_full_usage "\n\n" |
27 | //usage: "Without arguments, prints baud rate, line discipline,\n" | 27 | //usage: "Without arguments, prints baud rate, line discipline,\n" |
28 | //usage: "and deviations from stty sane\n" | 28 | //usage: "and deviations from stty sane\n" |
29 | //usage: "\nOptions:" | ||
30 | //usage: "\n -F DEVICE Open device instead of stdin" | 29 | //usage: "\n -F DEVICE Open device instead of stdin" |
31 | //usage: "\n -a Print all current settings in human-readable form" | 30 | //usage: "\n -a Print all current settings in human-readable form" |
32 | //usage: "\n -g Print in stty-readable form" | 31 | //usage: "\n -g Print in stty-readable form" |
diff --git a/coreutils/sum.c b/coreutils/sum.c index 9e6b0c5b1..95110a6da 100644 --- a/coreutils/sum.c +++ b/coreutils/sum.c | |||
@@ -17,7 +17,6 @@ | |||
17 | //usage: "[-rs] [FILE]..." | 17 | //usage: "[-rs] [FILE]..." |
18 | //usage:#define sum_full_usage "\n\n" | 18 | //usage:#define sum_full_usage "\n\n" |
19 | //usage: "Checksum and count the blocks in a file\n" | 19 | //usage: "Checksum and count the blocks in a file\n" |
20 | //usage: "\nOptions:" | ||
21 | //usage: "\n -r Use BSD sum algorithm (1K blocks)" | 20 | //usage: "\n -r Use BSD sum algorithm (1K blocks)" |
22 | //usage: "\n -s Use System V sum algorithm (512byte blocks)" | 21 | //usage: "\n -s Use System V sum algorithm (512byte blocks)" |
23 | 22 | ||
diff --git a/coreutils/tail.c b/coreutils/tail.c index 4b42ebc52..454c25936 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c | |||
@@ -29,7 +29,6 @@ | |||
29 | //usage:#define tail_full_usage "\n\n" | 29 | //usage:#define tail_full_usage "\n\n" |
30 | //usage: "Print last 10 lines of each FILE (or stdin) to stdout.\n" | 30 | //usage: "Print last 10 lines of each FILE (or stdin) to stdout.\n" |
31 | //usage: "With more than one FILE, precede each with a filename header.\n" | 31 | //usage: "With more than one FILE, precede each with a filename header.\n" |
32 | //usage: "\nOptions:" | ||
33 | //usage: "\n -f Print data as file grows" | 32 | //usage: "\n -f Print data as file grows" |
34 | //usage: IF_FEATURE_FANCY_TAIL( | 33 | //usage: IF_FEATURE_FANCY_TAIL( |
35 | //usage: "\n -s SECONDS Wait SECONDS between reads with -f" | 34 | //usage: "\n -s SECONDS Wait SECONDS between reads with -f" |
diff --git a/coreutils/tee.c b/coreutils/tee.c index 3e3164e70..48cc0508f 100644 --- a/coreutils/tee.c +++ b/coreutils/tee.c | |||
@@ -14,7 +14,6 @@ | |||
14 | //usage: "[-ai] [FILE]..." | 14 | //usage: "[-ai] [FILE]..." |
15 | //usage:#define tee_full_usage "\n\n" | 15 | //usage:#define tee_full_usage "\n\n" |
16 | //usage: "Copy stdin to each FILE, and also to stdout\n" | 16 | //usage: "Copy stdin to each FILE, and also to stdout\n" |
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -a Append to the given FILEs, don't overwrite" | 17 | //usage: "\n -a Append to the given FILEs, don't overwrite" |
19 | //usage: "\n -i Ignore interrupt signals (SIGINT)" | 18 | //usage: "\n -i Ignore interrupt signals (SIGINT)" |
20 | //usage: | 19 | //usage: |
diff --git a/coreutils/touch.c b/coreutils/touch.c index c51fb70ca..0f980fd7b 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c | |||
@@ -34,7 +34,6 @@ | |||
34 | //usage: "[-c]" IF_DESKTOP(" [-d DATE] [-r FILE]") " FILE [FILE]..." | 34 | //usage: "[-c]" IF_DESKTOP(" [-d DATE] [-r FILE]") " FILE [FILE]..." |
35 | //usage:#define touch_full_usage "\n\n" | 35 | //usage:#define touch_full_usage "\n\n" |
36 | //usage: "Update the last-modified date on the given FILE[s]\n" | 36 | //usage: "Update the last-modified date on the given FILE[s]\n" |
37 | //usage: "\nOptions:" | ||
38 | //usage: "\n -c Don't create files" | 37 | //usage: "\n -c Don't create files" |
39 | //usage: IF_DESKTOP( | 38 | //usage: IF_DESKTOP( |
40 | //usage: "\n -d DT Date/time to use" | 39 | //usage: "\n -d DT Date/time to use" |
diff --git a/coreutils/tr.c b/coreutils/tr.c index 2f14a414f..e67948a36 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c | |||
@@ -51,7 +51,6 @@ | |||
51 | //usage: "[-cds] STRING1 [STRING2]" | 51 | //usage: "[-cds] STRING1 [STRING2]" |
52 | //usage:#define tr_full_usage "\n\n" | 52 | //usage:#define tr_full_usage "\n\n" |
53 | //usage: "Translate, squeeze, or delete characters from stdin, writing to stdout\n" | 53 | //usage: "Translate, squeeze, or delete characters from stdin, writing to stdout\n" |
54 | //usage: "\nOptions:" | ||
55 | //usage: "\n -c Take complement of STRING1" | 54 | //usage: "\n -c Take complement of STRING1" |
56 | //usage: "\n -d Delete input characters coded STRING1" | 55 | //usage: "\n -d Delete input characters coded STRING1" |
57 | //usage: "\n -s Squeeze multiple output characters of STRING2 into one character" | 56 | //usage: "\n -s Squeeze multiple output characters of STRING2 into one character" |
diff --git a/coreutils/tty.c b/coreutils/tty.c index 67399cbf3..45175054e 100644 --- a/coreutils/tty.c +++ b/coreutils/tty.c | |||
@@ -15,7 +15,6 @@ | |||
15 | //usage:#define tty_full_usage "\n\n" | 15 | //usage:#define tty_full_usage "\n\n" |
16 | //usage: "Print file name of stdin's terminal" | 16 | //usage: "Print file name of stdin's terminal" |
17 | //usage: IF_INCLUDE_SUSv2( "\n" | 17 | //usage: IF_INCLUDE_SUSv2( "\n" |
18 | //usage: "\nOptions:" | ||
19 | //usage: "\n -s Print nothing, only return exit status" | 18 | //usage: "\n -s Print nothing, only return exit status" |
20 | //usage: ) | 19 | //usage: ) |
21 | //usage: | 20 | //usage: |
diff --git a/coreutils/uname.c b/coreutils/uname.c index 775c450df..3809835a4 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c | |||
@@ -52,7 +52,6 @@ | |||
52 | //usage: "[-amnrspv]" | 52 | //usage: "[-amnrspv]" |
53 | //usage:#define uname_full_usage "\n\n" | 53 | //usage:#define uname_full_usage "\n\n" |
54 | //usage: "Print system information\n" | 54 | //usage: "Print system information\n" |
55 | //usage: "\nOptions:" | ||
56 | //usage: "\n -a Print all" | 55 | //usage: "\n -a Print all" |
57 | //usage: "\n -m The machine (hardware) type" | 56 | //usage: "\n -m The machine (hardware) type" |
58 | //usage: "\n -n Hostname" | 57 | //usage: "\n -n Hostname" |
diff --git a/coreutils/uniq.c b/coreutils/uniq.c index 6e764d8a4..9208d34ec 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c | |||
@@ -14,7 +14,6 @@ | |||
14 | //usage: "[-cdu][-f,s,w N] [INPUT [OUTPUT]]" | 14 | //usage: "[-cdu][-f,s,w N] [INPUT [OUTPUT]]" |
15 | //usage:#define uniq_full_usage "\n\n" | 15 | //usage:#define uniq_full_usage "\n\n" |
16 | //usage: "Discard duplicate lines\n" | 16 | //usage: "Discard duplicate lines\n" |
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -c Prefix lines by the number of occurrences" | 17 | //usage: "\n -c Prefix lines by the number of occurrences" |
19 | //usage: "\n -d Only print duplicate lines" | 18 | //usage: "\n -d Only print duplicate lines" |
20 | //usage: "\n -u Only print unique lines" | 19 | //usage: "\n -u Only print unique lines" |
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index 47a155ecb..6ecfe6cef 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c | |||
@@ -158,7 +158,6 @@ int uudecode_main(int argc UNUSED_PARAM, char **argv) | |||
158 | //usage: "[-d] [FILE]" | 158 | //usage: "[-d] [FILE]" |
159 | //usage:#define base64_full_usage "\n\n" | 159 | //usage:#define base64_full_usage "\n\n" |
160 | //usage: "Base64 encode or decode FILE to standard output" | 160 | //usage: "Base64 encode or decode FILE to standard output" |
161 | //usage: "\nOptions:" | ||
162 | //usage: "\n -d Decode data" | 161 | //usage: "\n -d Decode data" |
163 | ////usage: "\n -w COL Wrap lines at COL (default 76, 0 disables)" | 162 | ////usage: "\n -w COL Wrap lines at COL (default 76, 0 disables)" |
164 | ////usage: "\n -i When decoding, ignore non-alphabet characters" | 163 | ////usage: "\n -i When decoding, ignore non-alphabet characters" |
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c index b4cd0a9e6..84a489a11 100644 --- a/coreutils/uuencode.c +++ b/coreutils/uuencode.c | |||
@@ -12,7 +12,6 @@ | |||
12 | //usage: "[-m] [INFILE] STORED_FILENAME" | 12 | //usage: "[-m] [INFILE] STORED_FILENAME" |
13 | //usage:#define uuencode_full_usage "\n\n" | 13 | //usage:#define uuencode_full_usage "\n\n" |
14 | //usage: "Uuencode a file to stdout\n" | 14 | //usage: "Uuencode a file to stdout\n" |
15 | //usage: "\nOptions:" | ||
16 | //usage: "\n -m Use base64 encoding per RFC1521" | 15 | //usage: "\n -m Use base64 encoding per RFC1521" |
17 | //usage: | 16 | //usage: |
18 | //usage:#define uuencode_example_usage | 17 | //usage:#define uuencode_example_usage |
diff --git a/coreutils/wc.c b/coreutils/wc.c index 6e22c66c8..a410e407a 100644 --- a/coreutils/wc.c +++ b/coreutils/wc.c | |||
@@ -64,7 +64,6 @@ | |||
64 | //usage: | 64 | //usage: |
65 | //usage:#define wc_full_usage "\n\n" | 65 | //usage:#define wc_full_usage "\n\n" |
66 | //usage: "Count lines, words, and bytes for each FILE (or stdin)\n" | 66 | //usage: "Count lines, words, and bytes for each FILE (or stdin)\n" |
67 | //usage: "\nOptions:" | ||
68 | //usage: "\n -c Count bytes" | 67 | //usage: "\n -c Count bytes" |
69 | //usage: IF_UNICODE_SUPPORT( | 68 | //usage: IF_UNICODE_SUPPORT( |
70 | //usage: "\n -m Count characters" | 69 | //usage: "\n -m Count characters" |
diff --git a/coreutils/who.c b/coreutils/who.c index ec385bf95..9f37f65fd 100644 --- a/coreutils/who.c +++ b/coreutils/who.c | |||
@@ -22,7 +22,6 @@ | |||
22 | //usage: "[-a]" | 22 | //usage: "[-a]" |
23 | //usage:#define who_full_usage "\n\n" | 23 | //usage:#define who_full_usage "\n\n" |
24 | //usage: "Show who is logged on\n" | 24 | //usage: "Show who is logged on\n" |
25 | //usage: "\nOptions:" | ||
26 | //usage: "\n -a Show all" | 25 | //usage: "\n -a Show all" |
27 | 26 | ||
28 | #include "libbb.h" | 27 | #include "libbb.h" |