diff options
| author | Ron Yorston <rmy@pobox.com> | 2023-07-13 08:06:26 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2023-07-13 08:06:26 +0100 |
| commit | bd978d0256fd3a67de1a7dd54f1a37f9435be363 (patch) | |
| tree | cb869384a533ac0d95fe787d75be6c050e1e7c1a | |
| parent | b2901ce8efa050da00e0f3a73f3be9bf9402deea (diff) | |
| parent | d70256a5c719439cc6fab6a4571c1bb46178e4c7 (diff) | |
| download | busybox-w32-bd978d0256fd3a67de1a7dd54f1a37f9435be363.tar.gz busybox-w32-bd978d0256fd3a67de1a7dd54f1a37f9435be363.tar.bz2 busybox-w32-bd978d0256fd3a67de1a7dd54f1a37f9435be363.zip | |
Merge branch 'busybox' into merge
362 files changed, 1501 insertions, 867 deletions
diff --git a/applets/individual.c b/applets/individual.c index e94f26c93..2f743d906 100644 --- a/applets/individual.c +++ b/applets/individual.c | |||
| @@ -20,5 +20,5 @@ int main(int argc, char **argv) | |||
| 20 | void bb_show_usage(void) | 20 | void bb_show_usage(void) |
| 21 | { | 21 | { |
| 22 | fputs_stdout(APPLET_full_usage "\n"); | 22 | fputs_stdout(APPLET_full_usage "\n"); |
| 23 | exit(EXIT_FAILURE); | 23 | exit_FAILURE(); |
| 24 | } | 24 | } |
diff --git a/archival/bbunzip.c b/archival/bbunzip.c index 467996071..fb5deb0ce 100644 --- a/archival/bbunzip.c +++ b/archival/bbunzip.c | |||
| @@ -417,7 +417,7 @@ int gunzip_main(int argc UNUSED_PARAM, char **argv) | |||
| 417 | //usage: "Decompress to stdout" | 417 | //usage: "Decompress to stdout" |
| 418 | 418 | ||
| 419 | //config:config BUNZIP2 | 419 | //config:config BUNZIP2 |
| 420 | //config: bool "bunzip2 (8.7 kb)" | 420 | //config: bool "bunzip2 (9.1 kb)" |
| 421 | //config: default y | 421 | //config: default y |
| 422 | //config: select FEATURE_BZIP2_DECOMPRESS | 422 | //config: select FEATURE_BZIP2_DECOMPRESS |
| 423 | //config: help | 423 | //config: help |
| @@ -431,7 +431,7 @@ int gunzip_main(int argc UNUSED_PARAM, char **argv) | |||
| 431 | //config: should probably say N here. | 431 | //config: should probably say N here. |
| 432 | //config: | 432 | //config: |
| 433 | //config:config BZCAT | 433 | //config:config BZCAT |
| 434 | //config: bool "bzcat (8.7 kb)" | 434 | //config: bool "bzcat (9 kb)" |
| 435 | //config: default y | 435 | //config: default y |
| 436 | //config: select FEATURE_BZIP2_DECOMPRESS | 436 | //config: select FEATURE_BZIP2_DECOMPRESS |
| 437 | //config: help | 437 | //config: help |
| @@ -487,7 +487,7 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv) | |||
| 487 | //usage: "Decompress to stdout" | 487 | //usage: "Decompress to stdout" |
| 488 | 488 | ||
| 489 | //config:config UNLZMA | 489 | //config:config UNLZMA |
| 490 | //config: bool "unlzma (7.5 kb)" | 490 | //config: bool "unlzma (7.8 kb)" |
| 491 | //config: default y | 491 | //config: default y |
| 492 | //config: help | 492 | //config: help |
| 493 | //config: unlzma is a compression utility using the Lempel-Ziv-Markov chain | 493 | //config: unlzma is a compression utility using the Lempel-Ziv-Markov chain |
| @@ -496,7 +496,7 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv) | |||
| 496 | //config: compressors. | 496 | //config: compressors. |
| 497 | //config: | 497 | //config: |
| 498 | //config:config LZCAT | 498 | //config:config LZCAT |
| 499 | //config: bool "lzcat (7.5 kb)" | 499 | //config: bool "lzcat (7.8 kb)" |
| 500 | //config: default y | 500 | //config: default y |
| 501 | //config: help | 501 | //config: help |
| 502 | //config: Alias to "unlzma -c". | 502 | //config: Alias to "unlzma -c". |
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c index a5a80439d..dda931169 100644 --- a/archival/dpkg_deb.c +++ b/archival/dpkg_deb.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 6 | */ | 6 | */ |
| 7 | //config:config DPKG_DEB | 7 | //config:config DPKG_DEB |
| 8 | //config: bool "dpkg-deb (30 kb)" | 8 | //config: bool "dpkg-deb (29 kb)" |
| 9 | //config: default y | 9 | //config: default y |
| 10 | //config: select FEATURE_SEAMLESS_GZ | 10 | //config: select FEATURE_SEAMLESS_GZ |
| 11 | //config: help | 11 | //config: help |
diff --git a/archival/lzop.c b/archival/lzop.c index 74df8ff03..bdcc6d548 100644 --- a/archival/lzop.c +++ b/archival/lzop.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | "Minimalized" for busybox by Alain Knaff | 25 | "Minimalized" for busybox by Alain Knaff |
| 26 | */ | 26 | */ |
| 27 | //config:config LZOP | 27 | //config:config LZOP |
| 28 | //config: bool "lzop (12 kb)" | 28 | //config: bool "lzop (13 kb)" |
| 29 | //config: default y | 29 | //config: default y |
| 30 | //config: help | 30 | //config: help |
| 31 | //config: Lzop compression/decompresion. | 31 | //config: Lzop compression/decompresion. |
diff --git a/archival/tar.c b/archival/tar.c index 054640c01..bb82560b8 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
| @@ -629,7 +629,7 @@ static void NOINLINE vfork_compressor(int tar_fd, const char *gzip) | |||
| 629 | execlp(gzip, gzip, "-f", (char *)0); | 629 | execlp(gzip, gzip, "-f", (char *)0); |
| 630 | 630 | ||
| 631 | vfork_exec_errno = errno; | 631 | vfork_exec_errno = errno; |
| 632 | _exit(EXIT_FAILURE); | 632 | _exit_FAILURE(); |
| 633 | } | 633 | } |
| 634 | 634 | ||
| 635 | /* parent */ | 635 | /* parent */ |
diff --git a/console-tools/chvt.c b/console-tools/chvt.c index 7c2814d1c..2444e1f9d 100644 --- a/console-tools/chvt.c +++ b/console-tools/chvt.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config CHVT | 9 | //config:config CHVT |
| 10 | //config: bool "chvt (2 kb)" | 10 | //config: bool "chvt (2.2 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: This program is used to change to another terminal. | 13 | //config: This program is used to change to another terminal. |
diff --git a/console-tools/clear.c b/console-tools/clear.c index 09ef1ea68..e1bf2c313 100644 --- a/console-tools/clear.c +++ b/console-tools/clear.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config CLEAR | 9 | //config:config CLEAR |
| 10 | //config: bool "clear (tiny)" | 10 | //config: bool "clear (371 bytes)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: This program clears the terminal screen. | 13 | //config: This program clears the terminal screen. |
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index 6cd54653c..f03ad079b 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config DEALLOCVT | 10 | //config:config DEALLOCVT |
| 11 | //config: bool "deallocvt (1.9 kb)" | 11 | //config: bool "deallocvt (2.2 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: This program deallocates unused virtual consoles. | 14 | //config: This program deallocates unused virtual consoles. |
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c index 3d8de6bed..957d16529 100644 --- a/console-tools/dumpkmap.c +++ b/console-tools/dumpkmap.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config DUMPKMAP | 9 | //config:config DUMPKMAP |
| 10 | //config: bool "dumpkmap (1.6 kb)" | 10 | //config: bool "dumpkmap (1.9 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: This program dumps the kernel's keyboard translation table to | 13 | //config: This program dumps the kernel's keyboard translation table to |
diff --git a/console-tools/fgconsole.c b/console-tools/fgconsole.c index 9bfb68017..b6dbc472b 100644 --- a/console-tools/fgconsole.c +++ b/console-tools/fgconsole.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config FGCONSOLE | 9 | //config:config FGCONSOLE |
| 10 | //config: bool "fgconsole (1.5 kb)" | 10 | //config: bool "fgconsole (1.8 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: This program prints active (foreground) console number. | 13 | //config: This program prints active (foreground) console number. |
diff --git a/console-tools/kbd_mode.c b/console-tools/kbd_mode.c index b0b963ee0..1ec25757d 100644 --- a/console-tools/kbd_mode.c +++ b/console-tools/kbd_mode.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config KBD_MODE | 11 | //config:config KBD_MODE |
| 12 | //config: bool "kbd_mode (4.1 kb)" | 12 | //config: bool "kbd_mode (4.3 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: This program reports and sets keyboard mode. | 15 | //config: This program reports and sets keyboard mode. |
diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c index 81a0e6aa8..cec5e19cd 100644 --- a/console-tools/loadfont.c +++ b/console-tools/loadfont.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Licensed under GPLv2, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 11 | */ | 11 | */ |
| 12 | //config:config LOADFONT | 12 | //config:config LOADFONT |
| 13 | //config: bool "loadfont (5.2 kb)" | 13 | //config: bool "loadfont (5.4 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: This program loads a console font from standard input. | 16 | //config: This program loads a console font from standard input. |
diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c index c038e2d22..22e918dbf 100644 --- a/console-tools/loadkmap.c +++ b/console-tools/loadkmap.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config LOADKMAP | 9 | //config:config LOADKMAP |
| 10 | //config: bool "loadkmap (1.8 kb)" | 10 | //config: bool "loadkmap (2.1 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: This program loads a keyboard translation table from | 13 | //config: This program loads a keyboard translation table from |
diff --git a/console-tools/openvt.c b/console-tools/openvt.c index db2f073b2..c35617eb8 100644 --- a/console-tools/openvt.c +++ b/console-tools/openvt.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config OPENVT | 10 | //config:config OPENVT |
| 11 | //config: bool "openvt (7.2 kb)" | 11 | //config: bool "openvt (7.4 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: This program is used to start a command on an unused | 14 | //config: This program is used to start a command on an unused |
diff --git a/console-tools/reset.c b/console-tools/reset.c index bf0814da7..74fe3cb50 100644 --- a/console-tools/reset.c +++ b/console-tools/reset.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config RESET | 10 | //config:config RESET |
| 11 | //config: bool "reset (345 bytes)" | 11 | //config: bool "reset (676 bytes)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: This program is used to reset the terminal screen, if it | 14 | //config: This program is used to reset the terminal screen, if it |
diff --git a/console-tools/resize.c b/console-tools/resize.c index 056e33750..6fa7ce9ea 100644 --- a/console-tools/resize.c +++ b/console-tools/resize.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config RESIZE | 9 | //config:config RESIZE |
| 10 | //config: bool "resize (903 bytes)" | 10 | //config: bool "resize (1.2 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: This program is used to (re)set the width and height of your current | 13 | //config: This program is used to (re)set the width and height of your current |
| @@ -45,7 +45,7 @@ static void | |||
| 45 | onintr(int sig UNUSED_PARAM) | 45 | onintr(int sig UNUSED_PARAM) |
| 46 | { | 46 | { |
| 47 | tcsetattr(STDERR_FILENO, TCSANOW, old_termios_p); | 47 | tcsetattr(STDERR_FILENO, TCSANOW, old_termios_p); |
| 48 | _exit(EXIT_FAILURE); | 48 | _exit_FAILURE(); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | int resize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 51 | int resize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
diff --git a/console-tools/setconsole.c b/console-tools/setconsole.c index 461a98c6a..4e625890a 100644 --- a/console-tools/setconsole.c +++ b/console-tools/setconsole.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config SETCONSOLE | 10 | //config:config SETCONSOLE |
| 11 | //config: bool "setconsole (3.6 kb)" | 11 | //config: bool "setconsole (3.8 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: Redirect writes to /dev/console to another device, | 14 | //config: Redirect writes to /dev/console to another device, |
diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c index 5de18b8ea..03accec2f 100644 --- a/console-tools/setkeycodes.c +++ b/console-tools/setkeycodes.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config SETKEYCODES | 11 | //config:config SETKEYCODES |
| 12 | //config: bool "setkeycodes (2.1 kb)" | 12 | //config: bool "setkeycodes (2.4 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: This program loads entries into the kernel's scancode-to-keycode | 15 | //config: This program loads entries into the kernel's scancode-to-keycode |
diff --git a/console-tools/setlogcons.c b/console-tools/setlogcons.c index e9c2f516e..a94c0035a 100644 --- a/console-tools/setlogcons.c +++ b/console-tools/setlogcons.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config SETLOGCONS | 11 | //config:config SETLOGCONS |
| 12 | //config: bool "setlogcons (1.8 kb)" | 12 | //config: bool "setlogcons (2 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: This program redirects the output console of kernel messages. | 15 | //config: This program redirects the output console of kernel messages. |
diff --git a/console-tools/showkey.c b/console-tools/showkey.c index 84eb38a0a..87532a8ac 100644 --- a/console-tools/showkey.c +++ b/console-tools/showkey.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config SHOWKEY | 9 | //config:config SHOWKEY |
| 10 | //config: bool "showkey (4.7 kb)" | 10 | //config: bool "showkey (4.9 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Shows keys pressed. | 13 | //config: Shows keys pressed. |
diff --git a/coreutils/basename.c b/coreutils/basename.c index 0b721c03c..bf7bd62e0 100644 --- a/coreutils/basename.c +++ b/coreutils/basename.c | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | * 3) Save some space by using strcmp(). Calling strncmp() here was silly. | 14 | * 3) Save some space by using strcmp(). Calling strncmp() here was silly. |
| 15 | */ | 15 | */ |
| 16 | //config:config BASENAME | 16 | //config:config BASENAME |
| 17 | //config: bool "basename (438 bytes)" | 17 | //config: bool "basename (3.7 kb)" |
| 18 | //config: default y | 18 | //config: default y |
| 19 | //config: help | 19 | //config: help |
| 20 | //config: basename is used to strip the directory and suffix from filenames, | 20 | //config: basename is used to strip the directory and suffix from filenames, |
diff --git a/coreutils/cat.c b/coreutils/cat.c index 4b3414941..558869b2a 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config CAT | 9 | //config:config CAT |
| 10 | //config: bool "cat (5.6 kb)" | 10 | //config: bool "cat (5.8 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: cat is used to concatenate files and print them to the standard | 13 | //config: cat is used to concatenate files and print them to the standard |
diff --git a/coreutils/chroot.c b/coreutils/chroot.c index 78751df84..0b45aa80c 100644 --- a/coreutils/chroot.c +++ b/coreutils/chroot.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config CHROOT | 9 | //config:config CHROOT |
| 10 | //config: bool "chroot (3.7 kb)" | 10 | //config: bool "chroot (4 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: chroot is used to change the root directory and run a command. | 13 | //config: chroot is used to change the root directory and run a command. |
diff --git a/coreutils/cksum.c b/coreutils/cksum.c index 83b7e3238..badc63a6a 100644 --- a/coreutils/cksum.c +++ b/coreutils/cksum.c | |||
| @@ -7,11 +7,11 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config CKSUM | 9 | //config:config CKSUM |
| 10 | //config: bool "cksum (4.1 kb)" | 10 | //config: bool "cksum (4.3 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: | 12 | //config: |
| 13 | //config:config CRC32 | 13 | //config:config CRC32 |
| 14 | //config: bool "crc32 (4.1 kb)" | 14 | //config: bool "crc32 (4.2 kb)" |
| 15 | //config: default y | 15 | //config: default y |
| 16 | 16 | ||
| 17 | // APPLET_NOEXEC:name main location suid_type help | 17 | // APPLET_NOEXEC:name main location suid_type help |
diff --git a/coreutils/comm.c b/coreutils/comm.c index c59fccdd1..6cbdceaa9 100644 --- a/coreutils/comm.c +++ b/coreutils/comm.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config COMM | 9 | //config:config COMM |
| 10 | //config: bool "comm (4.2 kb)" | 10 | //config: bool "comm (4.4 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: comm is used to compare two files line by line and return | 13 | //config: comm is used to compare two files line by line and return |
diff --git a/coreutils/cut.c b/coreutils/cut.c index 55bdd9386..25b16d1a8 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config CUT | 11 | //config:config CUT |
| 12 | //config: bool "cut (5.8 kb)" | 12 | //config: bool "cut (6.7 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: cut is used to print selected parts of lines from | 15 | //config: cut is used to print selected parts of lines from |
diff --git a/coreutils/date.c b/coreutils/date.c index 4e62a6fb0..d8e56ef3b 100644 --- a/coreutils/date.c +++ b/coreutils/date.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | much as possible, missed out a lot of bounds checking */ | 19 | much as possible, missed out a lot of bounds checking */ |
| 20 | 20 | ||
| 21 | //config:config DATE | 21 | //config:config DATE |
| 22 | //config: bool "date (7 kb)" | 22 | //config: bool "date (7.2 kb)" |
| 23 | //config: default y | 23 | //config: default y |
| 24 | //config: help | 24 | //config: help |
| 25 | //config: date is used to set the system date or display the | 25 | //config: date is used to set the system date or display the |
diff --git a/coreutils/dd.c b/coreutils/dd.c index 0989c9c2c..51f3adf24 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config DD | 9 | //config:config DD |
| 10 | //config: bool "dd (7.5 kb)" | 10 | //config: bool "dd (8.3 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: dd copies a file (from standard input to standard output, | 13 | //config: dd copies a file (from standard input to standard output, |
diff --git a/coreutils/df.c b/coreutils/df.c index 176aa079f..76e9cefbf 100644 --- a/coreutils/df.c +++ b/coreutils/df.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | * Implement -P and -B; better coreutils compat; cleanup | 18 | * Implement -P and -B; better coreutils compat; cleanup |
| 19 | */ | 19 | */ |
| 20 | //config:config DF | 20 | //config:config DF |
| 21 | //config: bool "df (6.8 kb)" | 21 | //config: bool "df (7.1 kb)" |
| 22 | //config: default y | 22 | //config: default y |
| 23 | //config: help | 23 | //config: help |
| 24 | //config: df reports the amount of disk space used and available | 24 | //config: df reports the amount of disk space used and available |
diff --git a/coreutils/dirname.c b/coreutils/dirname.c index 5aad121b5..71e1e2b7b 100644 --- a/coreutils/dirname.c +++ b/coreutils/dirname.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config DIRNAME | 9 | //config:config DIRNAME |
| 10 | //config: bool "dirname (329 bytes)" | 10 | //config: bool "dirname (611 bytes)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: dirname is used to strip a non-directory suffix from | 13 | //config: dirname is used to strip a non-directory suffix from |
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c index 4039ed38c..c227cd50c 100644 --- a/coreutils/dos2unix.c +++ b/coreutils/dos2unix.c | |||
| @@ -12,14 +12,14 @@ | |||
| 12 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 12 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 13 | */ | 13 | */ |
| 14 | //config:config DOS2UNIX | 14 | //config:config DOS2UNIX |
| 15 | //config: bool "dos2unix (5.2 kb)" | 15 | //config: bool "dos2unix (5.5 kb)" |
| 16 | //config: default y | 16 | //config: default y |
| 17 | //config: help | 17 | //config: help |
| 18 | //config: dos2unix is used to convert a text file from DOS format to | 18 | //config: dos2unix is used to convert a text file from DOS format to |
| 19 | //config: UNIX format, and vice versa. | 19 | //config: UNIX format, and vice versa. |
| 20 | //config: | 20 | //config: |
| 21 | //config:config UNIX2DOS | 21 | //config:config UNIX2DOS |
| 22 | //config: bool "unix2dos (5.2 kb)" | 22 | //config: bool "unix2dos (5.5 kb)" |
| 23 | //config: default y | 23 | //config: default y |
| 24 | //config: help | 24 | //config: help |
| 25 | //config: unix2dos is used to convert a text file from UNIX format to | 25 | //config: unix2dos is used to convert a text file from UNIX format to |
diff --git a/coreutils/du.c b/coreutils/du.c index 092647468..338998fc9 100644 --- a/coreutils/du.c +++ b/coreutils/du.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | * 4) Fixed busybox bug #1284 involving long overflow with human_readable. | 19 | * 4) Fixed busybox bug #1284 involving long overflow with human_readable. |
| 20 | */ | 20 | */ |
| 21 | //config:config DU | 21 | //config:config DU |
| 22 | //config: bool "du (6.3 kb)" | 22 | //config: bool "du (6.5 kb)" |
| 23 | //config: default y | 23 | //config: default y |
| 24 | //config: help | 24 | //config: help |
| 25 | //config: du is used to report the amount of disk space used | 25 | //config: du is used to report the amount of disk space used |
diff --git a/coreutils/echo.c b/coreutils/echo.c index 44b2eb5d0..2a48d4a90 100644 --- a/coreutils/echo.c +++ b/coreutils/echo.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | * The previous version did not allow 4-digit octals. | 19 | * The previous version did not allow 4-digit octals. |
| 20 | */ | 20 | */ |
| 21 | //config:config ECHO | 21 | //config:config ECHO |
| 22 | //config: bool "echo (1.8 kb)" | 22 | //config: bool "echo (2 kb)" |
| 23 | //config: default y | 23 | //config: default y |
| 24 | //config: help | 24 | //config: help |
| 25 | //config: echo prints a specified string to stdout. | 25 | //config: echo prints a specified string to stdout. |
diff --git a/coreutils/env.c b/coreutils/env.c index 6eafd06ef..e9d3e883e 100644 --- a/coreutils/env.c +++ b/coreutils/env.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | * - use xfunc_error_retval | 24 | * - use xfunc_error_retval |
| 25 | */ | 25 | */ |
| 26 | //config:config ENV | 26 | //config:config ENV |
| 27 | //config: bool "env (4 kb)" | 27 | //config: bool "env (4.3 kb)" |
| 28 | //config: default y | 28 | //config: default y |
| 29 | //config: help | 29 | //config: help |
| 30 | //config: env is used to set an environment variable and run | 30 | //config: env is used to set an environment variable and run |
diff --git a/coreutils/expand.c b/coreutils/expand.c index c5e1de6f5..47693e144 100644 --- a/coreutils/expand.c +++ b/coreutils/expand.c | |||
| @@ -21,13 +21,13 @@ | |||
| 21 | * Caveat: this versions of expand and unexpand don't accept tab lists. | 21 | * Caveat: this versions of expand and unexpand don't accept tab lists. |
| 22 | */ | 22 | */ |
| 23 | //config:config EXPAND | 23 | //config:config EXPAND |
| 24 | //config: bool "expand (5.1 kb)" | 24 | //config: bool "expand (5.3 kb)" |
| 25 | //config: default y | 25 | //config: default y |
| 26 | //config: help | 26 | //config: help |
| 27 | //config: By default, convert all tabs to spaces. | 27 | //config: By default, convert all tabs to spaces. |
| 28 | //config: | 28 | //config: |
| 29 | //config:config UNEXPAND | 29 | //config:config UNEXPAND |
| 30 | //config: bool "unexpand (5.3 kb)" | 30 | //config: bool "unexpand (5.5 kb)" |
| 31 | //config: default y | 31 | //config: default y |
| 32 | //config: help | 32 | //config: help |
| 33 | //config: By default, convert only leading sequences of blanks to tabs. | 33 | //config: By default, convert only leading sequences of blanks to tabs. |
diff --git a/coreutils/expr.c b/coreutils/expr.c index b896acd44..3f7e21871 100644 --- a/coreutils/expr.c +++ b/coreutils/expr.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | * provided they all associate ((x op x) op x). | 23 | * provided they all associate ((x op x) op x). |
| 24 | */ | 24 | */ |
| 25 | //config:config EXPR | 25 | //config:config EXPR |
| 26 | //config: bool "expr (6.6 kb)" | 26 | //config: bool "expr (6.8 kb)" |
| 27 | //config: default y | 27 | //config: default y |
| 28 | //config: help | 28 | //config: help |
| 29 | //config: expr is used to calculate numbers and print the result | 29 | //config: expr is used to calculate numbers and print the result |
diff --git a/coreutils/factor.c b/coreutils/factor.c index f909a0d96..9de5ea8eb 100644 --- a/coreutils/factor.c +++ b/coreutils/factor.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Licensed under GPLv2, see file LICENSE in this source tree. | 4 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 5 | */ | 5 | */ |
| 6 | //config:config FACTOR | 6 | //config:config FACTOR |
| 7 | //config: bool "factor (2.7 kb)" | 7 | //config: bool "factor (3.2 kb)" |
| 8 | //config: default y | 8 | //config: default y |
| 9 | //config: help | 9 | //config: help |
| 10 | //config: factor factorizes integers | 10 | //config: factor factorizes integers |
diff --git a/coreutils/false.c b/coreutils/false.c index e3903efd0..ee175a9a2 100644 --- a/coreutils/false.c +++ b/coreutils/false.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config FALSE | 9 | //config:config FALSE |
| 10 | //config: bool "false (tiny)" | 10 | //config: bool "false (314 bytes)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: false returns an exit code of FALSE (1). | 13 | //config: false returns an exit code of FALSE (1). |
diff --git a/coreutils/fold.c b/coreutils/fold.c index 98c3b1491..2839c8c68 100644 --- a/coreutils/fold.c +++ b/coreutils/fold.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 12 | */ | 12 | */ |
| 13 | //config:config FOLD | 13 | //config:config FOLD |
| 14 | //config: bool "fold (4.6 kb)" | 14 | //config: bool "fold (4.8 kb)" |
| 15 | //config: default y | 15 | //config: default y |
| 16 | //config: help | 16 | //config: help |
| 17 | //config: Wrap text to fit a specific width. | 17 | //config: Wrap text to fit a specific width. |
diff --git a/coreutils/head.c b/coreutils/head.c index c7537a20e..ec83a284a 100644 --- a/coreutils/head.c +++ b/coreutils/head.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config HEAD | 9 | //config:config HEAD |
| 10 | //config: bool "head (3.8 kb)" | 10 | //config: bool "head (4 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: head is used to print the first specified number of lines | 13 | //config: head is used to print the first specified number of lines |
diff --git a/coreutils/hostid.c b/coreutils/hostid.c index 038809452..0dd18ffd9 100644 --- a/coreutils/hostid.c +++ b/coreutils/hostid.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config HOSTID | 9 | //config:config HOSTID |
| 10 | //config: bool "hostid (286 bytes)" | 10 | //config: bool "hostid (566 bytes)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: hostid prints the numeric identifier (in hexadecimal) for | 13 | //config: hostid prints the numeric identifier (in hexadecimal) for |
diff --git a/coreutils/id.c b/coreutils/id.c index 18bda3c55..a4f178bda 100644 --- a/coreutils/id.c +++ b/coreutils/id.c | |||
| @@ -13,13 +13,13 @@ | |||
| 13 | * Added -G option Tito Ragusa (C) 2008 for SUSv3. | 13 | * Added -G option Tito Ragusa (C) 2008 for SUSv3. |
| 14 | */ | 14 | */ |
| 15 | //config:config ID | 15 | //config:config ID |
| 16 | //config: bool "id (7 kb)" | 16 | //config: bool "id (7.1 kb)" |
| 17 | //config: default y | 17 | //config: default y |
| 18 | //config: help | 18 | //config: help |
| 19 | //config: id displays the current user and group ID names. | 19 | //config: id displays the current user and group ID names. |
| 20 | //config: | 20 | //config: |
| 21 | //config:config GROUPS | 21 | //config:config GROUPS |
| 22 | //config: bool "groups (6.7 kb)" | 22 | //config: bool "groups (6.8 kb)" |
| 23 | //config: default y | 23 | //config: default y |
| 24 | //config: help | 24 | //config: help |
| 25 | //config: Print the group names associated with current user id. | 25 | //config: Print the group names associated with current user id. |
diff --git a/coreutils/link.c b/coreutils/link.c index 23e0cfdd0..cb994da45 100644 --- a/coreutils/link.c +++ b/coreutils/link.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config LINK | 8 | //config:config LINK |
| 9 | //config: bool "link (3.2 kb)" | 9 | //config: bool "link (3.5 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: link creates hard links between files. | 12 | //config: link creates hard links between files. |
diff --git a/coreutils/ln.c b/coreutils/ln.c index 2dcf79c07..34eec398a 100644 --- a/coreutils/ln.c +++ b/coreutils/ln.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config LN | 9 | //config:config LN |
| 10 | //config: bool "ln (4.9 kb)" | 10 | //config: bool "ln (5.1 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: ln is used to create hard or soft links between files. | 13 | //config: ln is used to create hard or soft links between files. |
diff --git a/coreutils/logname.c b/coreutils/logname.c index 06bbe1b0e..17c073a53 100644 --- a/coreutils/logname.c +++ b/coreutils/logname.c | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | * a diagnostic message and an error return. | 16 | * a diagnostic message and an error return. |
| 17 | */ | 17 | */ |
| 18 | //config:config LOGNAME | 18 | //config:config LOGNAME |
| 19 | //config: bool "logname (1.1 kb)" | 19 | //config: bool "logname (1.4 kb)" |
| 20 | //config: default y | 20 | //config: default y |
| 21 | //config: help | 21 | //config: help |
| 22 | //config: logname is used to print the current user's login name. | 22 | //config: logname is used to print the current user's login name. |
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c index b4bdc262c..f6a21237d 100644 --- a/coreutils/md5_sha1_sum.c +++ b/coreutils/md5_sha1_sum.c | |||
| @@ -6,31 +6,31 @@ | |||
| 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config MD5SUM | 8 | //config:config MD5SUM |
| 9 | //config: bool "md5sum (6.5 kb)" | 9 | //config: bool "md5sum (6.7 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: Compute and check MD5 message digest | 12 | //config: Compute and check MD5 message digest |
| 13 | //config: | 13 | //config: |
| 14 | //config:config SHA1SUM | 14 | //config:config SHA1SUM |
| 15 | //config: bool "sha1sum (5.9 kb)" | 15 | //config: bool "sha1sum (6.7 kb)" |
| 16 | //config: default y | 16 | //config: default y |
| 17 | //config: help | 17 | //config: help |
| 18 | //config: Compute and check SHA1 message digest | 18 | //config: Compute and check SHA1 message digest |
| 19 | //config: | 19 | //config: |
| 20 | //config:config SHA256SUM | 20 | //config:config SHA256SUM |
| 21 | //config: bool "sha256sum (7 kb)" | 21 | //config: bool "sha256sum (8.2 kb)" |
| 22 | //config: default y | 22 | //config: default y |
| 23 | //config: help | 23 | //config: help |
| 24 | //config: Compute and check SHA256 message digest | 24 | //config: Compute and check SHA256 message digest |
| 25 | //config: | 25 | //config: |
| 26 | //config:config SHA512SUM | 26 | //config:config SHA512SUM |
| 27 | //config: bool "sha512sum (7.4 kb)" | 27 | //config: bool "sha512sum (7.3 kb)" |
| 28 | //config: default y | 28 | //config: default y |
| 29 | //config: help | 29 | //config: help |
| 30 | //config: Compute and check SHA512 message digest | 30 | //config: Compute and check SHA512 message digest |
| 31 | //config: | 31 | //config: |
| 32 | //config:config SHA3SUM | 32 | //config:config SHA3SUM |
| 33 | //config: bool "sha3sum (6.1 kb)" | 33 | //config: bool "sha3sum (6.3 kb)" |
| 34 | //config: default y | 34 | //config: default y |
| 35 | //config: help | 35 | //config: help |
| 36 | //config: Compute and check SHA3 message digest | 36 | //config: Compute and check SHA3 message digest |
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index d5e0f512b..e074c3561 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | /* Nov 28, 2006 Yoshinori Sato <ysato@users.sourceforge.jp>: Add SELinux Support. | 14 | /* Nov 28, 2006 Yoshinori Sato <ysato@users.sourceforge.jp>: Add SELinux Support. |
| 15 | */ | 15 | */ |
| 16 | //config:config MKDIR | 16 | //config:config MKDIR |
| 17 | //config: bool "mkdir (4.5 kb)" | 17 | //config: bool "mkdir (4.7 kb)" |
| 18 | //config: default y | 18 | //config: default y |
| 19 | //config: help | 19 | //config: help |
| 20 | //config: mkdir is used to create directories with the specified names. | 20 | //config: mkdir is used to create directories with the specified names. |
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c index e9d420ed8..f48a8e5db 100644 --- a/coreutils/mkfifo.c +++ b/coreutils/mkfifo.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config MKFIFO | 9 | //config:config MKFIFO |
| 10 | //config: bool "mkfifo (3.8 kb)" | 10 | //config: bool "mkfifo (4 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: mkfifo is used to create FIFOs (named pipes). | 13 | //config: mkfifo is used to create FIFOs (named pipes). |
diff --git a/coreutils/mknod.c b/coreutils/mknod.c index b10fe4fc3..e390a7203 100644 --- a/coreutils/mknod.c +++ b/coreutils/mknod.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config MKNOD | 9 | //config:config MKNOD |
| 10 | //config: bool "mknod (4.5 kb)" | 10 | //config: bool "mknod (4.6 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: mknod is used to create FIFOs or block/character special | 13 | //config: mknod is used to create FIFOs or block/character special |
diff --git a/coreutils/mktemp.c b/coreutils/mktemp.c index 33e2720de..91b2be6d3 100644 --- a/coreutils/mktemp.c +++ b/coreutils/mktemp.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | * -p; else /tmp [deprecated] | 29 | * -p; else /tmp [deprecated] |
| 30 | */ | 30 | */ |
| 31 | //config:config MKTEMP | 31 | //config:config MKTEMP |
| 32 | //config: bool "mktemp (4.2 kb)" | 32 | //config: bool "mktemp (4.5 kb)" |
| 33 | //config: default y | 33 | //config: default y |
| 34 | //config: help | 34 | //config: help |
| 35 | //config: mktemp is used to create unique temporary files | 35 | //config: mktemp is used to create unique temporary files |
diff --git a/coreutils/nice.c b/coreutils/nice.c index e70da5d2b..0648593ee 100644 --- a/coreutils/nice.c +++ b/coreutils/nice.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config NICE | 9 | //config:config NICE |
| 10 | //config: bool "nice (2.1 kb)" | 10 | //config: bool "nice (2.3 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: nice runs a program with modified scheduling priority. | 13 | //config: nice runs a program with modified scheduling priority. |
diff --git a/coreutils/nl.c b/coreutils/nl.c index d06673881..12120f7a0 100644 --- a/coreutils/nl.c +++ b/coreutils/nl.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Licensed under GPLv2, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 6 | */ | 6 | */ |
| 7 | //config:config NL | 7 | //config:config NL |
| 8 | //config: bool "nl (4.6 kb)" | 8 | //config: bool "nl (4.9 kb)" |
| 9 | //config: default y | 9 | //config: default y |
| 10 | //config: help | 10 | //config: help |
| 11 | //config: nl is used to number lines of files. | 11 | //config: nl is used to number lines of files. |
diff --git a/coreutils/nohup.c b/coreutils/nohup.c index ae136e085..69d8daff9 100644 --- a/coreutils/nohup.c +++ b/coreutils/nohup.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 12 | */ | 12 | */ |
| 13 | //config:config NOHUP | 13 | //config:config NOHUP |
| 14 | //config: bool "nohup (2 kb)" | 14 | //config: bool "nohup (2.2 kb)" |
| 15 | //config: default y | 15 | //config: default y |
| 16 | //config: help | 16 | //config: help |
| 17 | //config: run a command immune to hangups, with output to a non-tty. | 17 | //config: run a command immune to hangups, with output to a non-tty. |
diff --git a/coreutils/nproc.c b/coreutils/nproc.c index fb673a210..5259921f1 100644 --- a/coreutils/nproc.c +++ b/coreutils/nproc.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Licensed under GPLv2, see LICENSE in this source tree | 4 | * Licensed under GPLv2, see LICENSE in this source tree |
| 5 | */ | 5 | */ |
| 6 | //config:config NPROC | 6 | //config:config NPROC |
| 7 | //config: bool "nproc (3.7 kb)" | 7 | //config: bool "nproc (3.9 kb)" |
| 8 | //config: default y | 8 | //config: default y |
| 9 | //config: help | 9 | //config: help |
| 10 | //config: Print number of CPUs | 10 | //config: Print number of CPUs |
diff --git a/coreutils/paste.c b/coreutils/paste.c index 7def4de11..3e5f20158 100644 --- a/coreutils/paste.c +++ b/coreutils/paste.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config PASTE | 9 | //config:config PASTE |
| 10 | //config: bool "paste (4.9 kb)" | 10 | //config: bool "paste (5.1 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: paste is used to paste lines of different files together | 13 | //config: paste is used to paste lines of different files together |
diff --git a/coreutils/printenv.c b/coreutils/printenv.c index 5e195deaa..0ca9e6114 100644 --- a/coreutils/printenv.c +++ b/coreutils/printenv.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config PRINTENV | 10 | //config:config PRINTENV |
| 11 | //config: bool "printenv (1.3 kb)" | 11 | //config: bool "printenv (1.6 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: printenv is used to print all or part of environment. | 14 | //config: printenv is used to print all or part of environment. |
diff --git a/coreutils/printf.c b/coreutils/printf.c index 411edd5b9..1bcc74d3b 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | /* 19990508 Busy Boxed! Dave Cinege */ | 38 | /* 19990508 Busy Boxed! Dave Cinege */ |
| 39 | 39 | ||
| 40 | //config:config PRINTF | 40 | //config:config PRINTF |
| 41 | //config: bool "printf (3.8 kb)" | 41 | //config: bool "printf (4.1 kb)" |
| 42 | //config: default y | 42 | //config: default y |
| 43 | //config: help | 43 | //config: help |
| 44 | //config: printf is used to format and print specified strings. | 44 | //config: printf is used to format and print specified strings. |
diff --git a/coreutils/pwd.c b/coreutils/pwd.c index 4c42284f4..e62461719 100644 --- a/coreutils/pwd.c +++ b/coreutils/pwd.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config PWD | 9 | //config:config PWD |
| 10 | //config: bool "pwd (3.7 kb)" | 10 | //config: bool "pwd (4 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: pwd is used to print the current directory. | 13 | //config: pwd is used to print the current directory. |
diff --git a/coreutils/readlink.c b/coreutils/readlink.c index e17fc3b1e..9200f4ae0 100644 --- a/coreutils/readlink.c +++ b/coreutils/readlink.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config READLINK | 9 | //config:config READLINK |
| 10 | //config: bool "readlink (4 kb)" | 10 | //config: bool "readlink (4.8 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: This program reads a symbolic link and returns the name | 13 | //config: This program reads a symbolic link and returns the name |
diff --git a/coreutils/realpath.c b/coreutils/realpath.c index aeeef601c..22820a789 100644 --- a/coreutils/realpath.c +++ b/coreutils/realpath.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config REALPATH | 10 | //config:config REALPATH |
| 11 | //config: bool "realpath (1.6 kb)" | 11 | //config: bool "realpath (2.5 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: Return the canonicalized absolute pathname. | 14 | //config: Return the canonicalized absolute pathname. |
diff --git a/coreutils/rm.c b/coreutils/rm.c index d000129d9..93e01a340 100644 --- a/coreutils/rm.c +++ b/coreutils/rm.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * Size reduction. | 11 | * Size reduction. |
| 12 | */ | 12 | */ |
| 13 | //config:config RM | 13 | //config:config RM |
| 14 | //config: bool "rm (5.4 kb)" | 14 | //config: bool "rm (5.5 kb)" |
| 15 | //config: default y | 15 | //config: default y |
| 16 | //config: help | 16 | //config: help |
| 17 | //config: rm is used to remove files or directories. | 17 | //config: rm is used to remove files or directories. |
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c index addf41188..96753e009 100644 --- a/coreutils/rmdir.c +++ b/coreutils/rmdir.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config RMDIR | 9 | //config:config RMDIR |
| 10 | //config: bool "rmdir (3.5 kb)" | 10 | //config: bool "rmdir (3.8 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: rmdir is used to remove empty directories. | 13 | //config: rmdir is used to remove empty directories. |
diff --git a/coreutils/seq.c b/coreutils/seq.c index 77a8aba8a..094f74e87 100644 --- a/coreutils/seq.c +++ b/coreutils/seq.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config SEQ | 9 | //config:config SEQ |
| 10 | //config: bool "seq (3.8 kb)" | 10 | //config: bool "seq (4 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: print a sequence of numbers | 13 | //config: print a sequence of numbers |
diff --git a/coreutils/shred.c b/coreutils/shred.c index 794d7b815..9e53b4820 100644 --- a/coreutils/shred.c +++ b/coreutils/shred.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Licensed under GPLv2, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 6 | */ | 6 | */ |
| 7 | //config:config SHRED | 7 | //config:config SHRED |
| 8 | //config: bool "shred (4.9 kb)" | 8 | //config: bool "shred (5.5 kb)" |
| 9 | //config: default y | 9 | //config: default y |
| 10 | //config: help | 10 | //config: help |
| 11 | //config: Overwrite a file to hide its contents, and optionally delete it | 11 | //config: Overwrite a file to hide its contents, and optionally delete it |
diff --git a/coreutils/shuf.c b/coreutils/shuf.c index d84a4fc37..bd3f6840c 100644 --- a/coreutils/shuf.c +++ b/coreutils/shuf.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config SHUF | 9 | //config:config SHUF |
| 10 | //config: bool "shuf (5.4 kb)" | 10 | //config: bool "shuf (6 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Generate random permutations | 13 | //config: Generate random permutations |
diff --git a/coreutils/sleep.c b/coreutils/sleep.c index a0cee5a4a..6edff59cc 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | * time suffixes for seconds, minutes, hours, and days. | 13 | * time suffixes for seconds, minutes, hours, and days. |
| 14 | */ | 14 | */ |
| 15 | //config:config SLEEP | 15 | //config:config SLEEP |
| 16 | //config: bool "sleep (2 kb)" | 16 | //config: bool "sleep (2.4 kb)" |
| 17 | //config: default y | 17 | //config: default y |
| 18 | //config: help | 18 | //config: help |
| 19 | //config: sleep is used to pause for a specified number of seconds. | 19 | //config: sleep is used to pause for a specified number of seconds. |
diff --git a/coreutils/sort.c b/coreutils/sort.c index 01b7c44e5..2e952f81c 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | * http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html | 12 | * http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html |
| 13 | */ | 13 | */ |
| 14 | //config:config SORT | 14 | //config:config SORT |
| 15 | //config: bool "sort (7.7 kb)" | 15 | //config: bool "sort (8.1 kb)" |
| 16 | //config: default y | 16 | //config: default y |
| 17 | //config: help | 17 | //config: help |
| 18 | //config: sort is used to sort lines of text in specified files. | 18 | //config: sort is used to sort lines of text in specified files. |
diff --git a/coreutils/split.c b/coreutils/split.c index 9393423a1..8d0e485d4 100644 --- a/coreutils/split.c +++ b/coreutils/split.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config SPLIT | 8 | //config:config SPLIT |
| 9 | //config: bool "split (5 kb)" | 9 | //config: bool "split (5.2 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: Split a file into pieces. | 12 | //config: Split a file into pieces. |
diff --git a/coreutils/stty.c b/coreutils/stty.c index ba2b78317..c88ef07f4 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Special for busybox ported by Vladimir Oleynik <dzo@simtreas.ru> 2001 | 10 | * Special for busybox ported by Vladimir Oleynik <dzo@simtreas.ru> 2001 |
| 11 | */ | 11 | */ |
| 12 | //config:config STTY | 12 | //config:config STTY |
| 13 | //config: bool "stty (8.9 kb)" | 13 | //config: bool "stty (9.2 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: stty is used to change and print terminal line settings. | 16 | //config: stty is used to change and print terminal line settings. |
diff --git a/coreutils/sum.c b/coreutils/sum.c index a15d1932d..7c7cc6b6b 100644 --- a/coreutils/sum.c +++ b/coreutils/sum.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 13 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 14 | */ | 14 | */ |
| 15 | //config:config SUM | 15 | //config:config SUM |
| 16 | //config: bool "sum (4 kb)" | 16 | //config: bool "sum (4.2 kb)" |
| 17 | //config: default y | 17 | //config: default y |
| 18 | //config: help | 18 | //config: help |
| 19 | //config: checksum and count the blocks in a file | 19 | //config: checksum and count the blocks in a file |
diff --git a/coreutils/sync.c b/coreutils/sync.c index ea328a54c..b6a4a4b70 100644 --- a/coreutils/sync.c +++ b/coreutils/sync.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config SYNC | 10 | //config:config SYNC |
| 11 | //config: bool "sync (3.8 kb)" | 11 | //config: bool "sync (4 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: sync is used to flush filesystem buffers. | 14 | //config: sync is used to flush filesystem buffers. |
| @@ -113,7 +113,7 @@ int sync_main(int argc UNUSED_PARAM, char **argv IF_NOT_DESKTOP(UNUSED_PARAM)) | |||
| 113 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 113 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 114 | */ | 114 | */ |
| 115 | //config:config FSYNC | 115 | //config:config FSYNC |
| 116 | //config: bool "fsync (3.6 kb)" | 116 | //config: bool "fsync (3.8 kb)" |
| 117 | //config: default y | 117 | //config: default y |
| 118 | //config: help | 118 | //config: help |
| 119 | //config: fsync is used to flush file-related cached blocks to disk. | 119 | //config: fsync is used to flush file-related cached blocks to disk. |
diff --git a/coreutils/tac.c b/coreutils/tac.c index 25e85f6f3..6d3ea9c19 100644 --- a/coreutils/tac.c +++ b/coreutils/tac.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | * http://www.uclibc.org/lists/busybox/2003-July/008813.html | 13 | * http://www.uclibc.org/lists/busybox/2003-July/008813.html |
| 14 | */ | 14 | */ |
| 15 | //config:config TAC | 15 | //config:config TAC |
| 16 | //config: bool "tac (3.9 kb)" | 16 | //config: bool "tac (4.1 kb)" |
| 17 | //config: default y | 17 | //config: default y |
| 18 | //config: help | 18 | //config: help |
| 19 | //config: tac is used to concatenate and print files in reverse. | 19 | //config: tac is used to concatenate and print files in reverse. |
diff --git a/coreutils/tail.c b/coreutils/tail.c index 6201eb023..4680295b9 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | * 7) lseek attempted when count==0 even if arg was +0 (from top) | 19 | * 7) lseek attempted when count==0 even if arg was +0 (from top) |
| 20 | */ | 20 | */ |
| 21 | //config:config TAIL | 21 | //config:config TAIL |
| 22 | //config: bool "tail (6.8 kb)" | 22 | //config: bool "tail (7.2 kb)" |
| 23 | //config: default y | 23 | //config: default y |
| 24 | //config: help | 24 | //config: help |
| 25 | //config: tail is used to print the last specified number of lines | 25 | //config: tail is used to print the last specified number of lines |
diff --git a/coreutils/tee.c b/coreutils/tee.c index e67296d43..603fd3ad4 100644 --- a/coreutils/tee.c +++ b/coreutils/tee.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config TEE | 9 | //config:config TEE |
| 10 | //config: bool "tee (4.2 kb)" | 10 | //config: bool "tee (4.4 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: tee is used to read from standard input and write | 13 | //config: tee is used to read from standard input and write |
diff --git a/coreutils/test.c b/coreutils/test.c index 1d1e6d18b..008d90b25 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | * "This program is in the Public Domain." | 20 | * "This program is in the Public Domain." |
| 21 | */ | 21 | */ |
| 22 | //config:config TEST | 22 | //config:config TEST |
| 23 | //config: bool "test (4.1 kb)" | 23 | //config: bool "test (4.4 kb)" |
| 24 | //config: default y | 24 | //config: default y |
| 25 | //config: help | 25 | //config: help |
| 26 | //config: test is used to check file types and compare values, | 26 | //config: test is used to check file types and compare values, |
diff --git a/coreutils/timeout.c b/coreutils/timeout.c index 8f306529f..0d6a2c612 100644 --- a/coreutils/timeout.c +++ b/coreutils/timeout.c | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | * rewrite 14-11-2008 vda | 28 | * rewrite 14-11-2008 vda |
| 29 | */ | 29 | */ |
| 30 | //config:config TIMEOUT | 30 | //config:config TIMEOUT |
| 31 | //config: bool "timeout (6 kb)" | 31 | //config: bool "timeout (6.5 kb)" |
| 32 | //config: default y | 32 | //config: default y |
| 33 | //config: help | 33 | //config: help |
| 34 | //config: Runs a program and watches it. If it does not terminate in | 34 | //config: Runs a program and watches it. If it does not terminate in |
diff --git a/coreutils/touch.c b/coreutils/touch.c index 7e13a27be..8fde70e12 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | * Also, exiting on a failure was a bug. All args should be processed. | 13 | * Also, exiting on a failure was a bug. All args should be processed. |
| 14 | */ | 14 | */ |
| 15 | //config:config TOUCH | 15 | //config:config TOUCH |
| 16 | //config: bool "touch (5.9 kb)" | 16 | //config: bool "touch (6.1 kb)" |
| 17 | //config: default y | 17 | //config: default y |
| 18 | //config: help | 18 | //config: help |
| 19 | //config: touch is used to create or change the access and/or | 19 | //config: touch is used to create or change the access and/or |
diff --git a/coreutils/tr.c b/coreutils/tr.c index 7fe7f89d5..8d779d8ea 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | * TODO: graph, print | 19 | * TODO: graph, print |
| 20 | */ | 20 | */ |
| 21 | //config:config TR | 21 | //config:config TR |
| 22 | //config: bool "tr (5.1 kb)" | 22 | //config: bool "tr (5.3 kb)" |
| 23 | //config: default y | 23 | //config: default y |
| 24 | //config: help | 24 | //config: help |
| 25 | //config: tr is used to squeeze, and/or delete characters from standard | 25 | //config: tr is used to squeeze, and/or delete characters from standard |
diff --git a/coreutils/true.c b/coreutils/true.c index 400388c34..02e533a0a 100644 --- a/coreutils/true.c +++ b/coreutils/true.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config TRUE | 9 | //config:config TRUE |
| 10 | //config: bool "true (tiny)" | 10 | //config: bool "true (311 bytes)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: true returns an exit code of TRUE (0). | 13 | //config: true returns an exit code of TRUE (0). |
diff --git a/coreutils/truncate.c b/coreutils/truncate.c index e26c3e3e1..8826e6b4c 100644 --- a/coreutils/truncate.c +++ b/coreutils/truncate.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config TRUNCATE | 8 | //config:config TRUNCATE |
| 9 | //config: bool "truncate (4.2 kb)" | 9 | //config: bool "truncate (4.4 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: truncate truncates files to a given size. If a file does | 12 | //config: truncate truncates files to a given size. If a file does |
diff --git a/coreutils/tsort.c b/coreutils/tsort.c index dedb65b15..a451ed2ff 100644 --- a/coreutils/tsort.c +++ b/coreutils/tsort.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * public domain -- David Leonard, 2022 | 5 | * public domain -- David Leonard, 2022 |
| 6 | */ | 6 | */ |
| 7 | //config:config TSORT | 7 | //config:config TSORT |
| 8 | //config: bool "tsort (0.7 kb)" | 8 | //config: bool "tsort (2.6 kb)" |
| 9 | //config: default y | 9 | //config: default y |
| 10 | //config: help | 10 | //config: help |
| 11 | //config: tsort performs a topological sort. | 11 | //config: tsort performs a topological sort. |
diff --git a/coreutils/tty.c b/coreutils/tty.c index e448c27ec..8f9a82b0e 100644 --- a/coreutils/tty.c +++ b/coreutils/tty.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config TTY | 9 | //config:config TTY |
| 10 | //config: bool "tty (3.6 kb)" | 10 | //config: bool "tty (3.9 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: tty is used to print the name of the current terminal to | 13 | //config: tty is used to print the name of the current terminal to |
diff --git a/coreutils/uname.c b/coreutils/uname.c index 6c0bdf096..e1e7a7660 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | * Fix handling of -a to not print "unknown", add -o and -i support. | 44 | * Fix handling of -a to not print "unknown", add -o and -i support. |
| 45 | */ | 45 | */ |
| 46 | //config:config UNAME | 46 | //config:config UNAME |
| 47 | //config: bool "uname (3.9 kb)" | 47 | //config: bool "uname (4.2 kb)" |
| 48 | //config: default y | 48 | //config: default y |
| 49 | //config: help | 49 | //config: help |
| 50 | //config: uname is used to print system information. | 50 | //config: uname is used to print system information. |
| @@ -59,7 +59,7 @@ | |||
| 59 | //config: | 59 | //config: |
| 60 | //can't use "ARCH" for this applet, all hell breaks loose in build system :) | 60 | //can't use "ARCH" for this applet, all hell breaks loose in build system :) |
| 61 | //config:config BB_ARCH | 61 | //config:config BB_ARCH |
| 62 | //config: bool "arch (1.1 kb)" | 62 | //config: bool "arch (1.4 kb)" |
| 63 | //config: default y | 63 | //config: default y |
| 64 | //config: help | 64 | //config: help |
| 65 | //config: Same as uname -m. | 65 | //config: Same as uname -m. |
diff --git a/coreutils/uniq.c b/coreutils/uniq.c index 06c57f750..2c112dadb 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config UNIQ | 9 | //config:config UNIQ |
| 10 | //config: bool "uniq (4.9 kb)" | 10 | //config: bool "uniq (5.1 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: uniq is used to remove duplicate lines from a sorted file. | 13 | //config: uniq is used to remove duplicate lines from a sorted file. |
diff --git a/coreutils/unlink.c b/coreutils/unlink.c index 24be81da6..61b108a84 100644 --- a/coreutils/unlink.c +++ b/coreutils/unlink.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see LICENSE in this source tree | 7 | * Licensed under GPLv2, see LICENSE in this source tree |
| 8 | */ | 8 | */ |
| 9 | //config:config UNLINK | 9 | //config:config UNLINK |
| 10 | //config: bool "unlink (3.2 kb)" | 10 | //config: bool "unlink (3.5 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: unlink deletes a file by calling unlink() | 13 | //config: unlink deletes a file by calling unlink() |
diff --git a/coreutils/usleep.c b/coreutils/usleep.c index 51a015c44..bb619405b 100644 --- a/coreutils/usleep.c +++ b/coreutils/usleep.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config USLEEP | 9 | //config:config USLEEP |
| 10 | //config: bool "usleep (1.3 kb)" | 10 | //config: bool "usleep (1.6 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: usleep is used to pause for a specified number of microseconds. | 13 | //config: usleep is used to pause for a specified number of microseconds. |
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index 63a8d4d48..59768f87e 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * "end" line | 11 | * "end" line |
| 12 | */ | 12 | */ |
| 13 | //config:config UUDECODE | 13 | //config:config UUDECODE |
| 14 | //config: bool "uudecode (5.8 kb)" | 14 | //config: bool "uudecode (5.9 kb)" |
| 15 | //config: default y | 15 | //config: default y |
| 16 | //config: help | 16 | //config: help |
| 17 | //config: uudecode is used to decode a uuencoded file. | 17 | //config: uudecode is used to decode a uuencoded file. |
| @@ -178,13 +178,13 @@ int uudecode_main(int argc UNUSED_PARAM, char **argv) | |||
| 178 | #endif | 178 | #endif |
| 179 | 179 | ||
| 180 | //config:config BASE32 | 180 | //config:config BASE32 |
| 181 | //config: bool "base32 (4.9 kb)" | 181 | //config: bool "base32 (5.5 kb)" |
| 182 | //config: default y | 182 | //config: default y |
| 183 | //config: help | 183 | //config: help |
| 184 | //config: Base32 encode and decode | 184 | //config: Base32 encode and decode |
| 185 | 185 | ||
| 186 | //config:config BASE64 | 186 | //config:config BASE64 |
| 187 | //config: bool "base64 (4.9 kb)" | 187 | //config: bool "base64 (5.3 kb)" |
| 188 | //config: default y | 188 | //config: default y |
| 189 | //config: help | 189 | //config: help |
| 190 | //config: Base64 encode and decode | 190 | //config: Base64 encode and decode |
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c index f096e3122..97ff39ee3 100644 --- a/coreutils/uuencode.c +++ b/coreutils/uuencode.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config UUENCODE | 10 | //config:config UUENCODE |
| 11 | //config: bool "uuencode (4.4 kb)" | 11 | //config: bool "uuencode (4.7 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: uuencode is used to uuencode a file. | 14 | //config: uuencode is used to uuencode a file. |
diff --git a/coreutils/wc.c b/coreutils/wc.c index d5238d3fc..de75aba72 100644 --- a/coreutils/wc.c +++ b/coreutils/wc.c | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | * for which 'wc -c' should output '0'. | 33 | * for which 'wc -c' should output '0'. |
| 34 | */ | 34 | */ |
| 35 | //config:config WC | 35 | //config:config WC |
| 36 | //config: bool "wc (4.5 kb)" | 36 | //config: bool "wc (4.7 kb)" |
| 37 | //config: default y | 37 | //config: default y |
| 38 | //config: help | 38 | //config: help |
| 39 | //config: wc is used to print the number of bytes, words, and lines, | 39 | //config: wc is used to print the number of bytes, words, and lines, |
diff --git a/coreutils/who.c b/coreutils/who.c index 3725d77f5..6f96f7243 100644 --- a/coreutils/who.c +++ b/coreutils/who.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 15 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 16 | */ | 16 | */ |
| 17 | //config:config WHO | 17 | //config:config WHO |
| 18 | //config: bool "who (3.9 kb)" | 18 | //config: bool "who (5.6 kb)" |
| 19 | //config: default y | 19 | //config: default y |
| 20 | //config: depends on FEATURE_UTMP | 20 | //config: depends on FEATURE_UTMP |
| 21 | //config: help | 21 | //config: help |
| @@ -23,14 +23,14 @@ | |||
| 23 | //config: | 23 | //config: |
| 24 | // procps-ng has this variation of "who": | 24 | // procps-ng has this variation of "who": |
| 25 | //config:config W | 25 | //config:config W |
| 26 | //config: bool "w (3.8 kb)" | 26 | //config: bool "w (5.5 kb)" |
| 27 | //config: default y | 27 | //config: default y |
| 28 | //config: depends on FEATURE_UTMP | 28 | //config: depends on FEATURE_UTMP |
| 29 | //config: help | 29 | //config: help |
| 30 | //config: Print users currently logged on. | 30 | //config: Print users currently logged on. |
| 31 | //config: | 31 | //config: |
| 32 | //config:config USERS | 32 | //config:config USERS |
| 33 | //config: bool "users (3.4 kb)" | 33 | //config: bool "users (3.6 kb)" |
| 34 | //config: default y | 34 | //config: default y |
| 35 | //config: depends on FEATURE_UTMP | 35 | //config: depends on FEATURE_UTMP |
| 36 | //config: help | 36 | //config: help |
diff --git a/coreutils/whoami.c b/coreutils/whoami.c index 49b5dd368..7e94d51fb 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config WHOAMI | 9 | //config:config WHOAMI |
| 10 | //config: bool "whoami (3.2 kb)" | 10 | //config: bool "whoami (3.5 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: whoami is used to print the username of the current | 13 | //config: whoami is used to print the username of the current |
diff --git a/coreutils/yes.c b/coreutils/yes.c index 7eb8ac1ba..493462201 100644 --- a/coreutils/yes.c +++ b/coreutils/yes.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * Size reductions and removed redundant applet name prefix from error messages. | 11 | * Size reductions and removed redundant applet name prefix from error messages. |
| 12 | */ | 12 | */ |
| 13 | //config:config YES | 13 | //config:config YES |
| 14 | //config: bool "yes (1.2 kb)" | 14 | //config: bool "yes (1.5 kb)" |
| 15 | //config: default y | 15 | //config: default y |
| 16 | //config: help | 16 | //config: help |
| 17 | //config: yes is used to repeatedly output a specific string, or | 17 | //config: yes is used to repeatedly output a specific string, or |
diff --git a/debianutils/pipe_progress.c b/debianutils/pipe_progress.c index 28c4fd70e..7bdf5c064 100644 --- a/debianutils/pipe_progress.c +++ b/debianutils/pipe_progress.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config PIPE_PROGRESS | 9 | //config:config PIPE_PROGRESS |
| 10 | //config: bool "pipe_progress (275 bytes)" | 10 | //config: bool "pipe_progress (576 bytes)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Display a dot to indicate pipe activity. | 13 | //config: Display a dot to indicate pipe activity. |
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index f528c88ff..780df3e96 100644 --- a/debianutils/run_parts.c +++ b/debianutils/run_parts.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | * broken compatibility because the BusyBox policy doesn't allow them. | 23 | * broken compatibility because the BusyBox policy doesn't allow them. |
| 24 | */ | 24 | */ |
| 25 | //config:config RUN_PARTS | 25 | //config:config RUN_PARTS |
| 26 | //config: bool "run-parts (6.1 kb)" | 26 | //config: bool "run-parts (6.2 kb)" |
| 27 | //config: default y | 27 | //config: default y |
| 28 | //config: help | 28 | //config: help |
| 29 | //config: run-parts is a utility designed to run all the scripts in a directory. | 29 | //config: run-parts is a utility designed to run all the scripts in a directory. |
diff --git a/debianutils/which.c b/debianutils/which.c index 4af6daf4f..6815768ab 100644 --- a/debianutils/which.c +++ b/debianutils/which.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config WHICH | 8 | //config:config WHICH |
| 9 | //config: bool "which (3.8 kb)" | 9 | //config: bool "which (4 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: which is used to find programs in your PATH and | 12 | //config: which is used to find programs in your PATH and |
diff --git a/e2fsprogs/chattr.c b/e2fsprogs/chattr.c index fc500f229..d8f92137e 100644 --- a/e2fsprogs/chattr.c +++ b/e2fsprogs/chattr.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Public License | 10 | * Public License |
| 11 | */ | 11 | */ |
| 12 | //config:config CHATTR | 12 | //config:config CHATTR |
| 13 | //config: bool "chattr (3.8 kb)" | 13 | //config: bool "chattr (4.1 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: chattr changes the file attributes on a second extended file system. | 16 | //config: chattr changes the file attributes on a second extended file system. |
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c index 028f8a803..fd4ea737c 100644 --- a/e2fsprogs/fsck.c +++ b/e2fsprogs/fsck.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | * It doesn't guess filesystem types from on-disk format. | 34 | * It doesn't guess filesystem types from on-disk format. |
| 35 | */ | 35 | */ |
| 36 | //config:config FSCK | 36 | //config:config FSCK |
| 37 | //config: bool "fsck (7.4 kb)" | 37 | //config: bool "fsck (7.6 kb)" |
| 38 | //config: default y | 38 | //config: default y |
| 39 | //config: help | 39 | //config: help |
| 40 | //config: fsck is used to check and optionally repair one or more filesystems. | 40 | //config: fsck is used to check and optionally repair one or more filesystems. |
diff --git a/e2fsprogs/lsattr.c b/e2fsprogs/lsattr.c index 87fdb78b3..427552f7a 100644 --- a/e2fsprogs/lsattr.c +++ b/e2fsprogs/lsattr.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Public License | 10 | * Public License |
| 11 | */ | 11 | */ |
| 12 | //config:config LSATTR | 12 | //config:config LSATTR |
| 13 | //config: bool "lsattr (5.5 kb)" | 13 | //config: bool "lsattr (5.7 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: lsattr lists the file attributes on a second extended file system. | 16 | //config: lsattr lists the file attributes on a second extended file system. |
diff --git a/editors/awk.c b/editors/awk.c index 878fffa1a..5045297cd 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config AWK | 9 | //config:config AWK |
| 10 | //config: bool "awk (23 kb)" | 10 | //config: bool "awk (24 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Awk is used as a pattern scanning and processing language. | 13 | //config: Awk is used as a pattern scanning and processing language. |
diff --git a/editors/cmp.c b/editors/cmp.c index b89e519ad..54f347508 100644 --- a/editors/cmp.c +++ b/editors/cmp.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config CMP | 9 | //config:config CMP |
| 10 | //config: bool "cmp (4.9 kb)" | 10 | //config: bool "cmp (5.3 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: cmp is used to compare two files and returns the result | 13 | //config: cmp is used to compare two files and returns the result |
diff --git a/editors/ed.c b/editors/ed.c index 4a84f7433..8ec23d07f 100644 --- a/editors/ed.c +++ b/editors/ed.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * The "ed" built-in command (much simplified) | 7 | * The "ed" built-in command (much simplified) |
| 8 | */ | 8 | */ |
| 9 | //config:config ED | 9 | //config:config ED |
| 10 | //config: bool "ed (21 kb)" | 10 | //config: bool "ed (16 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: The original 1970's Unix text editor, from the days of teletypes. | 13 | //config: The original 1970's Unix text editor, from the days of teletypes. |
diff --git a/editors/patch.c b/editors/patch.c index f90d6854d..5a768b23f 100644 --- a/editors/patch.c +++ b/editors/patch.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | * [file] which file to patch | 21 | * [file] which file to patch |
| 22 | */ | 22 | */ |
| 23 | //config:config PATCH | 23 | //config:config PATCH |
| 24 | //config: bool "patch (9.4 kb)" | 24 | //config: bool "patch (9.6 kb)" |
| 25 | //config: default y | 25 | //config: default y |
| 26 | //config: help | 26 | //config: help |
| 27 | //config: Apply a unified diff formatted patch. | 27 | //config: Apply a unified diff formatted patch. |
diff --git a/editors/patch_toybox.c b/editors/patch_toybox.c index 5478ece7d..c0631d8cd 100644 --- a/editors/patch_toybox.c +++ b/editors/patch_toybox.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | USE_PATCH(NEWTOY(patch, USE_TOYBOX_DEBUG("x")"up#i:R", TOYFLAG_USR|TOYFLAG_BIN)) | 26 | USE_PATCH(NEWTOY(patch, USE_TOYBOX_DEBUG("x")"up#i:R", TOYFLAG_USR|TOYFLAG_BIN)) |
| 27 | 27 | ||
| 28 | config PATCH | 28 | config PATCH |
| 29 | bool "patch (9.4 kb)" | 29 | bool "patch (9.6 kb)" |
| 30 | default y | 30 | default y |
| 31 | help | 31 | help |
| 32 | usage: patch [-i file] [-p depth] [-Ru] | 32 | usage: patch [-i file] [-p depth] [-Ru] |
diff --git a/editors/vi.c b/editors/vi.c index 74028e2b4..b49d5454d 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | // An "ex" line oriented mode- maybe using "cmdedit" | 18 | // An "ex" line oriented mode- maybe using "cmdedit" |
| 19 | 19 | ||
| 20 | //config:config VI | 20 | //config:config VI |
| 21 | //config: bool "vi (23 kb)" | 21 | //config: bool "vi (26 kb)" |
| 22 | //config: default y | 22 | //config: default y |
| 23 | //config: help | 23 | //config: help |
| 24 | //config: 'vi' is a text editor. More specifically, it is the One True | 24 | //config: 'vi' is a text editor. More specifically, it is the One True |
diff --git a/findutils/find.c b/findutils/find.c index a78dd9875..c1d03c9f6 100644 --- a/findutils/find.c +++ b/findutils/find.c | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | * diff -u /tmp/std_find /tmp/bb_find && echo Identical | 51 | * diff -u /tmp/std_find /tmp/bb_find && echo Identical |
| 52 | */ | 52 | */ |
| 53 | //config:config FIND | 53 | //config:config FIND |
| 54 | //config: bool "find (14 kb)" | 54 | //config: bool "find (16 kb)" |
| 55 | //config: default y | 55 | //config: default y |
| 56 | //config: help | 56 | //config: help |
| 57 | //config: find is used to search your system to find specified files. | 57 | //config: find is used to search your system to find specified files. |
diff --git a/findutils/grep.c b/findutils/grep.c index 0b72812f1..f6d0a73f4 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
| @@ -18,19 +18,19 @@ | |||
| 18 | * (C) 2006 Jac Goudsmit added -o option | 18 | * (C) 2006 Jac Goudsmit added -o option |
| 19 | */ | 19 | */ |
| 20 | //config:config GREP | 20 | //config:config GREP |
| 21 | //config: bool "grep (8.6 kb)" | 21 | //config: bool "grep (8.9 kb)" |
| 22 | //config: default y | 22 | //config: default y |
| 23 | //config: help | 23 | //config: help |
| 24 | //config: grep is used to search files for a specified pattern. | 24 | //config: grep is used to search files for a specified pattern. |
| 25 | //config: | 25 | //config: |
| 26 | //config:config EGREP | 26 | //config:config EGREP |
| 27 | //config: bool "egrep (7.8 kb)" | 27 | //config: bool "egrep (8 kb)" |
| 28 | //config: default y | 28 | //config: default y |
| 29 | //config: help | 29 | //config: help |
| 30 | //config: Alias to "grep -E". | 30 | //config: Alias to "grep -E". |
| 31 | //config: | 31 | //config: |
| 32 | //config:config FGREP | 32 | //config:config FGREP |
| 33 | //config: bool "fgrep (7.8 kb)" | 33 | //config: bool "fgrep (8 kb)" |
| 34 | //config: default y | 34 | //config: default y |
| 35 | //config: help | 35 | //config: help |
| 36 | //config: Alias to "grep -F". | 36 | //config: Alias to "grep -F". |
diff --git a/findutils/xargs.c b/findutils/xargs.c index 1e7d8de02..37064be9d 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | * http://www.opengroup.org/onlinepubs/007904975/utilities/xargs.html | 15 | * http://www.opengroup.org/onlinepubs/007904975/utilities/xargs.html |
| 16 | */ | 16 | */ |
| 17 | //config:config XARGS | 17 | //config:config XARGS |
| 18 | //config: bool "xargs (7.2 kb)" | 18 | //config: bool "xargs (7.6 kb)" |
| 19 | //config: default y | 19 | //config: default y |
| 20 | //config: help | 20 | //config: help |
| 21 | //config: xargs is used to execute a specified command for | 21 | //config: xargs is used to execute a specified command for |
| @@ -961,7 +961,7 @@ void bb_show_usage(void) | |||
| 961 | { | 961 | { |
| 962 | fprintf(stderr, "Usage: %s [-p] [-r] [-t] -[x] [-n max_arg] [-s max_chars]\n", | 962 | fprintf(stderr, "Usage: %s [-p] [-r] [-t] -[x] [-n max_arg] [-s max_chars]\n", |
| 963 | applet_name); | 963 | applet_name); |
| 964 | exit(EXIT_FAILURE); | 964 | exit_FAILURE(); |
| 965 | } | 965 | } |
| 966 | 966 | ||
| 967 | int main(int argc, char **argv) | 967 | int main(int argc, char **argv) |
diff --git a/include/libbb.h b/include/libbb.h index 5c4a01e8d..ae10c3bf0 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -1345,6 +1345,8 @@ void set_task_comm(const char *comm) FAST_FUNC; | |||
| 1345 | #endif | 1345 | #endif |
| 1346 | void exit_SUCCESS(void) NORETURN FAST_FUNC; | 1346 | void exit_SUCCESS(void) NORETURN FAST_FUNC; |
| 1347 | void _exit_SUCCESS(void) NORETURN FAST_FUNC; | 1347 | void _exit_SUCCESS(void) NORETURN FAST_FUNC; |
| 1348 | void exit_FAILURE(void) NORETURN FAST_FUNC; | ||
| 1349 | void _exit_FAILURE(void) NORETURN FAST_FUNC; | ||
| 1348 | 1350 | ||
| 1349 | /* Helpers for daemonization. | 1351 | /* Helpers for daemonization. |
| 1350 | * | 1352 | * |
| @@ -1575,6 +1577,8 @@ int hush_main(int argc, char** argv) IF_SHELL_HUSH(MAIN_EXTERNALLY_VISIBLE); | |||
| 1575 | /* If shell needs them, they exist even if not enabled as applets */ | 1577 | /* If shell needs them, they exist even if not enabled as applets */ |
| 1576 | int echo_main(int argc, char** argv) IF_ECHO(MAIN_EXTERNALLY_VISIBLE); | 1578 | int echo_main(int argc, char** argv) IF_ECHO(MAIN_EXTERNALLY_VISIBLE); |
| 1577 | int sleep_main(int argc, char **argv) IF_SLEEP(MAIN_EXTERNALLY_VISIBLE); | 1579 | int sleep_main(int argc, char **argv) IF_SLEEP(MAIN_EXTERNALLY_VISIBLE); |
| 1580 | /* See disabled "config ASH_SLEEP" in ash.c */ | ||
| 1581 | #define ENABLE_ASH_SLEEP 0 | ||
| 1578 | int printf_main(int argc, char **argv) IF_PRINTF(MAIN_EXTERNALLY_VISIBLE); | 1582 | int printf_main(int argc, char **argv) IF_PRINTF(MAIN_EXTERNALLY_VISIBLE); |
| 1579 | int test_main(int argc, char **argv) | 1583 | int test_main(int argc, char **argv) |
| 1580 | #if ENABLE_TEST || ENABLE_TEST1 || ENABLE_TEST2 | 1584 | #if ENABLE_TEST || ENABLE_TEST1 || ENABLE_TEST2 |
diff --git a/include/rtc_.h b/include/rtc_.h index 24ff5363f..782966090 100644 --- a/include/rtc_.h +++ b/include/rtc_.h | |||
| @@ -46,6 +46,17 @@ struct linux_rtc_wkalrm { | |||
| 46 | struct linux_rtc_time time; /* time the alarm is set to */ | 46 | struct linux_rtc_time time; /* time the alarm is set to */ |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | struct rtc_param { | ||
| 50 | uint64_t param; | ||
| 51 | union { | ||
| 52 | uint64_t uvalue; | ||
| 53 | int64_t svalue; | ||
| 54 | uint64_t ptr; | ||
| 55 | }; | ||
| 56 | uint32_t index; | ||
| 57 | uint32_t __pad; | ||
| 58 | }; | ||
| 59 | |||
| 49 | /* | 60 | /* |
| 50 | * ioctl calls that are permitted to the /dev/rtc interface, if | 61 | * ioctl calls that are permitted to the /dev/rtc interface, if |
| 51 | * any of the RTC drivers are enabled. | 62 | * any of the RTC drivers are enabled. |
| @@ -71,12 +82,19 @@ struct linux_rtc_wkalrm { | |||
| 71 | #define RTC_WKALM_SET _IOW('p', 0x0f, struct linux_rtc_wkalrm)/* Set wakeup alarm*/ | 82 | #define RTC_WKALM_SET _IOW('p', 0x0f, struct linux_rtc_wkalrm)/* Set wakeup alarm*/ |
| 72 | #define RTC_WKALM_RD _IOR('p', 0x10, struct linux_rtc_wkalrm)/* Get wakeup alarm*/ | 83 | #define RTC_WKALM_RD _IOR('p', 0x10, struct linux_rtc_wkalrm)/* Get wakeup alarm*/ |
| 73 | 84 | ||
| 85 | #define RTC_PARAM_GET _IOW('p', 0x13, struct rtc_param) /* Get parameter */ | ||
| 86 | #define RTC_PARAM_SET _IOW('p', 0x14, struct rtc_param) /* Set parameter */ | ||
| 87 | |||
| 74 | /* interrupt flags */ | 88 | /* interrupt flags */ |
| 75 | #define RTC_IRQF 0x80 /* any of the following is active */ | 89 | #define RTC_IRQF 0x80 /* any of the following is active */ |
| 76 | #define RTC_PF 0x40 | 90 | #define RTC_PF 0x40 |
| 77 | #define RTC_AF 0x20 | 91 | #define RTC_AF 0x20 |
| 78 | #define RTC_UF 0x10 | 92 | #define RTC_UF 0x10 |
| 79 | 93 | ||
| 94 | #define RTC_PARAM_FEATURES 0 | ||
| 95 | #define RTC_PARAM_CORRECTION 1 | ||
| 96 | #define RTC_PARAM_BACKUP_SWITCH_MODE 2 | ||
| 97 | |||
| 80 | POP_SAVED_FUNCTION_VISIBILITY | 98 | POP_SAVED_FUNCTION_VISIBILITY |
| 81 | 99 | ||
| 82 | #endif | 100 | #endif |
diff --git a/init/halt.c b/init/halt.c index fe3cb9e75..7aea8cfec 100644 --- a/init/halt.c +++ b/init/halt.c | |||
| @@ -7,19 +7,19 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config HALT | 9 | //config:config HALT |
| 10 | //config: bool "halt (4 kb)" | 10 | //config: bool "halt (4.3 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Stop all processes and halt the system. | 13 | //config: Stop all processes and halt the system. |
| 14 | //config: | 14 | //config: |
| 15 | //config:config POWEROFF | 15 | //config:config POWEROFF |
| 16 | //config: bool "poweroff (4 kb)" | 16 | //config: bool "poweroff (4.3 kb)" |
| 17 | //config: default y | 17 | //config: default y |
| 18 | //config: help | 18 | //config: help |
| 19 | //config: Stop all processes and power off the system. | 19 | //config: Stop all processes and power off the system. |
| 20 | //config: | 20 | //config: |
| 21 | //config:config REBOOT | 21 | //config:config REBOOT |
| 22 | //config: bool "reboot (4 kb)" | 22 | //config: bool "reboot (4.3 kb)" |
| 23 | //config: default y | 23 | //config: default y |
| 24 | //config: help | 24 | //config: help |
| 25 | //config: Stop all processes and reboot the system. | 25 | //config: Stop all processes and reboot the system. |
diff --git a/init/init.c b/init/init.c index 1e1ce833d..2ee1e4cde 100644 --- a/init/init.c +++ b/init/init.c | |||
| @@ -500,7 +500,7 @@ static pid_t run(const struct init_action *a) | |||
| 500 | 500 | ||
| 501 | /* Open the new terminal device */ | 501 | /* Open the new terminal device */ |
| 502 | if (!open_stdio_to_tty(a->terminal)) | 502 | if (!open_stdio_to_tty(a->terminal)) |
| 503 | _exit(EXIT_FAILURE); | 503 | _exit_FAILURE(); |
| 504 | 504 | ||
| 505 | /* NB: on NOMMU we can't wait for input in child, so | 505 | /* NB: on NOMMU we can't wait for input in child, so |
| 506 | * "askfirst" will work the same as "respawn". */ | 506 | * "askfirst" will work the same as "respawn". */ |
diff --git a/klibc-utils/resume.c b/klibc-utils/resume.c index 8c4ab26c4..7b9d18b5d 100644 --- a/klibc-utils/resume.c +++ b/klibc-utils/resume.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Licensed under GPLv2, see file LICENSE in this source tree. | 4 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 5 | */ | 5 | */ |
| 6 | //config:config RESUME | 6 | //config:config RESUME |
| 7 | //config: bool "resume (3.2 kb)" | 7 | //config: bool "resume (3.6 kb)" |
| 8 | //config: default y | 8 | //config: default y |
| 9 | //config: help | 9 | //config: help |
| 10 | //config: Resume from saved "suspend-to-disk" image | 10 | //config: Resume from saved "suspend-to-disk" image |
diff --git a/klibc-utils/run-init.c b/klibc-utils/run-init.c index 73c677bab..5eadd9fc0 100644 --- a/klibc-utils/run-init.c +++ b/klibc-utils/run-init.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config RUN_INIT | 8 | //config:config RUN_INIT |
| 9 | //config: bool "run-init (7.7 kb)" | 9 | //config: bool "run-init (8 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: The run-init utility is used from initramfs to select a new | 12 | //config: The run-init utility is used from initramfs to select a new |
diff --git a/libbb/perror_nomsg.c b/libbb/perror_nomsg.c index a2a11cc8e..670ccbc0c 100644 --- a/libbb/perror_nomsg.c +++ b/libbb/perror_nomsg.c | |||
| @@ -6,17 +6,9 @@ | |||
| 6 | * | 6 | * |
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | #include "libbb.h" | ||
| 9 | 10 | ||
| 10 | /* gcc warns about a null format string, therefore we provide | ||
| 11 | * modified definition without "attribute (format)" | ||
| 12 | * instead of including libbb.h */ | ||
| 13 | //#include "libbb.h" | ||
| 14 | #include "platform.h" | ||
| 15 | extern void bb_perror_msg(const char *s, ...) FAST_FUNC; | ||
| 16 | |||
| 17 | /* suppress gcc "no previous prototype" warning */ | ||
| 18 | void FAST_FUNC bb_perror_nomsg(void); | ||
| 19 | void FAST_FUNC bb_perror_nomsg(void) | 11 | void FAST_FUNC bb_perror_nomsg(void) |
| 20 | { | 12 | { |
| 21 | bb_perror_msg(0); | 13 | bb_simple_perror_msg(""); |
| 22 | } | 14 | } |
diff --git a/libbb/perror_nomsg_and_die.c b/libbb/perror_nomsg_and_die.c index 543ff5178..4151e0246 100644 --- a/libbb/perror_nomsg_and_die.c +++ b/libbb/perror_nomsg_and_die.c | |||
| @@ -6,17 +6,9 @@ | |||
| 6 | * | 6 | * |
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | #include "libbb.h" | ||
| 9 | 10 | ||
| 10 | /* gcc warns about a null format string, therefore we provide | ||
| 11 | * modified definition without "attribute (format)" | ||
| 12 | * instead of including libbb.h */ | ||
| 13 | //#include "libbb.h" | ||
| 14 | #include "platform.h" | ||
| 15 | extern void bb_perror_msg_and_die(const char *s, ...) FAST_FUNC; | ||
| 16 | |||
| 17 | /* suppress gcc "no previous prototype" warning */ | ||
| 18 | void FAST_FUNC bb_perror_nomsg_and_die(void); | ||
| 19 | void FAST_FUNC bb_perror_nomsg_and_die(void) | 11 | void FAST_FUNC bb_perror_nomsg_and_die(void) |
| 20 | { | 12 | { |
| 21 | bb_perror_msg_and_die(0); | 13 | bb_simple_perror_msg_and_die(""); |
| 22 | } | 14 | } |
diff --git a/libbb/verror_msg.c b/libbb/verror_msg.c index 71512aee2..74b608f4c 100644 --- a/libbb/verror_msg.c +++ b/libbb/verror_msg.c | |||
| @@ -26,9 +26,6 @@ void FAST_FUNC bb_verror_msg(const char *s, va_list p, const char* strerr) | |||
| 26 | if (!logmode) | 26 | if (!logmode) |
| 27 | return; | 27 | return; |
| 28 | 28 | ||
| 29 | if (!s) /* nomsg[_and_die] uses NULL fmt */ | ||
| 30 | s = ""; /* some libc don't like printf(NULL) */ | ||
| 31 | |||
| 32 | applet_len = strlen(applet_name) + 2; /* "applet: " */ | 29 | applet_len = strlen(applet_name) + 2; /* "applet: " */ |
| 33 | strerr_len = strerr ? strlen(strerr) : 0; | 30 | strerr_len = strerr ? strlen(strerr) : 0; |
| 34 | msgeol_len = strlen(msg_eol); | 31 | msgeol_len = strlen(msg_eol); |
| @@ -116,9 +113,6 @@ void FAST_FUNC bb_verror_msg(const char *s, va_list p, const char* strerr) | |||
| 116 | if (!logmode) | 113 | if (!logmode) |
| 117 | return; | 114 | return; |
| 118 | 115 | ||
| 119 | if (!s) /* nomsg[_and_die] uses NULL fmt */ | ||
| 120 | s = ""; /* some libc don't like printf(NULL) */ | ||
| 121 | |||
| 122 | /* Prevent "derefing type-punned ptr will break aliasing rules" */ | 116 | /* Prevent "derefing type-punned ptr will break aliasing rules" */ |
| 123 | used = vasprintf((char**)(void*)msgptr, s, p); | 117 | used = vasprintf((char**)(void*)msgptr, s, p); |
| 124 | if (used < 0) | 118 | if (used < 0) |
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 813985194..c365fb8be 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c | |||
| @@ -442,3 +442,13 @@ void FAST_FUNC _exit_SUCCESS(void) | |||
| 442 | { | 442 | { |
| 443 | _exit(EXIT_SUCCESS); | 443 | _exit(EXIT_SUCCESS); |
| 444 | } | 444 | } |
| 445 | |||
| 446 | void FAST_FUNC exit_FAILURE(void) | ||
| 447 | { | ||
| 448 | exit(EXIT_FAILURE); | ||
| 449 | } | ||
| 450 | |||
| 451 | void FAST_FUNC _exit_FAILURE(void) | ||
| 452 | { | ||
| 453 | _exit(EXIT_FAILURE); | ||
| 454 | } | ||
diff --git a/loginutils/add-remove-shell.c b/loginutils/add-remove-shell.c index b09555aae..2470050e7 100644 --- a/loginutils/add-remove-shell.c +++ b/loginutils/add-remove-shell.c | |||
| @@ -8,13 +8,13 @@ | |||
| 8 | * for details. | 8 | * for details. |
| 9 | */ | 9 | */ |
| 10 | //config:config ADD_SHELL | 10 | //config:config ADD_SHELL |
| 11 | //config: bool "add-shell (3.1 kb)" | 11 | //config: bool "add-shell (3.3 kb)" |
| 12 | //config: default y if DESKTOP | 12 | //config: default y if DESKTOP |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: Add shells to /etc/shells. | 14 | //config: Add shells to /etc/shells. |
| 15 | //config: | 15 | //config: |
| 16 | //config:config REMOVE_SHELL | 16 | //config:config REMOVE_SHELL |
| 17 | //config: bool "remove-shell (3 kb)" | 17 | //config: bool "remove-shell (3.3 kb)" |
| 18 | //config: default y if DESKTOP | 18 | //config: default y if DESKTOP |
| 19 | //config: help | 19 | //config: help |
| 20 | //config: Remove shells from /etc/shells. | 20 | //config: Remove shells from /etc/shells. |
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c index 2a83c8a15..2b5ac7550 100644 --- a/loginutils/addgroup.c +++ b/loginutils/addgroup.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config ADDGROUP | 11 | //config:config ADDGROUP |
| 12 | //config: bool "addgroup (8.6 kb)" | 12 | //config: bool "addgroup (8.8 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: select LONG_OPTS | 14 | //config: select LONG_OPTS |
| 15 | //config: help | 15 | //config: help |
| @@ -102,7 +102,7 @@ static void new_group(char *group, gid_t gid) | |||
| 102 | /* add entry to group */ | 102 | /* add entry to group */ |
| 103 | p = xasprintf("x:%u:", (unsigned) gr.gr_gid); | 103 | p = xasprintf("x:%u:", (unsigned) gr.gr_gid); |
| 104 | if (update_passwd(bb_path_group_file, group, p, NULL) < 0) | 104 | if (update_passwd(bb_path_group_file, group, p, NULL) < 0) |
| 105 | exit(EXIT_FAILURE); | 105 | exit_FAILURE(); |
| 106 | if (ENABLE_FEATURE_CLEAN_UP) | 106 | if (ENABLE_FEATURE_CLEAN_UP) |
| 107 | free(p); | 107 | free(p); |
| 108 | #if ENABLE_FEATURE_SHADOWPASSWDS | 108 | #if ENABLE_FEATURE_SHADOWPASSWDS |
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c index a032abbed..65530b614 100644 --- a/loginutils/chpasswd.c +++ b/loginutils/chpasswd.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config CHPASSWD | 8 | //config:config CHPASSWD |
| 9 | //config: bool "chpasswd (18 kb)" | 9 | //config: bool "chpasswd (19 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: Reads a file of user name and password pairs from standard input | 12 | //config: Reads a file of user name and password pairs from standard input |
diff --git a/loginutils/cryptpw.c b/loginutils/cryptpw.c index 2109e2eb5..1c338540f 100644 --- a/loginutils/cryptpw.c +++ b/loginutils/cryptpw.c | |||
| @@ -10,14 +10,14 @@ | |||
| 10 | * Licensed under GPLv2, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 11 | */ | 11 | */ |
| 12 | //config:config CRYPTPW | 12 | //config:config CRYPTPW |
| 13 | //config: bool "cryptpw (14 kb)" | 13 | //config: bool "cryptpw (15 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: Encrypts the given password with the crypt(3) libc function | 16 | //config: Encrypts the given password with the crypt(3) libc function |
| 17 | //config: using the given salt. | 17 | //config: using the given salt. |
| 18 | //config: | 18 | //config: |
| 19 | //config:config MKPASSWD | 19 | //config:config MKPASSWD |
| 20 | //config: bool "mkpasswd (15 kb)" | 20 | //config: bool "mkpasswd (16 kb)" |
| 21 | //config: default y | 21 | //config: default y |
| 22 | //config: help | 22 | //config: help |
| 23 | //config: Encrypts the given password with the crypt(3) libc function | 23 | //config: Encrypts the given password with the crypt(3) libc function |
diff --git a/loginutils/deluser.c b/loginutils/deluser.c index 8e7df737c..a82ffc317 100644 --- a/loginutils/deluser.c +++ b/loginutils/deluser.c | |||
| @@ -9,13 +9,13 @@ | |||
| 9 | * Licensed under GPLv2, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config DELUSER | 11 | //config:config DELUSER |
| 12 | //config: bool "deluser (9.1 kb)" | 12 | //config: bool "deluser (9.3 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: Utility for deleting a user account. | 15 | //config: Utility for deleting a user account. |
| 16 | //config: | 16 | //config: |
| 17 | //config:config DELGROUP | 17 | //config:config DELGROUP |
| 18 | //config: bool "delgroup (6.4 kb)" | 18 | //config: bool "delgroup (6.6 kb)" |
| 19 | //config: default y | 19 | //config: default y |
| 20 | //config: help | 20 | //config: help |
| 21 | //config: Utility for deleting a group account. | 21 | //config: Utility for deleting a group account. |
diff --git a/loginutils/getty.c b/loginutils/getty.c index cd6378d80..4581cc9f7 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 22 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 23 | */ | 23 | */ |
| 24 | //config:config GETTY | 24 | //config:config GETTY |
| 25 | //config: bool "getty (10 kb)" | 25 | //config: bool "getty (11 kb)" |
| 26 | //config: default y | 26 | //config: default y |
| 27 | //config: select FEATURE_SYSLOG | 27 | //config: select FEATURE_SYSLOG |
| 28 | //config: help | 28 | //config: help |
diff --git a/loginutils/login.c b/loginutils/login.c index 332238181..301be4a34 100644 --- a/loginutils/login.c +++ b/loginutils/login.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 4 | */ | 4 | */ |
| 5 | //config:config LOGIN | 5 | //config:config LOGIN |
| 6 | //config: bool "login (24 kb)" | 6 | //config: bool "login (25 kb)" |
| 7 | //config: default y | 7 | //config: default y |
| 8 | //config: select FEATURE_SYSLOG | 8 | //config: select FEATURE_SYSLOG |
| 9 | //config: help | 9 | //config: help |
| @@ -173,7 +173,7 @@ static void die_if_nologin(void) | |||
| 173 | fflush_all(); | 173 | fflush_all(); |
| 174 | /* Users say that they do need this prior to exit: */ | 174 | /* Users say that they do need this prior to exit: */ |
| 175 | tcdrain(STDOUT_FILENO); | 175 | tcdrain(STDOUT_FILENO); |
| 176 | exit(EXIT_FAILURE); | 176 | exit_FAILURE(); |
| 177 | } | 177 | } |
| 178 | #else | 178 | #else |
| 179 | # define die_if_nologin() ((void)0) | 179 | # define die_if_nologin() ((void)0) |
| @@ -265,19 +265,19 @@ static void get_username_or_die(char *buf, int size_buf) | |||
| 265 | do { | 265 | do { |
| 266 | c = getchar(); | 266 | c = getchar(); |
| 267 | if (c == EOF) | 267 | if (c == EOF) |
| 268 | exit(EXIT_FAILURE); | 268 | exit_FAILURE(); |
| 269 | if (c == '\n') { | 269 | if (c == '\n') { |
| 270 | if (!--cntdown) | 270 | if (!--cntdown) |
| 271 | exit(EXIT_FAILURE); | 271 | exit_FAILURE(); |
| 272 | goto prompt; | 272 | goto prompt; |
| 273 | } | 273 | } |
| 274 | } while (isspace(c)); /* maybe isblank? */ | 274 | } while (isspace(c)); /* maybe isblank? */ |
| 275 | 275 | ||
| 276 | *buf++ = c; | 276 | *buf++ = c; |
| 277 | if (!fgets(buf, size_buf-2, stdin)) | 277 | if (!fgets(buf, size_buf-2, stdin)) |
| 278 | exit(EXIT_FAILURE); | 278 | exit_FAILURE(); |
| 279 | if (!strchr(buf, '\n')) | 279 | if (!strchr(buf, '\n')) |
| 280 | exit(EXIT_FAILURE); | 280 | exit_FAILURE(); |
| 281 | while ((unsigned char)*buf > ' ') | 281 | while ((unsigned char)*buf > ' ') |
| 282 | buf++; | 282 | buf++; |
| 283 | *buf = '\0'; | 283 | *buf = '\0'; |
diff --git a/loginutils/passwd.c b/loginutils/passwd.c index acc942275..1e8449627 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 4 | */ | 4 | */ |
| 5 | //config:config PASSWD | 5 | //config:config PASSWD |
| 6 | //config: bool "passwd (21 kb)" | 6 | //config: bool "passwd (22 kb)" |
| 7 | //config: default y | 7 | //config: default y |
| 8 | //config: select FEATURE_SYSLOG | 8 | //config: select FEATURE_SYSLOG |
| 9 | //config: help | 9 | //config: help |
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index 681022acb..9c927ed79 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 6 | */ | 6 | */ |
| 7 | //config:config SULOGIN | 7 | //config:config SULOGIN |
| 8 | //config: bool "sulogin (17 kb)" | 8 | //config: bool "sulogin (18 kb)" |
| 9 | //config: default y | 9 | //config: default y |
| 10 | //config: select FEATURE_SYSLOG | 10 | //config: select FEATURE_SYSLOG |
| 11 | //config: help | 11 | //config: help |
diff --git a/loginutils/vlock.c b/loginutils/vlock.c index 720835c4b..11bf58ca0 100644 --- a/loginutils/vlock.c +++ b/loginutils/vlock.c | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | * It now works with md5, sha1, etc passwords. | 16 | * It now works with md5, sha1, etc passwords. |
| 17 | */ | 17 | */ |
| 18 | //config:config VLOCK | 18 | //config:config VLOCK |
| 19 | //config: bool "vlock (17 kb)" | 19 | //config: bool "vlock (18 kb)" |
| 20 | //config: default y | 20 | //config: default y |
| 21 | //config: help | 21 | //config: help |
| 22 | //config: Build the "vlock" applet which allows you to lock (virtual) terminals. | 22 | //config: Build the "vlock" applet which allows you to lock (virtual) terminals. |
diff --git a/mailutils/makemime.c b/mailutils/makemime.c index 1ff2012d5..f4c1b2bd8 100644 --- a/mailutils/makemime.c +++ b/mailutils/makemime.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config MAKEMIME | 9 | //config:config MAKEMIME |
| 10 | //config: bool "makemime (5.4 kb)" | 10 | //config: bool "makemime (5.6 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Create MIME-formatted messages. | 13 | //config: Create MIME-formatted messages. |
diff --git a/mailutils/popmaildir.c b/mailutils/popmaildir.c index 1f2db2892..52d5d342e 100644 --- a/mailutils/popmaildir.c +++ b/mailutils/popmaildir.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Licensed under GPLv2, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 11 | */ | 11 | */ |
| 12 | //config:config POPMAILDIR | 12 | //config:config POPMAILDIR |
| 13 | //config: bool "popmaildir (10 kb)" | 13 | //config: bool "popmaildir (11 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: Simple yet powerful POP3 mail popper. Delivers content | 16 | //config: Simple yet powerful POP3 mail popper. Delivers content |
diff --git a/mailutils/reformime.c b/mailutils/reformime.c index a1d3f4e8b..850dfb9cc 100644 --- a/mailutils/reformime.c +++ b/mailutils/reformime.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config REFORMIME | 9 | //config:config REFORMIME |
| 10 | //config: bool "reformime (7.5 kb)" | 10 | //config: bool "reformime (7.6 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Parse MIME-formatted messages. | 13 | //config: Parse MIME-formatted messages. |
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index 209d1d560..fb478c0c9 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 12 | */ | 12 | */ |
| 13 | //config:config ADJTIMEX | 13 | //config:config ADJTIMEX |
| 14 | //config: bool "adjtimex (4.7 kb)" | 14 | //config: bool "adjtimex (4.9 kb)" |
| 15 | //config: default y | 15 | //config: default y |
| 16 | //config: help | 16 | //config: help |
| 17 | //config: Adjtimex reads and optionally sets adjustment parameters for | 17 | //config: Adjtimex reads and optionally sets adjustment parameters for |
diff --git a/miscutils/ascii.c b/miscutils/ascii.c index 98c11fa51..7bcb950fd 100644 --- a/miscutils/ascii.c +++ b/miscutils/ascii.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Licensed under GPLv2, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 6 | */ | 6 | */ |
| 7 | //config:config ASCII | 7 | //config:config ASCII |
| 8 | //config: bool "ascii" | 8 | //config: bool "ascii (784 bytes)" |
| 9 | //config: default y | 9 | //config: default y |
| 10 | //config: help | 10 | //config: help |
| 11 | //config: Print ascii table. | 11 | //config: Print ascii table. |
diff --git a/miscutils/bc.c b/miscutils/bc.c index 01402b311..a82646674 100644 --- a/miscutils/bc.c +++ b/miscutils/bc.c | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | #define SANITY_CHECKS 1 | 14 | #define SANITY_CHECKS 1 |
| 15 | 15 | ||
| 16 | //config:config BC | 16 | //config:config BC |
| 17 | //config: bool "bc (45 kb)" | 17 | //config: bool "bc (38 kb)" |
| 18 | //config: default y | 18 | //config: default y |
| 19 | //config: select FEATURE_DC_BIG | 19 | //config: select FEATURE_DC_BIG |
| 20 | //config: help | 20 | //config: help |
| @@ -38,7 +38,7 @@ | |||
| 38 | //config: 5) "read()" accepts expressions, not only numeric literals. | 38 | //config: 5) "read()" accepts expressions, not only numeric literals. |
| 39 | //config: | 39 | //config: |
| 40 | //config:config DC | 40 | //config:config DC |
| 41 | //config: bool "dc (36 kb)" | 41 | //config: bool "dc (29 kb)" |
| 42 | //config: default y | 42 | //config: default y |
| 43 | //config: help | 43 | //config: help |
| 44 | //config: dc is a reverse-polish notation command-line calculator which | 44 | //config: dc is a reverse-polish notation command-line calculator which |
diff --git a/miscutils/beep.c b/miscutils/beep.c index 7c60aed08..724a666c8 100644 --- a/miscutils/beep.c +++ b/miscutils/beep.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config BEEP | 9 | //config:config BEEP |
| 10 | //config: bool "beep (2.4 kb)" | 10 | //config: bool "beep (2.7 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: The beep applets beeps in a given freq/Hz. | 13 | //config: The beep applets beeps in a given freq/Hz. |
diff --git a/miscutils/chat.c b/miscutils/chat.c index 83aac37de..7daf7a6f6 100644 --- a/miscutils/chat.c +++ b/miscutils/chat.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config CHAT | 10 | //config:config CHAT |
| 11 | //config: bool "chat (6.3 kb)" | 11 | //config: bool "chat (6.7 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: Simple chat utility. | 14 | //config: Simple chat utility. |
diff --git a/miscutils/crond.c b/miscutils/crond.c index bd43c6b68..3bbb5ac83 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config CROND | 11 | //config:config CROND |
| 12 | //config: bool "crond (14 kb)" | 12 | //config: bool "crond (15 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: select FEATURE_SYSLOG | 14 | //config: select FEATURE_SYSLOG |
| 15 | //config: help | 15 | //config: help |
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index 297693f8c..36b491595 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
| @@ -354,10 +354,10 @@ static const char bb_msg_variable_not_found[] ALIGN1 = "variable: %s not found"; | |||
| 354 | #define simple_info_logger(p, msg) | 354 | #define simple_info_logger(p, msg) |
| 355 | #define msg_logger(p, fmt, args...) | 355 | #define msg_logger(p, fmt, args...) |
| 356 | #define simple_msg_logger(p, msg) | 356 | #define simple_msg_logger(p, msg) |
| 357 | #define msg_logger_and_die(p, fmt, args...) exit(EXIT_FAILURE) | 357 | #define msg_logger_and_die(p, fmt, args...) exit_FAILURE() |
| 358 | #define simple_msg_logger_and_die(p, msg) exit(EXIT_FAILURE) | 358 | #define simple_msg_logger_and_die(p, msg) exit_FAILURE() |
| 359 | #define error_logger(p, fmt, args...) | 359 | #define error_logger(p, fmt, args...) |
| 360 | #define error_logger_and_die(p, fmt, args...) exit(EXIT_FAILURE) | 360 | #define error_logger_and_die(p, fmt, args...) exit_FAILURE() |
| 361 | #endif | 361 | #endif |
| 362 | 362 | ||
| 363 | static void safe_memcpy(char *dest, const char *src, int len) | 363 | static void safe_memcpy(char *dest, const char *src, int len) |
diff --git a/miscutils/devmem.c b/miscutils/devmem.c index f21621bd6..015b18f71 100644 --- a/miscutils/devmem.c +++ b/miscutils/devmem.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 4 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 5 | */ | 5 | */ |
| 6 | //config:config DEVMEM | 6 | //config:config DEVMEM |
| 7 | //config: bool "devmem (2.5 kb)" | 7 | //config: bool "devmem (2.7 kb)" |
| 8 | //config: default y | 8 | //config: default y |
| 9 | //config: help | 9 | //config: help |
| 10 | //config: devmem is a small program that reads and writes from physical | 10 | //config: devmem is a small program that reads and writes from physical |
diff --git a/miscutils/hexedit.c b/miscutils/hexedit.c index 15ad78377..41f26b938 100644 --- a/miscutils/hexedit.c +++ b/miscutils/hexedit.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Licensed under GPLv2, see file LICENSE in this source tree. | 4 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 5 | */ | 5 | */ |
| 6 | //config:config HEXEDIT | 6 | //config:config HEXEDIT |
| 7 | //config: bool "hexedit (21 kb)" | 7 | //config: bool "hexedit (15 kb)" |
| 8 | //config: default y | 8 | //config: default y |
| 9 | //config: help | 9 | //config: help |
| 10 | //config: Edit file in hexadecimal. | 10 | //config: Edit file in hexadecimal. |
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c index da26f5e19..5f41a72ec 100644 --- a/miscutils/i2c_tools.c +++ b/miscutils/i2c_tools.c | |||
| @@ -9,31 +9,31 @@ | |||
| 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config I2CGET | 11 | //config:config I2CGET |
| 12 | //config: bool "i2cget (5.5 kb)" | 12 | //config: bool "i2cget (5.7 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: Read from I2C/SMBus chip registers. | 15 | //config: Read from I2C/SMBus chip registers. |
| 16 | //config: | 16 | //config: |
| 17 | //config:config I2CSET | 17 | //config:config I2CSET |
| 18 | //config: bool "i2cset (6.7 kb)" | 18 | //config: bool "i2cset (6.9 kb)" |
| 19 | //config: default y | 19 | //config: default y |
| 20 | //config: help | 20 | //config: help |
| 21 | //config: Set I2C registers. | 21 | //config: Set I2C registers. |
| 22 | //config: | 22 | //config: |
| 23 | //config:config I2CDUMP | 23 | //config:config I2CDUMP |
| 24 | //config: bool "i2cdump (7.1 kb)" | 24 | //config: bool "i2cdump (7.2 kb)" |
| 25 | //config: default y | 25 | //config: default y |
| 26 | //config: help | 26 | //config: help |
| 27 | //config: Examine I2C registers. | 27 | //config: Examine I2C registers. |
| 28 | //config: | 28 | //config: |
| 29 | //config:config I2CDETECT | 29 | //config:config I2CDETECT |
| 30 | //config: bool "i2cdetect (7.1 kb)" | 30 | //config: bool "i2cdetect (7.3 kb)" |
| 31 | //config: default y | 31 | //config: default y |
| 32 | //config: help | 32 | //config: help |
| 33 | //config: Detect I2C chips. | 33 | //config: Detect I2C chips. |
| 34 | //config: | 34 | //config: |
| 35 | //config:config I2CTRANSFER | 35 | //config:config I2CTRANSFER |
| 36 | //config: bool "i2ctransfer (4.0 kb)" | 36 | //config: bool "i2ctransfer (5.5 kb)" |
| 37 | //config: default y | 37 | //config: default y |
| 38 | //config: help | 38 | //config: help |
| 39 | //config: Send user-defined I2C messages in one transfer. | 39 | //config: Send user-defined I2C messages in one transfer. |
| @@ -107,6 +107,7 @@ static ALWAYS_INLINE void *itoptr(int i) | |||
| 107 | return (void*)(intptr_t)i; | 107 | return (void*)(intptr_t)i; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | #if ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP || ENABLE_I2CDETECT | ||
| 110 | static int32_t i2c_smbus_access(int fd, char read_write, uint8_t cmd, | 111 | static int32_t i2c_smbus_access(int fd, char read_write, uint8_t cmd, |
| 111 | int size, union i2c_smbus_data *data) | 112 | int size, union i2c_smbus_data *data) |
| 112 | { | 113 | { |
| @@ -120,7 +121,6 @@ static int32_t i2c_smbus_access(int fd, char read_write, uint8_t cmd, | |||
| 120 | return ioctl(fd, I2C_SMBUS, &args); | 121 | return ioctl(fd, I2C_SMBUS, &args); |
| 121 | } | 122 | } |
| 122 | 123 | ||
| 123 | #if ENABLE_I2CGET || ENABLE_I2CSET || ENABLE_I2CDUMP || ENABLE_I2CDETECT | ||
| 124 | static int32_t i2c_smbus_read_byte(int fd) | 124 | static int32_t i2c_smbus_read_byte(int fd) |
| 125 | { | 125 | { |
| 126 | union i2c_smbus_data data; | 126 | union i2c_smbus_data data; |
diff --git a/miscutils/lsscsi.c b/miscutils/lsscsi.c index 8f7eda761..9f677ba28 100644 --- a/miscutils/lsscsi.c +++ b/miscutils/lsscsi.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config LSSCSI | 9 | //config:config LSSCSI |
| 10 | //config: bool "lsscsi (2.5 kb)" | 10 | //config: bool "lsscsi (2.9 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: lsscsi is a utility for displaying information about SCSI buses in the | 13 | //config: lsscsi is a utility for displaying information about SCSI buses in the |
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index 93c550042..48be91875 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * known bugs: can't deal with alpha ranges | 7 | * known bugs: can't deal with alpha ranges |
| 8 | */ | 8 | */ |
| 9 | //config:config MAKEDEVS | 9 | //config:config MAKEDEVS |
| 10 | //config: bool "makedevs (9.2 kb)" | 10 | //config: bool "makedevs (9.4 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: 'makedevs' is a utility used to create a batch of devices with | 13 | //config: 'makedevs' is a utility used to create a batch of devices with |
diff --git a/miscutils/microcom.c b/miscutils/microcom.c index 97b46342f..99db207bf 100644 --- a/miscutils/microcom.c +++ b/miscutils/microcom.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config MICROCOM | 10 | //config:config MICROCOM |
| 11 | //config: bool "microcom (5.7 kb)" | 11 | //config: bool "microcom (5.9 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: The poor man's minicom utility for chatting with serial port devices. | 14 | //config: The poor man's minicom utility for chatting with serial port devices. |
diff --git a/miscutils/mt.c b/miscutils/mt.c index 52d5476a1..c781ef545 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 4 | */ | 4 | */ |
| 5 | //config:config MT | 5 | //config:config MT |
| 6 | //config: bool "mt (2.5 kb)" | 6 | //config: bool "mt (2.7 kb)" |
| 7 | //config: default y | 7 | //config: default y |
| 8 | //config: help | 8 | //config: help |
| 9 | //config: mt is used to control tape devices. You can use the mt utility | 9 | //config: mt is used to control tape devices. You can use the mt utility |
diff --git a/miscutils/nandwrite.c b/miscutils/nandwrite.c index 52bf49434..6ac92aa1f 100644 --- a/miscutils/nandwrite.c +++ b/miscutils/nandwrite.c | |||
| @@ -8,13 +8,13 @@ | |||
| 8 | * TODO: add support for large (>4GB) MTD devices | 8 | * TODO: add support for large (>4GB) MTD devices |
| 9 | */ | 9 | */ |
| 10 | //config:config NANDWRITE | 10 | //config:config NANDWRITE |
| 11 | //config: bool "nandwrite (4.8 kb)" | 11 | //config: bool "nandwrite (5 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: Write to the specified MTD device, with bad blocks awareness | 14 | //config: Write to the specified MTD device, with bad blocks awareness |
| 15 | //config: | 15 | //config: |
| 16 | //config:config NANDDUMP | 16 | //config:config NANDDUMP |
| 17 | //config: bool "nanddump (5.2 kb)" | 17 | //config: bool "nanddump (5.4 kb)" |
| 18 | //config: default y | 18 | //config: default y |
| 19 | //config: help | 19 | //config: help |
| 20 | //config: Dump the content of raw NAND chip | 20 | //config: Dump the content of raw NAND chip |
diff --git a/miscutils/partprobe.c b/miscutils/partprobe.c index 0fb1927b7..b21c6241b 100644 --- a/miscutils/partprobe.c +++ b/miscutils/partprobe.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Licensed under GPLv2, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 6 | */ | 6 | */ |
| 7 | //config:config PARTPROBE | 7 | //config:config PARTPROBE |
| 8 | //config: bool "partprobe (3.5 kb)" | 8 | //config: bool "partprobe (3.7 kb)" |
| 9 | //config: default y | 9 | //config: default y |
| 10 | //config: help | 10 | //config: help |
| 11 | //config: Ask kernel to rescan partition table. | 11 | //config: Ask kernel to rescan partition table. |
diff --git a/miscutils/raidautorun.c b/miscutils/raidautorun.c index 905862cf7..8e70b5a51 100644 --- a/miscutils/raidautorun.c +++ b/miscutils/raidautorun.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config RAIDAUTORUN | 9 | //config:config RAIDAUTORUN |
| 10 | //config: bool "raidautorun (1.3 kb)" | 10 | //config: bool "raidautorun (1.6 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: raidautorun tells the kernel md driver to | 13 | //config: raidautorun tells the kernel md driver to |
diff --git a/miscutils/readahead.c b/miscutils/readahead.c index d2bed2092..a9e672617 100644 --- a/miscutils/readahead.c +++ b/miscutils/readahead.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 11 | */ | 11 | */ |
| 12 | //config:config READAHEAD | 12 | //config:config READAHEAD |
| 13 | //config: bool "readahead (1.5 kb)" | 13 | //config: bool "readahead (1.7 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: depends on LFS | 15 | //config: depends on LFS |
| 16 | //config: help | 16 | //config: help |
diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c index 2f1581ead..7b96a5472 100644 --- a/miscutils/runlevel.c +++ b/miscutils/runlevel.c | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | * initially busyboxified by Bernhard Reutner-Fischer | 12 | * initially busyboxified by Bernhard Reutner-Fischer |
| 13 | */ | 13 | */ |
| 14 | //config:config RUNLEVEL | 14 | //config:config RUNLEVEL |
| 15 | //config: bool "runlevel (559 bytes)" | 15 | //config: bool "runlevel (837 bytes)" |
| 16 | //config: default y | 16 | //config: default y |
| 17 | //config: depends on FEATURE_UTMP | 17 | //config: depends on FEATURE_UTMP |
| 18 | //config: help | 18 | //config: help |
diff --git a/miscutils/rx.c b/miscutils/rx.c index d8b041480..3052bdef7 100644 --- a/miscutils/rx.c +++ b/miscutils/rx.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | * This was originally written for blob and then adapted for busybox. | 15 | * This was originally written for blob and then adapted for busybox. |
| 16 | */ | 16 | */ |
| 17 | //config:config RX | 17 | //config:config RX |
| 18 | //config: bool "rx (2.9 kb)" | 18 | //config: bool "rx (3.2 kb)" |
| 19 | //config: default y | 19 | //config: default y |
| 20 | //config: help | 20 | //config: help |
| 21 | //config: Receive files using the Xmodem protocol. | 21 | //config: Receive files using the Xmodem protocol. |
diff --git a/miscutils/seedrng.c b/miscutils/seedrng.c index 3bf6e2ea7..7a2331cb1 100644 --- a/miscutils/seedrng.c +++ b/miscutils/seedrng.c | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | * This is based on code from <https://git.zx2c4.com/seedrng/about/>. | 20 | * This is based on code from <https://git.zx2c4.com/seedrng/about/>. |
| 21 | */ | 21 | */ |
| 22 | //config:config SEEDRNG | 22 | //config:config SEEDRNG |
| 23 | //config: bool "seedrng (1.3 kb)" | 23 | //config: bool "seedrng (9.1 kb)" |
| 24 | //config: default y | 24 | //config: default y |
| 25 | //config: help | 25 | //config: help |
| 26 | //config: Seed the kernel RNG from seed files, meant to be called | 26 | //config: Seed the kernel RNG from seed files, meant to be called |
diff --git a/miscutils/setfattr.c b/miscutils/setfattr.c index 9792c2660..10d1840c9 100644 --- a/miscutils/setfattr.c +++ b/miscutils/setfattr.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config SETFATTR | 8 | //config:config SETFATTR |
| 9 | //config: bool "setfattr (3.7 kb)" | 9 | //config: bool "setfattr (3.9 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: Set/delete extended attributes on files | 12 | //config: Set/delete extended attributes on files |
diff --git a/miscutils/setserial.c b/miscutils/setserial.c index 2006861e2..5fb93d226 100644 --- a/miscutils/setserial.c +++ b/miscutils/setserial.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config SETSERIAL | 10 | //config:config SETSERIAL |
| 11 | //config: bool "setserial (6.9 kb)" | 11 | //config: bool "setserial (7.1 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: Retrieve or set Linux serial port. | 14 | //config: Retrieve or set Linux serial port. |
| @@ -535,7 +535,7 @@ static int serial_ctl(int fd, int ops, struct serial_struct *serinfo) | |||
| 535 | bb_simple_perror_msg(err); | 535 | bb_simple_perror_msg(err); |
| 536 | if (ops & CTL_NODIE) | 536 | if (ops & CTL_NODIE) |
| 537 | goto nodie; | 537 | goto nodie; |
| 538 | exit(EXIT_FAILURE); | 538 | exit_FAILURE(); |
| 539 | } | 539 | } |
| 540 | 540 | ||
| 541 | static void print_flag(const char **prefix, const char *flag) | 541 | static void print_flag(const char **prefix, const char *flag) |
diff --git a/miscutils/strings.c b/miscutils/strings.c index b01884968..036df5c5d 100644 --- a/miscutils/strings.c +++ b/miscutils/strings.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config STRINGS | 9 | //config:config STRINGS |
| 10 | //config: bool "strings (4.6 kb)" | 10 | //config: bool "strings (4.8 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: strings prints the printable character sequences for each file | 13 | //config: strings prints the printable character sequences for each file |
diff --git a/miscutils/time.c b/miscutils/time.c index ac37a1375..2c71382bf 100644 --- a/miscutils/time.c +++ b/miscutils/time.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Heavily modified for busybox by Erik Andersen <andersen@codepoet.org> | 10 | * Heavily modified for busybox by Erik Andersen <andersen@codepoet.org> |
| 11 | */ | 11 | */ |
| 12 | //config:config TIME | 12 | //config:config TIME |
| 13 | //config: bool "time (6.8 kb)" | 13 | //config: bool "time (8.1 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: The time command runs the specified program with the given arguments. | 16 | //config: The time command runs the specified program with the given arguments. |
diff --git a/miscutils/tree.c b/miscutils/tree.c index fa55696c6..0b142c85c 100644 --- a/miscutils/tree.c +++ b/miscutils/tree.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Licensed under GPLv2, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 6 | */ | 6 | */ |
| 7 | //config:config TREE | 7 | //config:config TREE |
| 8 | //config: bool "tree (0.6 kb)" | 8 | //config: bool "tree (2.5 kb)" |
| 9 | //config: default y | 9 | //config: default y |
| 10 | //config: help | 10 | //config: help |
| 11 | //config: List files and directories in a tree structure. | 11 | //config: List files and directories in a tree structure. |
diff --git a/miscutils/ts.c b/miscutils/ts.c index af6677fc7..f5e727eb5 100644 --- a/miscutils/ts.c +++ b/miscutils/ts.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Licensed under GPLv2, see file LICENSE in this source tree. | 4 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 5 | */ | 5 | */ |
| 6 | //config:config TS | 6 | //config:config TS |
| 7 | //config: bool "ts (450 bytes)" | 7 | //config: bool "ts (4.4 kb)" |
| 8 | //config: default y | 8 | //config: default y |
| 9 | 9 | ||
| 10 | //applet:IF_TS(APPLET(ts, BB_DIR_USR_BIN, BB_SUID_DROP)) | 10 | //applet:IF_TS(APPLET(ts, BB_DIR_USR_BIN, BB_SUID_DROP)) |
diff --git a/miscutils/ttysize.c b/miscutils/ttysize.c index d635b29ce..e95936637 100644 --- a/miscutils/ttysize.c +++ b/miscutils/ttysize.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Licensed under GPLv2, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 11 | */ | 11 | */ |
| 12 | //config:config TTYSIZE | 12 | //config:config TTYSIZE |
| 13 | //config: bool "ttysize (432 bytes)" | 13 | //config: bool "ttysize (718 bytes)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: A replacement for "stty size". Unlike stty, can report only width, | 16 | //config: A replacement for "stty size". Unlike stty, can report only width, |
diff --git a/miscutils/ubi_tools.c b/miscutils/ubi_tools.c index 6d49f61d9..8de444eb2 100644 --- a/miscutils/ubi_tools.c +++ b/miscutils/ubi_tools.c | |||
| @@ -4,37 +4,37 @@ | |||
| 4 | * Licensed under GPLv2, see file LICENSE in this source tree. | 4 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 5 | */ | 5 | */ |
| 6 | //config:config UBIATTACH | 6 | //config:config UBIATTACH |
| 7 | //config: bool "ubiattach (4.2 kb)" | 7 | //config: bool "ubiattach (4.5 kb)" |
| 8 | //config: default y | 8 | //config: default y |
| 9 | //config: help | 9 | //config: help |
| 10 | //config: Attach MTD device to an UBI device. | 10 | //config: Attach MTD device to an UBI device. |
| 11 | //config: | 11 | //config: |
| 12 | //config:config UBIDETACH | 12 | //config:config UBIDETACH |
| 13 | //config: bool "ubidetach (4.1 kb)" | 13 | //config: bool "ubidetach (4.3 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: Detach MTD device from an UBI device. | 16 | //config: Detach MTD device from an UBI device. |
| 17 | //config: | 17 | //config: |
| 18 | //config:config UBIMKVOL | 18 | //config:config UBIMKVOL |
| 19 | //config: bool "ubimkvol (5.3 kb)" | 19 | //config: bool "ubimkvol (5.5 kb)" |
| 20 | //config: default y | 20 | //config: default y |
| 21 | //config: help | 21 | //config: help |
| 22 | //config: Create a UBI volume. | 22 | //config: Create a UBI volume. |
| 23 | //config: | 23 | //config: |
| 24 | //config:config UBIRMVOL | 24 | //config:config UBIRMVOL |
| 25 | //config: bool "ubirmvol (4.9 kb)" | 25 | //config: bool "ubirmvol (5.1 kb)" |
| 26 | //config: default y | 26 | //config: default y |
| 27 | //config: help | 27 | //config: help |
| 28 | //config: Delete a UBI volume. | 28 | //config: Delete a UBI volume. |
| 29 | //config: | 29 | //config: |
| 30 | //config:config UBIRSVOL | 30 | //config:config UBIRSVOL |
| 31 | //config: bool "ubirsvol (4.2 kb)" | 31 | //config: bool "ubirsvol (4.4 kb)" |
| 32 | //config: default y | 32 | //config: default y |
| 33 | //config: help | 33 | //config: help |
| 34 | //config: Resize a UBI volume. | 34 | //config: Resize a UBI volume. |
| 35 | //config: | 35 | //config: |
| 36 | //config:config UBIUPDATEVOL | 36 | //config:config UBIUPDATEVOL |
| 37 | //config: bool "ubiupdatevol (5.2 kb)" | 37 | //config: bool "ubiupdatevol (5.6 kb)" |
| 38 | //config: default y | 38 | //config: default y |
| 39 | //config: help | 39 | //config: help |
| 40 | //config: Update a UBI volume. | 40 | //config: Update a UBI volume. |
diff --git a/miscutils/ubirename.c b/miscutils/ubirename.c index 06a0adacf..af94354f3 100644 --- a/miscutils/ubirename.c +++ b/miscutils/ubirename.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config UBIRENAME | 9 | //config:config UBIRENAME |
| 10 | //config: bool "ubirename (2.4 kb)" | 10 | //config: bool "ubirename (2.7 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Utility to rename UBI volumes | 13 | //config: Utility to rename UBI volumes |
diff --git a/miscutils/volname.c b/miscutils/volname.c index 027d01272..fbf87322d 100644 --- a/miscutils/volname.c +++ b/miscutils/volname.c | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | * Matthew Stoltenberg <d3matt@gmail.com> | 28 | * Matthew Stoltenberg <d3matt@gmail.com> |
| 29 | */ | 29 | */ |
| 30 | //config:config VOLNAME | 30 | //config:config VOLNAME |
| 31 | //config: bool "volname (1.6 kb)" | 31 | //config: bool "volname (1.9 kb)" |
| 32 | //config: default y | 32 | //config: default y |
| 33 | //config: help | 33 | //config: help |
| 34 | //config: Prints a CD-ROM volume name. | 34 | //config: Prints a CD-ROM volume name. |
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index 9f5a4b849..db1d27b48 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config WATCHDOG | 11 | //config:config WATCHDOG |
| 12 | //config: bool "watchdog (5.3 kb)" | 12 | //config: bool "watchdog (5.7 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: The watchdog utility is used with hardware or software watchdog | 15 | //config: The watchdog utility is used with hardware or software watchdog |
diff --git a/modutils/lsmod.c b/modutils/lsmod.c index 2beb12362..d9df5ad81 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config LSMOD | 10 | //config:config LSMOD |
| 11 | //config: bool "lsmod (1.9 kb)" | 11 | //config: bool "lsmod (2.1 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: lsmod is used to display a list of loaded modules. | 14 | //config: lsmod is used to display a list of loaded modules. |
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 235706fd5..543f53e99 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config MODPROBE | 10 | //config:config MODPROBE |
| 11 | //config: bool "modprobe (28 kb)" | 11 | //config: bool "modprobe (27 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: Handle the loading of modules, and their dependencies on a high | 14 | //config: Handle the loading of modules, and their dependencies on a high |
diff --git a/modutils/rmmod.c b/modutils/rmmod.c index 2b3c39153..fe86a6766 100644 --- a/modutils/rmmod.c +++ b/modutils/rmmod.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config RMMOD | 10 | //config:config RMMOD |
| 11 | //config: bool "rmmod (3.3 kb)" | 11 | //config: bool "rmmod (3.5 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: rmmod is used to unload specified modules from the kernel. | 14 | //config: rmmod is used to unload specified modules from the kernel. |
diff --git a/networking/arping.c b/networking/arping.c index 86f0221ed..967f1ac04 100644 --- a/networking/arping.c +++ b/networking/arping.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Busybox port: Nick Fedchik <nick@fedchik.org.ua> | 6 | * Busybox port: Nick Fedchik <nick@fedchik.org.ua> |
| 7 | */ | 7 | */ |
| 8 | //config:config ARPING | 8 | //config:config ARPING |
| 9 | //config: bool "arping (9 kb)" | 9 | //config: bool "arping (9.1 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: Ping hosts by ARP packets. | 12 | //config: Ping hosts by ARP packets. |
diff --git a/networking/brctl.c b/networking/brctl.c index 956bd91f3..7b0270b51 100644 --- a/networking/brctl.c +++ b/networking/brctl.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 11 | */ | 11 | */ |
| 12 | //config:config BRCTL | 12 | //config:config BRCTL |
| 13 | //config: bool "brctl (4.7 kb)" | 13 | //config: bool "brctl (9.9 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: Manage ethernet bridges. | 16 | //config: Manage ethernet bridges. |
diff --git a/networking/dnsd.c b/networking/dnsd.c index a0f320c6c..a11d83f49 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * the first porting of oao' scdns to busybox also. | 17 | * the first porting of oao' scdns to busybox also. |
| 18 | */ | 18 | */ |
| 19 | //config:config DNSD | 19 | //config:config DNSD |
| 20 | //config: bool "dnsd (9.8 kb)" | 20 | //config: bool "dnsd (10 kb)" |
| 21 | //config: default y | 21 | //config: default y |
| 22 | //config: help | 22 | //config: help |
| 23 | //config: Small and static DNS server daemon. | 23 | //config: Small and static DNS server daemon. |
diff --git a/networking/ether-wake.c b/networking/ether-wake.c index 36e90acfb..68df19361 100644 --- a/networking/ether-wake.c +++ b/networking/ether-wake.c | |||
| @@ -64,7 +64,7 @@ | |||
| 64 | * filter. That configuration consumes more power. | 64 | * filter. That configuration consumes more power. |
| 65 | */ | 65 | */ |
| 66 | //config:config ETHER_WAKE | 66 | //config:config ETHER_WAKE |
| 67 | //config: bool "ether-wake (4.9 kb)" | 67 | //config: bool "ether-wake (5.2 kb)" |
| 68 | //config: default y | 68 | //config: default y |
| 69 | //config: help | 69 | //config: help |
| 70 | //config: Send a magic packet to wake up sleeping machines. | 70 | //config: Send a magic packet to wake up sleeping machines. |
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index ef0973a84..86342769b 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c | |||
| @@ -13,13 +13,13 @@ | |||
| 13 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 13 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 14 | */ | 14 | */ |
| 15 | //config:config FTPGET | 15 | //config:config FTPGET |
| 16 | //config: bool "ftpget (7.8 kb)" | 16 | //config: bool "ftpget (7.9 kb)" |
| 17 | //config: default y | 17 | //config: default y |
| 18 | //config: help | 18 | //config: help |
| 19 | //config: Retrieve a remote file via FTP. | 19 | //config: Retrieve a remote file via FTP. |
| 20 | //config: | 20 | //config: |
| 21 | //config:config FTPPUT | 21 | //config:config FTPPUT |
| 22 | //config: bool "ftpput (7.5 kb)" | 22 | //config: bool "ftpput (7.6 kb)" |
| 23 | //config: default y | 23 | //config: default y |
| 24 | //config: help | 24 | //config: help |
| 25 | //config: Store a remote file via FTP. | 25 | //config: Store a remote file via FTP. |
diff --git a/networking/hostname.c b/networking/hostname.c index 549103485..36cb70866 100644 --- a/networking/hostname.c +++ b/networking/hostname.c | |||
| @@ -10,13 +10,13 @@ | |||
| 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 11 | */ | 11 | */ |
| 12 | //config:config HOSTNAME | 12 | //config:config HOSTNAME |
| 13 | //config: bool "hostname (5.5 kb)" | 13 | //config: bool "hostname (5.8 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: Show or set the system's host name. | 16 | //config: Show or set the system's host name. |
| 17 | //config: | 17 | //config: |
| 18 | //config:config DNSDOMAINNAME | 18 | //config:config DNSDOMAINNAME |
| 19 | //config: bool "dnsdomainname (3.6 kb)" | 19 | //config: bool "dnsdomainname (3.8 kb)" |
| 20 | //config: default y | 20 | //config: default y |
| 21 | //config: help | 21 | //config: help |
| 22 | //config: Alias to "hostname -d". | 22 | //config: Alias to "hostname -d". |
diff --git a/networking/ifplugd.c b/networking/ifplugd.c index 0b55bf4e5..a776d4121 100644 --- a/networking/ifplugd.c +++ b/networking/ifplugd.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config IFPLUGD | 9 | //config:config IFPLUGD |
| 10 | //config: bool "ifplugd (10 kb)" | 10 | //config: bool "ifplugd (11 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Network interface plug detection daemon. | 13 | //config: Network interface plug detection daemon. |
diff --git a/networking/inetd.c b/networking/inetd.c index fb2fbe323..e63edcd9d 100644 --- a/networking/inetd.c +++ b/networking/inetd.c | |||
| @@ -1449,7 +1449,7 @@ int inetd_main(int argc UNUSED_PARAM, char **argv) | |||
| 1449 | else | 1449 | else |
| 1450 | sep->se_builtin->bi_dgram_fn(ctrl, sep); | 1450 | sep->se_builtin->bi_dgram_fn(ctrl, sep); |
| 1451 | if (pid) /* we did fork */ | 1451 | if (pid) /* we did fork */ |
| 1452 | _exit(EXIT_FAILURE); | 1452 | _exit_FAILURE(); |
| 1453 | maybe_close(accepted_fd); | 1453 | maybe_close(accepted_fd); |
| 1454 | continue; /* -> check next fd in fd set */ | 1454 | continue; /* -> check next fd in fd set */ |
| 1455 | } | 1455 | } |
| @@ -1530,7 +1530,7 @@ int inetd_main(int argc UNUSED_PARAM, char **argv) | |||
| 1530 | /* eat packet in udp case */ | 1530 | /* eat packet in udp case */ |
| 1531 | if (sep->se_socktype != SOCK_STREAM) | 1531 | if (sep->se_socktype != SOCK_STREAM) |
| 1532 | recv(0, line, LINE_SIZE, MSG_DONTWAIT); | 1532 | recv(0, line, LINE_SIZE, MSG_DONTWAIT); |
| 1533 | _exit(EXIT_FAILURE); | 1533 | _exit_FAILURE(); |
| 1534 | } /* for (sep = servtab...) */ | 1534 | } /* for (sep = servtab...) */ |
| 1535 | } /* for (;;) */ | 1535 | } /* for (;;) */ |
| 1536 | } | 1536 | } |
diff --git a/networking/ip.c b/networking/ip.c index 7c3208699..36126b747 100644 --- a/networking/ip.c +++ b/networking/ip.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | //config: trying to be portable, it's better to use "ip CMD" forms. | 19 | //config: trying to be portable, it's better to use "ip CMD" forms. |
| 20 | //config: | 20 | //config: |
| 21 | //config:config IPADDR | 21 | //config:config IPADDR |
| 22 | //config: bool "ipaddr (14 kb)" | 22 | //config: bool "ipaddr (15 kb)" |
| 23 | //config: default y | 23 | //config: default y |
| 24 | //config: select FEATURE_IP_ADDRESS | 24 | //config: select FEATURE_IP_ADDRESS |
| 25 | //config: help | 25 | //config: help |
| @@ -40,7 +40,7 @@ | |||
| 40 | //config: Short form of "ip route" | 40 | //config: Short form of "ip route" |
| 41 | //config: | 41 | //config: |
| 42 | //config:config IPTUNNEL | 42 | //config:config IPTUNNEL |
| 43 | //config: bool "iptunnel (9.6 kb)" | 43 | //config: bool "iptunnel (9.8 kb)" |
| 44 | //config: default y | 44 | //config: default y |
| 45 | //config: select FEATURE_IP_TUNNEL | 45 | //config: select FEATURE_IP_TUNNEL |
| 46 | //config: help | 46 | //config: help |
| @@ -54,7 +54,7 @@ | |||
| 54 | //config: Short form of "ip rule" | 54 | //config: Short form of "ip rule" |
| 55 | //config: | 55 | //config: |
| 56 | //config:config IPNEIGH | 56 | //config:config IPNEIGH |
| 57 | //config: bool "ipneigh (8.3 kb)" | 57 | //config: bool "ipneigh (8.6 kb)" |
| 58 | //config: default y | 58 | //config: default y |
| 59 | //config: select FEATURE_IP_NEIGH | 59 | //config: select FEATURE_IP_NEIGH |
| 60 | //config: help | 60 | //config: help |
diff --git a/networking/ipcalc.c b/networking/ipcalc.c index e82e35dd5..92e7b289d 100644 --- a/networking/ipcalc.c +++ b/networking/ipcalc.c | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 12 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 13 | */ | 13 | */ |
| 14 | //config:config IPCALC | 14 | //config:config IPCALC |
| 15 | //config: bool "ipcalc (4.4 kb)" | 15 | //config: bool "ipcalc (4.6 kb)" |
| 16 | //config: default y | 16 | //config: default y |
| 17 | //config: help | 17 | //config: help |
| 18 | //config: ipcalc takes an IP address and netmask and calculates the | 18 | //config: ipcalc takes an IP address and netmask and calculates the |
diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c index f564d604a..a92afc7e1 100644 --- a/networking/isrv_identd.c +++ b/networking/isrv_identd.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config FAKEIDENTD | 9 | //config:config FAKEIDENTD |
| 10 | //config: bool "fakeidentd (8.7 kb)" | 10 | //config: bool "fakeidentd (9 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: select FEATURE_SYSLOG | 12 | //config: select FEATURE_SYSLOG |
| 13 | //config: help | 13 | //config: help |
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index 68d199044..9eb0b4f5f 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c | |||
| @@ -215,7 +215,7 @@ static void parse_address(char *dev, int hatype, int halen, char *lla, struct if | |||
| 215 | alen = hatype == 1/*ARPHRD_ETHER*/ ? 14/*ETH_HLEN*/ : 19/*INFINIBAND_HLEN*/; | 215 | alen = hatype == 1/*ARPHRD_ETHER*/ ? 14/*ETH_HLEN*/ : 19/*INFINIBAND_HLEN*/; |
| 216 | alen = ll_addr_a2n((unsigned char *)(ifr->ifr_hwaddr.sa_data), alen, lla); | 216 | alen = ll_addr_a2n((unsigned char *)(ifr->ifr_hwaddr.sa_data), alen, lla); |
| 217 | if (alen < 0) | 217 | if (alen < 0) |
| 218 | exit(EXIT_FAILURE); | 218 | exit_FAILURE(); |
| 219 | if (alen != halen) { | 219 | if (alen != halen) { |
| 220 | bb_error_msg_and_die("wrong address (%s) length: expected %d bytes", lla, halen); | 220 | bb_error_msg_and_die("wrong address (%s) length: expected %d bytes", lla, halen); |
| 221 | } | 221 | } |
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 5a972f8b2..cd77f642f 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
| @@ -111,15 +111,7 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM, | |||
| 111 | if (r->rtm_flags & RTM_F_CLONED) { | 111 | if (r->rtm_flags & RTM_F_CLONED) { |
| 112 | return 0; | 112 | return 0; |
| 113 | } | 113 | } |
| 114 | if (G_filter.tb == RT_TABLE_LOCAL) { | 114 | if (G_filter.tb != tid) { |
| 115 | if (r->rtm_type != RTN_LOCAL) { | ||
| 116 | return 0; | ||
| 117 | } | ||
| 118 | } else if (G_filter.tb == RT_TABLE_MAIN) { | ||
| 119 | if (r->rtm_type == RTN_LOCAL) { | ||
| 120 | return 0; | ||
| 121 | } | ||
| 122 | } else { | ||
| 123 | return 0; | 115 | return 0; |
| 124 | } | 116 | } |
| 125 | } | 117 | } |
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c index c9fa632f3..1ec81c635 100644 --- a/networking/libiproute/iptunnel.c +++ b/networking/libiproute/iptunnel.c | |||
| @@ -319,7 +319,7 @@ static void parse_args(char **argv, int cmd, struct ip_tunnel_parm *p) | |||
| 319 | struct ip_tunnel_parm old_p; | 319 | struct ip_tunnel_parm old_p; |
| 320 | memset(&old_p, 0, sizeof(old_p)); | 320 | memset(&old_p, 0, sizeof(old_p)); |
| 321 | if (do_get_ioctl(*argv, &old_p)) | 321 | if (do_get_ioctl(*argv, &old_p)) |
| 322 | exit(EXIT_FAILURE); | 322 | exit_FAILURE(); |
| 323 | *p = old_p; | 323 | *p = old_p; |
| 324 | } | 324 | } |
| 325 | } | 325 | } |
diff --git a/networking/nameif.c b/networking/nameif.c index 66e042688..461745c70 100644 --- a/networking/nameif.c +++ b/networking/nameif.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 11 | */ | 11 | */ |
| 12 | //config:config NAMEIF | 12 | //config:config NAMEIF |
| 13 | //config: bool "nameif (6.6 kb)" | 13 | //config: bool "nameif (6.9 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: select FEATURE_SYSLOG | 15 | //config: select FEATURE_SYSLOG |
| 16 | //config: help | 16 | //config: help |
diff --git a/networking/nbd-client.c b/networking/nbd-client.c index 755b42ccd..556fa8c97 100644 --- a/networking/nbd-client.c +++ b/networking/nbd-client.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Licensed under GPLv2, see file LICENSE in this source tree. | 4 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 5 | */ | 5 | */ |
| 6 | //config:config NBDCLIENT | 6 | //config:config NBDCLIENT |
| 7 | //config: bool "nbd-client (6 kb)" | 7 | //config: bool "nbd-client (6.3 kb)" |
| 8 | //config: default y | 8 | //config: default y |
| 9 | //config: help | 9 | //config: help |
| 10 | //config: Network block device client | 10 | //config: Network block device client |
diff --git a/networking/nslookup.c b/networking/nslookup.c index 249083e24..b67d354f7 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
| 2 | 2 | ||
| 3 | //config:config NSLOOKUP | 3 | //config:config NSLOOKUP |
| 4 | //config: bool "nslookup (9.7 kb)" | 4 | //config: bool "nslookup (10 kb)" |
| 5 | //config: default y | 5 | //config: default y |
| 6 | //config: help | 6 | //config: help |
| 7 | //config: nslookup is a tool to query Internet name servers. | 7 | //config: nslookup is a tool to query Internet name servers. |
diff --git a/networking/ntpd.c b/networking/ntpd.c index c7519b8fb..dcbdb8e60 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | *********************************************************************** | 41 | *********************************************************************** |
| 42 | */ | 42 | */ |
| 43 | //config:config NTPD | 43 | //config:config NTPD |
| 44 | //config: bool "ntpd (22 kb)" | 44 | //config: bool "ntpd (23 kb)" |
| 45 | //config: default y | 45 | //config: default y |
| 46 | //config: help | 46 | //config: help |
| 47 | //config: The NTP client/server daemon. | 47 | //config: The NTP client/server daemon. |
| @@ -1632,7 +1632,7 @@ update_local_clock(peer_t *p) | |||
| 1632 | if (adjtimex(&tmx) < 0) | 1632 | if (adjtimex(&tmx) < 0) |
| 1633 | bb_simple_perror_msg_and_die("adjtimex"); | 1633 | bb_simple_perror_msg_and_die("adjtimex"); |
| 1634 | bb_error_msg("p adjtimex freq:%ld offset:%+ld status:0x%x tc:%ld", | 1634 | bb_error_msg("p adjtimex freq:%ld offset:%+ld status:0x%x tc:%ld", |
| 1635 | tmx.freq, tmx.offset, tmx.status, tmx.constant); | 1635 | (long)tmx.freq, (long)tmx.offset, tmx.status, (long)tmx.constant); |
| 1636 | } | 1636 | } |
| 1637 | 1637 | ||
| 1638 | memset(&tmx, 0, sizeof(tmx)); | 1638 | memset(&tmx, 0, sizeof(tmx)); |
| @@ -1747,7 +1747,7 @@ update_local_clock(peer_t *p) | |||
| 1747 | * Not sure why. Perhaps it is normal. | 1747 | * Not sure why. Perhaps it is normal. |
| 1748 | */ | 1748 | */ |
| 1749 | VERB4 bb_error_msg("adjtimex:%d freq:%ld offset:%+ld status:0x%x", | 1749 | VERB4 bb_error_msg("adjtimex:%d freq:%ld offset:%+ld status:0x%x", |
| 1750 | rc, tmx.freq, tmx.offset, tmx.status); | 1750 | rc, (long)tmx.freq, (long)tmx.offset, tmx.status); |
| 1751 | G.kernel_freq_drift = tmx.freq / 65536; | 1751 | G.kernel_freq_drift = tmx.freq / 65536; |
| 1752 | VERB2 bb_error_msg("update from:%s offset:%+f delay:%f jitter:%f clock drift:%+.3fppm tc:%d", | 1752 | VERB2 bb_error_msg("update from:%s offset:%+f delay:%f jitter:%f clock drift:%+.3fppm tc:%d", |
| 1753 | p->p_dotted, | 1753 | p->p_dotted, |
diff --git a/networking/ping.c b/networking/ping.c index 9805695a1..b7e6955a9 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
| @@ -247,7 +247,7 @@ struct globals { | |||
| 247 | static void noresp(int ign UNUSED_PARAM) | 247 | static void noresp(int ign UNUSED_PARAM) |
| 248 | { | 248 | { |
| 249 | printf("No response from %s\n", G.hostname); | 249 | printf("No response from %s\n", G.hostname); |
| 250 | exit(EXIT_FAILURE); | 250 | exit_FAILURE(); |
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | static void ping4(len_and_sockaddr *lsa) | 253 | static void ping4(len_and_sockaddr *lsa) |
diff --git a/networking/pscan.c b/networking/pscan.c index 816178bbc..13785deca 100644 --- a/networking/pscan.c +++ b/networking/pscan.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config PSCAN | 8 | //config:config PSCAN |
| 9 | //config: bool "pscan (6 kb)" | 9 | //config: bool "pscan (6.2 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: Simple network port scanner. | 12 | //config: Simple network port scanner. |
diff --git a/networking/route.c b/networking/route.c index 26146f8e9..6e2d30cfd 100644 --- a/networking/route.c +++ b/networking/route.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | * remove ridiculous amounts of bloat. | 25 | * remove ridiculous amounts of bloat. |
| 26 | */ | 26 | */ |
| 27 | //config:config ROUTE | 27 | //config:config ROUTE |
| 28 | //config: bool "route (8.7 kb)" | 28 | //config: bool "route (9 kb)" |
| 29 | //config: default y | 29 | //config: default y |
| 30 | //config: help | 30 | //config: help |
| 31 | //config: Route displays or manipulates the kernel's IP routing tables. | 31 | //config: Route displays or manipulates the kernel's IP routing tables. |
diff --git a/networking/slattach.c b/networking/slattach.c index 6d2a252fc..2f5cd15ab 100644 --- a/networking/slattach.c +++ b/networking/slattach.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | * - The -F options allows disabling of RTS/CTS flow control. | 13 | * - The -F options allows disabling of RTS/CTS flow control. |
| 14 | */ | 14 | */ |
| 15 | //config:config SLATTACH | 15 | //config:config SLATTACH |
| 16 | //config: bool "slattach (6.2 kb)" | 16 | //config: bool "slattach (6.3 kb)" |
| 17 | //config: default y | 17 | //config: default y |
| 18 | //config: help | 18 | //config: help |
| 19 | //config: slattach configures serial line as SLIP network interface. | 19 | //config: slattach configures serial line as SLIP network interface. |
| @@ -80,7 +80,7 @@ static void restore_state_and_exit(int exitcode) | |||
| 80 | 80 | ||
| 81 | /* Restore line status */ | 81 | /* Restore line status */ |
| 82 | if (tcsetattr_serial_or_warn(&G.saved_state)) | 82 | if (tcsetattr_serial_or_warn(&G.saved_state)) |
| 83 | exit(EXIT_FAILURE); | 83 | exit_FAILURE(); |
| 84 | 84 | ||
| 85 | if (ENABLE_FEATURE_CLEAN_UP) | 85 | if (ENABLE_FEATURE_CLEAN_UP) |
| 86 | close(serial_fd); | 86 | close(serial_fd); |
diff --git a/networking/ssl_client.c b/networking/ssl_client.c index 27575a2bf..757745896 100644 --- a/networking/ssl_client.c +++ b/networking/ssl_client.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Licensed under GPLv2, see file LICENSE in this source tree. | 4 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 5 | */ | 5 | */ |
| 6 | //config:config SSL_CLIENT | 6 | //config:config SSL_CLIENT |
| 7 | //config: bool "ssl_client (25 kb)" | 7 | //config: bool "ssl_client (28 kb)" |
| 8 | //config: default y | 8 | //config: default y |
| 9 | //config: select TLS | 9 | //config: select TLS |
| 10 | //config: help | 10 | //config: help |
diff --git a/networking/telnetd.c b/networking/telnetd.c index 0805e464f..bfeea1400 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | * Set process group corrections, initial busybox port | 21 | * Set process group corrections, initial busybox port |
| 22 | */ | 22 | */ |
| 23 | //config:config TELNETD | 23 | //config:config TELNETD |
| 24 | //config: bool "telnetd (12 kb)" | 24 | //config: bool "telnetd (13 kb)" |
| 25 | //config: default y | 25 | //config: default y |
| 26 | //config: select FEATURE_SYSLOG | 26 | //config: select FEATURE_SYSLOG |
| 27 | //config: help | 27 | //config: help |
| @@ -571,7 +571,7 @@ make_new_session( | |||
| 571 | BB_EXECVP(G.loginpath, (char **)login_argv); | 571 | BB_EXECVP(G.loginpath, (char **)login_argv); |
| 572 | /* _exit is safer with vfork, and we shouldn't send message | 572 | /* _exit is safer with vfork, and we shouldn't send message |
| 573 | * to remote clients anyway */ | 573 | * to remote clients anyway */ |
| 574 | _exit(EXIT_FAILURE); /*bb_perror_msg_and_die("execv %s", G.loginpath);*/ | 574 | _exit_FAILURE(); /*bb_perror_msg_and_die("execv %s", G.loginpath);*/ |
| 575 | } | 575 | } |
| 576 | 576 | ||
| 577 | #if ENABLE_FEATURE_TELNETD_STANDALONE | 577 | #if ENABLE_FEATURE_TELNETD_STANDALONE |
diff --git a/networking/traceroute.c b/networking/traceroute.c index 4bbe1ab8e..767f537ce 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
| @@ -216,7 +216,7 @@ | |||
| 216 | //config: Utility to trace the route of IP packets. | 216 | //config: Utility to trace the route of IP packets. |
| 217 | //config: | 217 | //config: |
| 218 | //config:config TRACEROUTE6 | 218 | //config:config TRACEROUTE6 |
| 219 | //config: bool "traceroute6 (13 kb)" | 219 | //config: bool "traceroute6 (12 kb)" |
| 220 | //config: default y | 220 | //config: default y |
| 221 | //config: depends on FEATURE_IPV6 | 221 | //config: depends on FEATURE_IPV6 |
| 222 | //config: help | 222 | //config: help |
diff --git a/networking/tunctl.c b/networking/tunctl.c index 28571ae7f..c17302eac 100644 --- a/networking/tunctl.c +++ b/networking/tunctl.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Licensed under GPLv2, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 11 | */ | 11 | */ |
| 12 | //config:config TUNCTL | 12 | //config:config TUNCTL |
| 13 | //config: bool "tunctl (6.2 kb)" | 13 | //config: bool "tunctl (6.4 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: tunctl creates or deletes tun devices. | 16 | //config: tunctl creates or deletes tun devices. |
diff --git a/networking/udhcp/Config.src b/networking/udhcp/Config.src index 7ba7f48fc..4b9259eb8 100644 --- a/networking/udhcp/Config.src +++ b/networking/udhcp/Config.src | |||
| @@ -10,6 +10,13 @@ config UDHCPD | |||
| 10 | udhcpd is a DHCP server geared primarily toward embedded systems, | 10 | udhcpd is a DHCP server geared primarily toward embedded systems, |
| 11 | while striving to be fully functional and RFC compliant. | 11 | while striving to be fully functional and RFC compliant. |
| 12 | 12 | ||
| 13 | config FEATURE_UDHCPD_BOOTP | ||
| 14 | bool "Answer to BOOTP requests as well" | ||
| 15 | default y | ||
| 16 | depends on UDHCPD | ||
| 17 | help | ||
| 18 | Support old BOOTP protocol too. | ||
| 19 | |||
| 13 | config FEATURE_UDHCPD_BASE_IP_ON_MAC | 20 | config FEATURE_UDHCPD_BASE_IP_ON_MAC |
| 14 | bool "Select IP address based on client MAC" | 21 | bool "Select IP address based on client MAC" |
| 15 | default n | 22 | default n |
| @@ -43,7 +50,7 @@ config DHCPD_LEASES_FILE | |||
| 43 | of the file. Normally it is safe to leave it untouched. | 50 | of the file. Normally it is safe to leave it untouched. |
| 44 | 51 | ||
| 45 | config DUMPLEASES | 52 | config DUMPLEASES |
| 46 | bool "dumpleases (5.1 kb)" | 53 | bool "dumpleases (5.3 kb)" |
| 47 | default y | 54 | default y |
| 48 | help | 55 | help |
| 49 | dumpleases displays the leases written out by the udhcpd. | 56 | dumpleases displays the leases written out by the udhcpd. |
| @@ -51,7 +58,7 @@ config DUMPLEASES | |||
| 51 | by the absolute time that it expires in seconds from epoch. | 58 | by the absolute time that it expires in seconds from epoch. |
| 52 | 59 | ||
| 53 | config DHCPRELAY | 60 | config DHCPRELAY |
| 54 | bool "dhcprelay (5.2 kb)" | 61 | bool "dhcprelay (5.5 kb)" |
| 55 | default y | 62 | default y |
| 56 | help | 63 | help |
| 57 | dhcprelay listens for DHCP requests on one or more interfaces | 64 | dhcprelay listens for DHCP requests on one or more interfaces |
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c index ae818db05..ad580f38d 100644 --- a/networking/udhcp/common.c +++ b/networking/udhcp/common.c | |||
| @@ -252,6 +252,14 @@ uint8_t* FAST_FUNC udhcp_scan_options(struct dhcp_packet *packet, struct dhcp_sc | |||
| 252 | /* option bytes: [code][len][data1][data2]..[dataLEN] */ | 252 | /* option bytes: [code][len][data1][data2]..[dataLEN] */ |
| 253 | while (1) { | 253 | while (1) { |
| 254 | if (scan_state->rem <= 0) { | 254 | if (scan_state->rem <= 0) { |
| 255 | if (ENABLE_FEATURE_UDHCPD_BOOTP && scan_state->rem == 0) { | ||
| 256 | /* DHCP requires END option to be present. | ||
| 257 | * We are here if packet fails this condition | ||
| 258 | * (options[] are zero-padded to the end). | ||
| 259 | * Assume BOOTP packet without further checks. | ||
| 260 | */ | ||
| 261 | break; /* return NULL */ | ||
| 262 | } | ||
| 255 | complain: | 263 | complain: |
| 256 | bb_simple_error_msg("bad packet, malformed option field"); | 264 | bb_simple_error_msg("bad packet, malformed option field"); |
| 257 | return NULL; | 265 | return NULL; |
| @@ -278,7 +286,7 @@ uint8_t* FAST_FUNC udhcp_scan_options(struct dhcp_packet *packet, struct dhcp_sc | |||
| 278 | scan_state->rem = sizeof(packet->sname); | 286 | scan_state->rem = sizeof(packet->sname); |
| 279 | continue; | 287 | continue; |
| 280 | } | 288 | } |
| 281 | break; | 289 | break; /* return NULL */ |
| 282 | } | 290 | } |
| 283 | 291 | ||
| 284 | if (scan_state->rem <= OPT_LEN) /* [len] byte exists? */ | 292 | if (scan_state->rem <= OPT_LEN) /* [len] byte exists? */ |
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index 49a0b593d..3ef371a7c 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h | |||
| @@ -20,8 +20,11 @@ extern const uint8_t MAC_BCAST_ADDR[6] ALIGN2; /* six all-ones */ | |||
| 20 | 20 | ||
| 21 | /*** DHCP packet ***/ | 21 | /*** DHCP packet ***/ |
| 22 | 22 | ||
| 23 | #define RFC1048_MAGIC 0x63825363 | ||
| 24 | /* RFC 1048 still uses BOOTP's small buffer (4 byte cookie + 60 the rest) */ | ||
| 25 | #define RFC1048_OPTIONS_BUFSIZE 60 | ||
| 26 | |||
| 23 | /* DHCP protocol. See RFC 2131 */ | 27 | /* DHCP protocol. See RFC 2131 */ |
| 24 | #define DHCP_MAGIC 0x63825363 | ||
| 25 | #define DHCP_OPTIONS_BUFSIZE 308 | 28 | #define DHCP_OPTIONS_BUFSIZE 308 |
| 26 | #define BOOTREQUEST 1 | 29 | #define BOOTREQUEST 1 |
| 27 | #define BOOTREPLY 2 | 30 | #define BOOTREPLY 2 |
| @@ -57,8 +60,10 @@ struct dhcp_packet { | |||
| 57 | * such as 'unix' or 'gateway'; this means 'boot the named program | 60 | * such as 'unix' or 'gateway'; this means 'boot the named program |
| 58 | * configured for my machine'" | 61 | * configured for my machine'" |
| 59 | */ | 62 | */ |
| 60 | /* BOOTP fields end here, BOOTP says optional uint8_t vend[64] follows */ | 63 | /* BOOTP fields end here, BOOTP says optional uint8_t vend[64] follows. */ |
| 61 | uint32_t cookie; /* DHCP magic bytes: 99,130,83,99 decimal */ | 64 | /* RFC 1048 defined this cookie value and options 0-12 and 255. */ |
| 65 | /* DHCP extended it and required option 255 (END) to be always present. */ | ||
| 66 | uint32_t cookie; /* RFC 1048 magic bytes: 99,130,83,99 decimal */ | ||
| 62 | uint8_t options[DHCP_OPTIONS_BUFSIZE + CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS]; | 67 | uint8_t options[DHCP_OPTIONS_BUFSIZE + CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS]; |
| 63 | }; | 68 | }; |
| 64 | #define DHCP_PKT_SNAME_LEN 64 | 69 | #define DHCP_PKT_SNAME_LEN 64 |
| @@ -200,6 +205,9 @@ struct dhcp_scan_state { | |||
| 200 | #define SNAME_FIELD 2 | 205 | #define SNAME_FIELD 2 |
| 201 | 206 | ||
| 202 | /* DHCP_MESSAGE_TYPE values */ | 207 | /* DHCP_MESSAGE_TYPE values */ |
| 208 | #if ENABLE_FEATURE_UDHCPD_BOOTP | ||
| 209 | #define MSGTYPE_BOOTP 0 /* there was no TYPE option in client's packet, assuming BOOTP */ | ||
| 210 | #endif | ||
| 203 | #define DHCPDISCOVER 1 /* client -> server */ | 211 | #define DHCPDISCOVER 1 /* client -> server */ |
| 204 | #define DHCPOFFER 2 /* client <- server */ | 212 | #define DHCPOFFER 2 /* client <- server */ |
| 205 | #define DHCPREQUEST 3 /* client -> server */ | 213 | #define DHCPREQUEST 3 /* client -> server */ |
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index c757fb37c..200a2fb8a 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
| @@ -971,7 +971,7 @@ static NOINLINE int d4_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd) | |||
| 971 | } | 971 | } |
| 972 | skip_udp_sum_check: | 972 | skip_udp_sum_check: |
| 973 | 973 | ||
| 974 | if (packet.data.cookie != htonl(DHCP_MAGIC)) { | 974 | if (packet.data.cookie != htonl(RFC1048_MAGIC)) { |
| 975 | log1s("packet with bad magic, ignoring"); | 975 | log1s("packet with bad magic, ignoring"); |
| 976 | return -2; | 976 | return -2; |
| 977 | } | 977 | } |
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index 66750e2e6..2904119e5 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c | |||
| @@ -649,7 +649,8 @@ static void init_packet(struct dhcp_packet *packet, struct dhcp_packet *oldpacke | |||
| 649 | packet->flags = oldpacket->flags; | 649 | packet->flags = oldpacket->flags; |
| 650 | packet->gateway_nip = oldpacket->gateway_nip; | 650 | packet->gateway_nip = oldpacket->gateway_nip; |
| 651 | packet->ciaddr = oldpacket->ciaddr; | 651 | packet->ciaddr = oldpacket->ciaddr; |
| 652 | udhcp_add_simple_option(packet, DHCP_SERVER_ID, server_data.server_nip); | 652 | IF_FEATURE_UDHCPD_BOOTP(if (type != MSGTYPE_BOOTP)) |
| 653 | udhcp_add_simple_option(packet, DHCP_SERVER_ID, server_data.server_nip); | ||
| 653 | } | 654 | } |
| 654 | 655 | ||
| 655 | /* Fill options field, siaddr_nip, and sname and boot_file fields. | 656 | /* Fill options field, siaddr_nip, and sname and boot_file fields. |
| @@ -725,7 +726,12 @@ static uint32_t select_lease_time(struct dhcp_packet *packet) | |||
| 725 | 726 | ||
| 726 | /* We got a DHCP DISCOVER. Send an OFFER. */ | 727 | /* We got a DHCP DISCOVER. Send an OFFER. */ |
| 727 | /* NOINLINE: limit stack usage in caller */ | 728 | /* NOINLINE: limit stack usage in caller */ |
| 728 | static NOINLINE void send_offer(struct dhcp_packet *oldpacket, | 729 | #if !ENABLE_FEATURE_UDHCPD_BOOTP |
| 730 | #define send_offer(is_dhcp_client, ...) \ | ||
| 731 | send_offer(__VA_ARGS__) | ||
| 732 | #endif | ||
| 733 | static NOINLINE void send_offer(void *is_dhcp_client, | ||
| 734 | struct dhcp_packet *oldpacket, | ||
| 729 | uint32_t static_lease_nip, | 735 | uint32_t static_lease_nip, |
| 730 | struct dyn_lease *lease, | 736 | struct dyn_lease *lease, |
| 731 | uint32_t requested_nip, | 737 | uint32_t requested_nip, |
| @@ -734,7 +740,12 @@ static NOINLINE void send_offer(struct dhcp_packet *oldpacket, | |||
| 734 | struct dhcp_packet packet; | 740 | struct dhcp_packet packet; |
| 735 | uint32_t lease_time_sec; | 741 | uint32_t lease_time_sec; |
| 736 | 742 | ||
| 743 | #if ENABLE_FEATURE_UDHCPD_BOOTP | ||
| 744 | init_packet(&packet, oldpacket, is_dhcp_client ? DHCPOFFER : MSGTYPE_BOOTP); | ||
| 745 | #else | ||
| 746 | enum { is_dhcp_client = 1 }; | ||
| 737 | init_packet(&packet, oldpacket, DHCPOFFER); | 747 | init_packet(&packet, oldpacket, DHCPOFFER); |
| 748 | #endif | ||
| 738 | 749 | ||
| 739 | /* If it is a static lease, use its IP */ | 750 | /* If it is a static lease, use its IP */ |
| 740 | packet.yiaddr = static_lease_nip; | 751 | packet.yiaddr = static_lease_nip; |
| @@ -784,9 +795,16 @@ static NOINLINE void send_offer(struct dhcp_packet *oldpacket, | |||
| 784 | } | 795 | } |
| 785 | } | 796 | } |
| 786 | 797 | ||
| 787 | lease_time_sec = select_lease_time(oldpacket); | 798 | if (is_dhcp_client) { |
| 788 | udhcp_add_simple_option(&packet, DHCP_LEASE_TIME, htonl(lease_time_sec)); | 799 | lease_time_sec = select_lease_time(oldpacket); |
| 800 | udhcp_add_simple_option(&packet, DHCP_LEASE_TIME, htonl(lease_time_sec)); | ||
| 801 | } | ||
| 802 | /* TODO: pass "is_dhcp_client" to add_server_options(), avoid adding confusing options to BOOTP clients? */ | ||
| 789 | add_server_options(&packet); | 803 | add_server_options(&packet); |
| 804 | if (!is_dhcp_client && udhcp_end_option(packet.options) >= RFC1048_OPTIONS_BUFSIZE) { | ||
| 805 | bb_simple_error_msg("BOOTP reply too large, not sending"); | ||
| 806 | return; | ||
| 807 | } | ||
| 790 | 808 | ||
| 791 | /* send_packet emits error message itself if it detects failure */ | 809 | /* send_packet emits error message itself if it detects failure */ |
| 792 | send_packet_verbose(&packet, "sending OFFER to %s"); | 810 | send_packet_verbose(&packet, "sending OFFER to %s"); |
| @@ -1050,8 +1068,12 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv) | |||
| 1050 | continue; | 1068 | continue; |
| 1051 | } | 1069 | } |
| 1052 | msg_type = udhcp_get_option(&packet, DHCP_MESSAGE_TYPE); | 1070 | msg_type = udhcp_get_option(&packet, DHCP_MESSAGE_TYPE); |
| 1053 | if (!msg_type || msg_type[0] < DHCP_MINTYPE || msg_type[0] > DHCP_MAXTYPE) { | 1071 | if ( |
| 1054 | bb_info_msg("no or bad message type option%s", ", ignoring packet"); | 1072 | IF_FEATURE_UDHCPD_BOOTP( msg_type && ) |
| 1073 | IF_NOT_FEATURE_UDHCPD_BOOTP( !msg_type || ) | ||
| 1074 | (msg_type[0] < DHCP_MINTYPE || msg_type[0] > DHCP_MAXTYPE) | ||
| 1075 | ) { | ||
| 1076 | bb_info_msg("bad message type option%s", ", ignoring packet"); | ||
| 1055 | continue; | 1077 | continue; |
| 1056 | } | 1078 | } |
| 1057 | 1079 | ||
| @@ -1086,12 +1108,25 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv) | |||
| 1086 | move_from_unaligned32(requested_nip, requested_ip_opt); | 1108 | move_from_unaligned32(requested_nip, requested_ip_opt); |
| 1087 | } | 1109 | } |
| 1088 | 1110 | ||
| 1111 | #if ENABLE_FEATURE_UDHCPD_BOOTP | ||
| 1112 | /* Handle old BOOTP clients */ | ||
| 1113 | if (!msg_type) { | ||
| 1114 | log1("received %s", "BOOTP BOOTREQUEST"); | ||
| 1115 | if (!static_lease_nip) { | ||
| 1116 | bb_info_msg("no static lease for BOOTP client%s", ", ignoring packet"); | ||
| 1117 | continue; | ||
| 1118 | } | ||
| 1119 | send_offer(msg_type, &packet, static_lease_nip, lease, requested_nip, arpping_ms); | ||
| 1120 | continue; | ||
| 1121 | } | ||
| 1122 | #endif | ||
| 1123 | |||
| 1089 | switch (msg_type[0]) { | 1124 | switch (msg_type[0]) { |
| 1090 | 1125 | ||
| 1091 | case DHCPDISCOVER: | 1126 | case DHCPDISCOVER: |
| 1092 | log1("received %s", "DISCOVER"); | 1127 | log1("received %s", "DISCOVER"); |
| 1093 | 1128 | ||
| 1094 | send_offer(&packet, static_lease_nip, lease, requested_nip, arpping_ms); | 1129 | send_offer(msg_type, &packet, static_lease_nip, lease, requested_nip, arpping_ms); |
| 1095 | break; | 1130 | break; |
| 1096 | 1131 | ||
| 1097 | case DHCPREQUEST: | 1132 | case DHCPREQUEST: |
diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c index 529978189..f9dc11d01 100644 --- a/networking/udhcp/packet.c +++ b/networking/udhcp/packet.c | |||
| @@ -18,6 +18,8 @@ void FAST_FUNC udhcp_init_header(struct dhcp_packet *packet, char type) | |||
| 18 | memset(packet, 0, sizeof(*packet)); | 18 | memset(packet, 0, sizeof(*packet)); |
| 19 | packet->op = BOOTREQUEST; /* if client to a server */ | 19 | packet->op = BOOTREQUEST; /* if client to a server */ |
| 20 | switch (type) { | 20 | switch (type) { |
| 21 | IF_FEATURE_UDHCPD_BOOTP(case MSGTYPE_BOOTP:) | ||
| 22 | /* reply to a BOOTP (not DHCP) client */ | ||
| 21 | case DHCPOFFER: | 23 | case DHCPOFFER: |
| 22 | case DHCPACK: | 24 | case DHCPACK: |
| 23 | case DHCPNAK: | 25 | case DHCPNAK: |
| @@ -25,10 +27,11 @@ void FAST_FUNC udhcp_init_header(struct dhcp_packet *packet, char type) | |||
| 25 | } | 27 | } |
| 26 | packet->htype = 1; /* ethernet */ | 28 | packet->htype = 1; /* ethernet */ |
| 27 | packet->hlen = 6; | 29 | packet->hlen = 6; |
| 28 | packet->cookie = htonl(DHCP_MAGIC); | 30 | packet->cookie = htonl(RFC1048_MAGIC); |
| 29 | if (DHCP_END != 0) | 31 | if (DHCP_END != 0) |
| 30 | packet->options[0] = DHCP_END; | 32 | packet->options[0] = DHCP_END; |
| 31 | udhcp_add_simple_option(packet, DHCP_MESSAGE_TYPE, type); | 33 | IF_FEATURE_UDHCPD_BOOTP(if (type != MSGTYPE_BOOTP)) |
| 34 | udhcp_add_simple_option(packet, DHCP_MESSAGE_TYPE, type); | ||
| 32 | } | 35 | } |
| 33 | #endif | 36 | #endif |
| 34 | 37 | ||
| @@ -90,7 +93,7 @@ int FAST_FUNC udhcp_recv_kernel_packet(struct dhcp_packet *packet, int fd) | |||
| 90 | } | 93 | } |
| 91 | 94 | ||
| 92 | if (bytes < offsetof(struct dhcp_packet, options) | 95 | if (bytes < offsetof(struct dhcp_packet, options) |
| 93 | || packet->cookie != htonl(DHCP_MAGIC) | 96 | || packet->cookie != htonl(RFC1048_MAGIC) |
| 94 | ) { | 97 | ) { |
| 95 | bb_simple_info_msg("packet with bad magic, ignoring"); | 98 | bb_simple_info_msg("packet with bad magic, ignoring"); |
| 96 | return -2; | 99 | return -2; |
diff --git a/networking/vconfig.c b/networking/vconfig.c index 7e805be9c..77fbe3a40 100644 --- a/networking/vconfig.c +++ b/networking/vconfig.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config VCONFIG | 9 | //config:config VCONFIG |
| 10 | //config: bool "vconfig (2.3 kb)" | 10 | //config: bool "vconfig (2.6 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Creates, removes, and configures VLAN interfaces | 13 | //config: Creates, removes, and configures VLAN interfaces |
diff --git a/networking/wget.c b/networking/wget.c index 5470502aa..e0c66edba 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Kuhn's copyrights are licensed GPLv2-or-later. File as a whole remains GPLv2. | 9 | * Kuhn's copyrights are licensed GPLv2-or-later. File as a whole remains GPLv2. |
| 10 | */ | 10 | */ |
| 11 | //config:config WGET | 11 | //config:config WGET |
| 12 | //config: bool "wget (38 kb)" | 12 | //config: bool "wget (41 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: wget is a utility for non-interactive download of files from HTTP | 15 | //config: wget is a utility for non-interactive download of files from HTTP |
diff --git a/networking/whois.c b/networking/whois.c index caa71ac51..3a1dbd45d 100644 --- a/networking/whois.c +++ b/networking/whois.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Add proxy support | 10 | * Add proxy support |
| 11 | */ | 11 | */ |
| 12 | //config:config WHOIS | 12 | //config:config WHOIS |
| 13 | //config: bool "whois (6.3 kb)" | 13 | //config: bool "whois (6.5 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: whois is a client for the whois directory service | 16 | //config: whois is a client for the whois directory service |
diff --git a/networking/zcip.c b/networking/zcip.c index 311dfbe4c..137d46e13 100644 --- a/networking/zcip.c +++ b/networking/zcip.c | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | * certainly be used. Its naming is built over multicast DNS. | 14 | * certainly be used. Its naming is built over multicast DNS. |
| 15 | */ | 15 | */ |
| 16 | //config:config ZCIP | 16 | //config:config ZCIP |
| 17 | //config: bool "zcip (8.4 kb)" | 17 | //config: bool "zcip (8.7 kb)" |
| 18 | //config: default y | 18 | //config: default y |
| 19 | //config: select FEATURE_SYSLOG | 19 | //config: select FEATURE_SYSLOG |
| 20 | //config: help | 20 | //config: help |
diff --git a/printutils/lpd.c b/printutils/lpd.c index 34e5ea209..c67d54708 100644 --- a/printutils/lpd.c +++ b/printutils/lpd.c | |||
| @@ -70,7 +70,7 @@ | |||
| 70 | * mv -f ./"$DATAFILE" save/ | 70 | * mv -f ./"$DATAFILE" save/ |
| 71 | */ | 71 | */ |
| 72 | //config:config LPD | 72 | //config:config LPD |
| 73 | //config: bool "lpd (5.5 kb)" | 73 | //config: bool "lpd (5.7 kb)" |
| 74 | //config: default y | 74 | //config: default y |
| 75 | //config: help | 75 | //config: help |
| 76 | //config: lpd is a print spooling daemon. | 76 | //config: lpd is a print spooling daemon. |
diff --git a/printutils/lpr.c b/printutils/lpr.c index d40d0a67c..25b0f7235 100644 --- a/printutils/lpr.c +++ b/printutils/lpr.c | |||
| @@ -12,13 +12,13 @@ | |||
| 12 | * See RFC 1179 for protocol description. | 12 | * See RFC 1179 for protocol description. |
| 13 | */ | 13 | */ |
| 14 | //config:config LPR | 14 | //config:config LPR |
| 15 | //config: bool "lpr (9.9 kb)" | 15 | //config: bool "lpr (10 kb)" |
| 16 | //config: default y | 16 | //config: default y |
| 17 | //config: help | 17 | //config: help |
| 18 | //config: lpr sends files (or standard input) to a print spooling daemon. | 18 | //config: lpr sends files (or standard input) to a print spooling daemon. |
| 19 | //config: | 19 | //config: |
| 20 | //config:config LPQ | 20 | //config:config LPQ |
| 21 | //config: bool "lpq (9.9 kb)" | 21 | //config: bool "lpq (10 kb)" |
| 22 | //config: default y | 22 | //config: default y |
| 23 | //config: help | 23 | //config: help |
| 24 | //config: lpq is a print spool queue examination and manipulation program. | 24 | //config: lpq is a print spool queue examination and manipulation program. |
diff --git a/procps/free.c b/procps/free.c index f19c38dd5..88ec0c755 100644 --- a/procps/free.c +++ b/procps/free.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config FREE | 9 | //config:config FREE |
| 10 | //config: bool "free (3.1 kb)" | 10 | //config: bool "free (3.8 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: free displays the total amount of free and used physical and swap | 13 | //config: free displays the total amount of free and used physical and swap |
diff --git a/procps/fuser.c b/procps/fuser.c index 191746751..f72552f1b 100644 --- a/procps/fuser.c +++ b/procps/fuser.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config FUSER | 9 | //config:config FUSER |
| 10 | //config: bool "fuser (7 kb)" | 10 | //config: bool "fuser (7.3 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: fuser lists all PIDs (Process IDs) that currently have a given | 13 | //config: fuser lists all PIDs (Process IDs) that currently have a given |
diff --git a/procps/iostat.c b/procps/iostat.c index 7bf567c34..2feb02456 100644 --- a/procps/iostat.c +++ b/procps/iostat.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config IOSTAT | 9 | //config:config IOSTAT |
| 10 | //config: bool "iostat (7.6 kb)" | 10 | //config: bool "iostat (8 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Report CPU and I/O statistics | 13 | //config: Report CPU and I/O statistics |
diff --git a/procps/kill.c b/procps/kill.c index 583d61aaf..6be11296e 100644 --- a/procps/kill.c +++ b/procps/kill.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config KILL | 10 | //config:config KILL |
| 11 | //config: bool "kill (3.1 kb)" | 11 | //config: bool "kill (3.4 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: The command kill sends the specified signal to the specified | 14 | //config: The command kill sends the specified signal to the specified |
| @@ -16,7 +16,7 @@ | |||
| 16 | //config: signal is sent. | 16 | //config: signal is sent. |
| 17 | //config: | 17 | //config: |
| 18 | //config:config KILLALL | 18 | //config:config KILLALL |
| 19 | //config: bool "killall (5.6 kb)" | 19 | //config: bool "killall (5.9 kb)" |
| 20 | //config: default y | 20 | //config: default y |
| 21 | //config: help | 21 | //config: help |
| 22 | //config: killall sends a signal to all processes running any of the | 22 | //config: killall sends a signal to all processes running any of the |
| @@ -24,7 +24,7 @@ | |||
| 24 | //config: sent. | 24 | //config: sent. |
| 25 | //config: | 25 | //config: |
| 26 | //config:config KILLALL5 | 26 | //config:config KILLALL5 |
| 27 | //config: bool "killall5 (5.3 kb)" | 27 | //config: bool "killall5 (5.6 kb)" |
| 28 | //config: default y | 28 | //config: default y |
| 29 | //config: help | 29 | //config: help |
| 30 | //config: The SystemV killall command. killall5 sends a signal | 30 | //config: The SystemV killall command. killall5 sends a signal |
diff --git a/procps/lsof.c b/procps/lsof.c index 9cb8d066c..57e385c3f 100644 --- a/procps/lsof.c +++ b/procps/lsof.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config LSOF | 9 | //config:config LSOF |
| 10 | //config: bool "lsof (3.4 kb)" | 10 | //config: bool "lsof (3.7 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Show open files in the format of: | 13 | //config: Show open files in the format of: |
diff --git a/procps/mpstat.c b/procps/mpstat.c index 883c4d52d..d8158ef8f 100644 --- a/procps/mpstat.c +++ b/procps/mpstat.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config MPSTAT | 9 | //config:config MPSTAT |
| 10 | //config: bool "mpstat (9.8 kb)" | 10 | //config: bool "mpstat (10 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Per-processor statistics | 13 | //config: Per-processor statistics |
diff --git a/procps/nmeter.c b/procps/nmeter.c index 4197174ba..dca07eac6 100644 --- a/procps/nmeter.c +++ b/procps/nmeter.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Contact me: vda.linux@googlemail.com | 6 | * Contact me: vda.linux@googlemail.com |
| 7 | */ | 7 | */ |
| 8 | //config:config NMETER | 8 | //config:config NMETER |
| 9 | //config: bool "nmeter (11 kb)" | 9 | //config: bool "nmeter (12 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: Prints selected system stats continuously, one line per update. | 12 | //config: Prints selected system stats continuously, one line per update. |
diff --git a/procps/pgrep.c b/procps/pgrep.c index afcfa31ec..9773a72c4 100644 --- a/procps/pgrep.c +++ b/procps/pgrep.c | |||
| @@ -7,13 +7,13 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config PGREP | 9 | //config:config PGREP |
| 10 | //config: bool "pgrep (6.5 kb)" | 10 | //config: bool "pgrep (6.8 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Look for processes by name. | 13 | //config: Look for processes by name. |
| 14 | //config: | 14 | //config: |
| 15 | //config:config PKILL | 15 | //config:config PKILL |
| 16 | //config: bool "pkill (7.5 kb)" | 16 | //config: bool "pkill (7.8 kb)" |
| 17 | //config: default y | 17 | //config: default y |
| 18 | //config: help | 18 | //config: help |
| 19 | //config: Send signals to processes by name. | 19 | //config: Send signals to processes by name. |
diff --git a/procps/pidof.c b/procps/pidof.c index b81709a81..507a011a2 100644 --- a/procps/pidof.c +++ b/procps/pidof.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config PIDOF | 9 | //config:config PIDOF |
| 10 | //config: bool "pidof (6.3 kb)" | 10 | //config: bool "pidof (6.5 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Pidof finds the process id's (pids) of the named programs. It prints | 13 | //config: Pidof finds the process id's (pids) of the named programs. It prints |
diff --git a/procps/pmap.c b/procps/pmap.c index 408cbfce7..49f7688d9 100644 --- a/procps/pmap.c +++ b/procps/pmap.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * for details. | 8 | * for details. |
| 9 | */ | 9 | */ |
| 10 | //config:config PMAP | 10 | //config:config PMAP |
| 11 | //config: bool "pmap (6 kb)" | 11 | //config: bool "pmap (6.2 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: Display processes' memory mappings. | 14 | //config: Display processes' memory mappings. |
diff --git a/procps/powertop.c b/procps/powertop.c index 18ddaa3ec..147b7a3ef 100644 --- a/procps/powertop.c +++ b/procps/powertop.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Licensed under GPLv2, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config POWERTOP | 11 | //config:config POWERTOP |
| 12 | //config: bool "powertop (9.6 kb)" | 12 | //config: bool "powertop (9.9 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: Analyze power consumption on Intel-based laptops | 15 | //config: Analyze power consumption on Intel-based laptops |
| @@ -109,7 +109,7 @@ static void reset_term(void) | |||
| 109 | static void sig_handler(int signo UNUSED_PARAM) | 109 | static void sig_handler(int signo UNUSED_PARAM) |
| 110 | { | 110 | { |
| 111 | reset_term(); | 111 | reset_term(); |
| 112 | _exit(EXIT_FAILURE); | 112 | _exit_FAILURE(); |
| 113 | } | 113 | } |
| 114 | #endif | 114 | #endif |
| 115 | 115 | ||
diff --git a/procps/ps.c b/procps/ps.c index 4c6e07e8b..823539b9a 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Licensed under GPLv2, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config PS | 11 | //config:config PS |
| 12 | //config: bool "ps (11 kb)" | 12 | //config: bool "ps (12 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: ps gives a snapshot of the current processes. | 15 | //config: ps gives a snapshot of the current processes. |
diff --git a/procps/pstree.c b/procps/pstree.c index 67b711168..bf6ceed5a 100644 --- a/procps/pstree.c +++ b/procps/pstree.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Licensed under GPLv2, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 11 | */ | 11 | */ |
| 12 | //config:config PSTREE | 12 | //config:config PSTREE |
| 13 | //config: bool "pstree (9.3 kb)" | 13 | //config: bool "pstree (9.4 kb)" |
| 14 | //config: default y | 14 | //config: default y |
| 15 | //config: help | 15 | //config: help |
| 16 | //config: Display a tree of processes. | 16 | //config: Display a tree of processes. |
diff --git a/procps/pwdx.c b/procps/pwdx.c index 24ba25d90..9257347bb 100644 --- a/procps/pwdx.c +++ b/procps/pwdx.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config PWDX | 10 | //config:config PWDX |
| 11 | //config: bool "pwdx (3.7 kb)" | 11 | //config: bool "pwdx (3.9 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: Report current working directory of a process | 14 | //config: Report current working directory of a process |
diff --git a/procps/smemcap.c b/procps/smemcap.c index 429cc8a3e..6839c9de0 100644 --- a/procps/smemcap.c +++ b/procps/smemcap.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | herein by reference. | 8 | herein by reference. |
| 9 | */ | 9 | */ |
| 10 | //config:config SMEMCAP | 10 | //config:config SMEMCAP |
| 11 | //config: bool "smemcap (2.5 kb)" | 11 | //config: bool "smemcap (3 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: smemcap is a tool for capturing process data for smem, | 14 | //config: smemcap is a tool for capturing process data for smem, |
diff --git a/procps/sysctl.c b/procps/sysctl.c index 40afa0c90..84c5be4f7 100644 --- a/procps/sysctl.c +++ b/procps/sysctl.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * v1.01.1 - busybox applet aware by <solar@gentoo.org> | 11 | * v1.01.1 - busybox applet aware by <solar@gentoo.org> |
| 12 | */ | 12 | */ |
| 13 | //config:config BB_SYSCTL | 13 | //config:config BB_SYSCTL |
| 14 | //config: bool "sysctl (7.4 kb)" | 14 | //config: bool "sysctl (7.9 kb)" |
| 15 | //config: default y | 15 | //config: default y |
| 16 | //config: help | 16 | //config: help |
| 17 | //config: Configure kernel parameters at runtime. | 17 | //config: Configure kernel parameters at runtime. |
diff --git a/procps/uptime.c b/procps/uptime.c index 4fd0c9d2d..aec7bd7d1 100644 --- a/procps/uptime.c +++ b/procps/uptime.c | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | * Added FEATURE_UPTIME_UTMP_SUPPORT flag. | 12 | * Added FEATURE_UPTIME_UTMP_SUPPORT flag. |
| 13 | */ | 13 | */ |
| 14 | //config:config UPTIME | 14 | //config:config UPTIME |
| 15 | //config: bool "uptime (3.7 kb)" | 15 | //config: bool "uptime (4 kb)" |
| 16 | //config: default y | 16 | //config: default y |
| 17 | //config: help | 17 | //config: help |
| 18 | //config: uptime gives a one line display of the current time, how long | 18 | //config: uptime gives a one line display of the current time, how long |
diff --git a/procps/watch.c b/procps/watch.c index 56b128df6..d7c3ad55e 100644 --- a/procps/watch.c +++ b/procps/watch.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config WATCH | 10 | //config:config WATCH |
| 11 | //config: bool "watch (4.4 kb)" | 11 | //config: bool "watch (5.2 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: watch is used to execute a program periodically, showing | 14 | //config: watch is used to execute a program periodically, showing |
diff --git a/runit/chpst.c b/runit/chpst.c index af777568f..2be1a5775 100644 --- a/runit/chpst.c +++ b/runit/chpst.c | |||
| @@ -28,33 +28,33 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
| 28 | /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ | 28 | /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ |
| 29 | 29 | ||
| 30 | //config:config CHPST | 30 | //config:config CHPST |
| 31 | //config: bool "chpst (9 kb)" | 31 | //config: bool "chpst (9.2 kb)" |
| 32 | //config: default y | 32 | //config: default y |
| 33 | //config: help | 33 | //config: help |
| 34 | //config: chpst changes the process state according to the given options, and | 34 | //config: chpst changes the process state according to the given options, and |
| 35 | //config: execs specified program. | 35 | //config: execs specified program. |
| 36 | //config: | 36 | //config: |
| 37 | //config:config SETUIDGID | 37 | //config:config SETUIDGID |
| 38 | //config: bool "setuidgid (4 kb)" | 38 | //config: bool "setuidgid (4.2 kb)" |
| 39 | //config: default y | 39 | //config: default y |
| 40 | //config: help | 40 | //config: help |
| 41 | //config: Sets soft resource limits as specified by options | 41 | //config: Sets soft resource limits as specified by options |
| 42 | //config: | 42 | //config: |
| 43 | //config:config ENVUIDGID | 43 | //config:config ENVUIDGID |
| 44 | //config: bool "envuidgid (3.9 kb)" | 44 | //config: bool "envuidgid (4.1 kb)" |
| 45 | //config: default y | 45 | //config: default y |
| 46 | //config: help | 46 | //config: help |
| 47 | //config: Sets $UID to account's uid and $GID to account's gid | 47 | //config: Sets $UID to account's uid and $GID to account's gid |
| 48 | //config: | 48 | //config: |
| 49 | //config:config ENVDIR | 49 | //config:config ENVDIR |
| 50 | //config: bool "envdir (2.5 kb)" | 50 | //config: bool "envdir (2.9 kb)" |
| 51 | //config: default y | 51 | //config: default y |
| 52 | //config: help | 52 | //config: help |
| 53 | //config: Sets various environment variables as specified by files | 53 | //config: Sets various environment variables as specified by files |
| 54 | //config: in the given directory | 54 | //config: in the given directory |
| 55 | //config: | 55 | //config: |
| 56 | //config:config SOFTLIMIT | 56 | //config:config SOFTLIMIT |
| 57 | //config: bool "softlimit (4.5 kb)" | 57 | //config: bool "softlimit (4.7 kb)" |
| 58 | //config: default y | 58 | //config: default y |
| 59 | //config: help | 59 | //config: help |
| 60 | //config: Sets soft resource limits as specified by options | 60 | //config: Sets soft resource limits as specified by options |
diff --git a/runit/runsv.c b/runit/runsv.c index 6ad6bf46e..20a445319 100644 --- a/runit/runsv.c +++ b/runit/runsv.c | |||
| @@ -28,7 +28,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
| 28 | /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ | 28 | /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ |
| 29 | 29 | ||
| 30 | //config:config RUNSV | 30 | //config:config RUNSV |
| 31 | //config: bool "runsv (7.8 kb)" | 31 | //config: bool "runsv (8.2 kb)" |
| 32 | //config: default y | 32 | //config: default y |
| 33 | //config: help | 33 | //config: help |
| 34 | //config: runsv starts and monitors a service and optionally an appendant log | 34 | //config: runsv starts and monitors a service and optionally an appendant log |
diff --git a/runit/runsvdir.c b/runit/runsvdir.c index 55dd47e0d..d6629dedd 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c | |||
| @@ -28,7 +28,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
| 28 | /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ | 28 | /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ |
| 29 | 29 | ||
| 30 | //config:config RUNSVDIR | 30 | //config:config RUNSVDIR |
| 31 | //config: bool "runsvdir (6.3 kb)" | 31 | //config: bool "runsvdir (6.6 kb)" |
| 32 | //config: default y | 32 | //config: default y |
| 33 | //config: help | 33 | //config: help |
| 34 | //config: runsvdir starts a runsv process for each subdirectory, or symlink to | 34 | //config: runsvdir starts a runsv process for each subdirectory, or symlink to |
diff --git a/runit/sv.c b/runit/sv.c index 5c249ff95..1eca1e854 100644 --- a/runit/sv.c +++ b/runit/sv.c | |||
| @@ -154,7 +154,7 @@ Exit Codes | |||
| 154 | /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ | 154 | /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ |
| 155 | 155 | ||
| 156 | //config:config SV | 156 | //config:config SV |
| 157 | //config: bool "sv (8.5 kb)" | 157 | //config: bool "sv (8.7 kb)" |
| 158 | //config: default y | 158 | //config: default y |
| 159 | //config: help | 159 | //config: help |
| 160 | //config: sv reports the current status and controls the state of services | 160 | //config: sv reports the current status and controls the state of services |
| @@ -169,14 +169,14 @@ Exit Codes | |||
| 169 | //config: Defaults to "/var/service" | 169 | //config: Defaults to "/var/service" |
| 170 | //config: | 170 | //config: |
| 171 | //config:config SVC | 171 | //config:config SVC |
| 172 | //config: bool "svc (8.4 kb)" | 172 | //config: bool "svc (8.7 kb)" |
| 173 | //config: default y | 173 | //config: default y |
| 174 | //config: help | 174 | //config: help |
| 175 | //config: svc controls the state of services monitored by the runsv supervisor. | 175 | //config: svc controls the state of services monitored by the runsv supervisor. |
| 176 | //config: It is compatible with daemontools command with the same name. | 176 | //config: It is compatible with daemontools command with the same name. |
| 177 | //config: | 177 | //config: |
| 178 | //config:config SVOK | 178 | //config:config SVOK |
| 179 | //config: bool "svok (1.5 kb)" | 179 | //config: bool "svok (1.8 kb)" |
| 180 | //config: default y | 180 | //config: default y |
| 181 | //config: help | 181 | //config: help |
| 182 | //config: svok checks whether runsv supervisor is running. | 182 | //config: svok checks whether runsv supervisor is running. |
diff --git a/selinux/setfiles.c b/selinux/setfiles.c index a617b95d8..70e68a666 100644 --- a/selinux/setfiles.c +++ b/selinux/setfiles.c | |||
| @@ -687,7 +687,7 @@ int setfiles_main(int argc UNUSED_PARAM, char **argv) | |||
| 687 | bb_simple_perror_msg_and_die(argv[0]); | 687 | bb_simple_perror_msg_and_die(argv[0]); |
| 688 | } | 688 | } |
| 689 | if (nerr) | 689 | if (nerr) |
| 690 | exit(EXIT_FAILURE); | 690 | exit_FAILURE(); |
| 691 | argv++; | 691 | argv++; |
| 692 | } | 692 | } |
| 693 | 693 | ||
diff --git a/shell/ash.c b/shell/ash.c index f3eb98d85..4d4137800 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | //config: depends on !NOMMU | 35 | //config: depends on !NOMMU |
| 36 | //config: | 36 | //config: |
| 37 | //config:config ASH | 37 | //config:config ASH |
| 38 | //config: bool "ash (78 kb)" | 38 | //config: bool "ash (80 kb)" |
| 39 | //config: default y | 39 | //config: default y |
| 40 | //config: depends on !NOMMU | 40 | //config: depends on !NOMMU |
| 41 | //config: select SHELL_ASH | 41 | //config: select SHELL_ASH |
| @@ -149,11 +149,23 @@ | |||
| 149 | //config: default y | 149 | //config: default y |
| 150 | //config: depends on SHELL_ASH | 150 | //config: depends on SHELL_ASH |
| 151 | //config: | 151 | //config: |
| 152 | //config:config ASH_SLEEP | 152 | // |
| 153 | //config: bool "sleep builtin" | 153 | ////config:config ASH_SLEEP |
| 154 | //config: default y | 154 | ////config: bool "sleep builtin" |
| 155 | //config: depends on SHELL_ASH | 155 | ////config: default y |
| 156 | //config: | 156 | ////config: depends on SHELL_ASH |
| 157 | ////config: | ||
| 158 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 159 | //Disabled for now. Has a few annoying problems: | ||
| 160 | // * sleepcmd() -> sleep_main(), the parsing of bad arguments exits the shell. | ||
| 161 | // * sleep_for_duration() in sleep_main() has to be interruptible for | ||
| 162 | // ^C traps to work, which may be a problem for other users | ||
| 163 | // of sleep_for_duration(). | ||
| 164 | // * BUT, if sleep_for_duration() is interruptible, then SIGCHLD interrupts it | ||
| 165 | // as well (try "/bin/sleep 1 & sleep 10"). | ||
| 166 | // * sleep_main() must not allocate anything as ^C in ash longjmp's. | ||
| 167 | // (currently, allocations are only on error paths, in message printing). | ||
| 168 | // | ||
| 157 | //config:config ASH_HELP | 169 | //config:config ASH_HELP |
| 158 | //config: bool "help builtin" | 170 | //config: bool "help builtin" |
| 159 | //config: default y | 171 | //config: default y |
| @@ -599,7 +611,12 @@ struct globals_misc { | |||
| 599 | 611 | ||
| 600 | struct jmploc *exception_handler; | 612 | struct jmploc *exception_handler; |
| 601 | 613 | ||
| 602 | volatile int suppress_int; /* counter */ | 614 | /*volatile*/ int suppress_int; /* counter */ |
| 615 | /* ^^^^^^^ removed "volatile" since on x86, gcc turns suppress_int++ | ||
| 616 | * into ridiculous 3-insn sequence otherwise. | ||
| 617 | * We don't change suppress_int asyncronously (in a signal handler), | ||
| 618 | * but we do read it async. | ||
| 619 | */ | ||
| 603 | volatile /*sig_atomic_t*/ smallint pending_int; /* 1 = got SIGINT */ | 620 | volatile /*sig_atomic_t*/ smallint pending_int; /* 1 = got SIGINT */ |
| 604 | #if !ENABLE_PLATFORM_MINGW32 | 621 | #if !ENABLE_PLATFORM_MINGW32 |
| 605 | volatile /*sig_atomic_t*/ smallint got_sigchld; /* 1 = got SIGCHLD */ | 622 | volatile /*sig_atomic_t*/ smallint got_sigchld; /* 1 = got SIGCHLD */ |
| @@ -954,7 +971,8 @@ int_on(void) | |||
| 954 | { | 971 | { |
| 955 | barrier(); | 972 | barrier(); |
| 956 | if (--suppress_int == 0 && pending_int) | 973 | if (--suppress_int == 0 && pending_int) |
| 957 | raise_interrupt(); | 974 | raise_interrupt(); /* does not return */ |
| 975 | barrier(); | ||
| 958 | } | 976 | } |
| 959 | #if DEBUG_INTONOFF | 977 | #if DEBUG_INTONOFF |
| 960 | # define INT_ON do { \ | 978 | # define INT_ON do { \ |
| @@ -970,7 +988,8 @@ force_int_on(void) | |||
| 970 | barrier(); | 988 | barrier(); |
| 971 | suppress_int = 0; | 989 | suppress_int = 0; |
| 972 | if (pending_int) | 990 | if (pending_int) |
| 973 | raise_interrupt(); | 991 | raise_interrupt(); /* does not return */ |
| 992 | barrier(); | ||
| 974 | } | 993 | } |
| 975 | #define FORCE_INT_ON force_int_on() | 994 | #define FORCE_INT_ON force_int_on() |
| 976 | 995 | ||
| @@ -980,7 +999,8 @@ force_int_on(void) | |||
| 980 | barrier(); \ | 999 | barrier(); \ |
| 981 | suppress_int = (v); \ | 1000 | suppress_int = (v); \ |
| 982 | if (suppress_int == 0 && pending_int) \ | 1001 | if (suppress_int == 0 && pending_int) \ |
| 983 | raise_interrupt(); \ | 1002 | raise_interrupt(); /* does not return */ \ |
| 1003 | barrier(); \ | ||
| 984 | } while (0) | 1004 | } while (0) |
| 985 | 1005 | ||
| 986 | 1006 | ||
| @@ -2547,30 +2567,6 @@ getoptsreset(const char *value) | |||
| 2547 | #endif | 2567 | #endif |
| 2548 | 2568 | ||
| 2549 | /* | 2569 | /* |
| 2550 | * Compares two strings up to the first = or '\0'. The first | ||
| 2551 | * string must be terminated by '='; the second may be terminated by | ||
| 2552 | * either '=' or '\0'. | ||
| 2553 | */ | ||
| 2554 | static int | ||
| 2555 | varcmp(const char *p, const char *q) | ||
| 2556 | { | ||
| 2557 | int c, d; | ||
| 2558 | |||
| 2559 | while ((c = *p) == (d = *q)) { | ||
| 2560 | if (c == '\0' || c == '=') | ||
| 2561 | goto out; | ||
| 2562 | p++; | ||
| 2563 | q++; | ||
| 2564 | } | ||
| 2565 | if (c == '=') | ||
| 2566 | c = '\0'; | ||
| 2567 | if (d == '=') | ||
| 2568 | d = '\0'; | ||
| 2569 | out: | ||
| 2570 | return c - d; | ||
| 2571 | } | ||
| 2572 | |||
| 2573 | /* | ||
| 2574 | * Find the appropriate entry in the hash table from the name. | 2570 | * Find the appropriate entry in the hash table from the name. |
| 2575 | */ | 2571 | */ |
| 2576 | static struct var ** | 2572 | static struct var ** |
| @@ -2881,7 +2877,7 @@ setvar(const char *name, const char *val, int flags) | |||
| 2881 | p = mempcpy(nameeq, name, namelen); | 2877 | p = mempcpy(nameeq, name, namelen); |
| 2882 | if (val) { | 2878 | if (val) { |
| 2883 | *p++ = '='; | 2879 | *p++ = '='; |
| 2884 | memcpy(p, val, vallen); | 2880 | strcpy(p, val); |
| 2885 | } | 2881 | } |
| 2886 | vp = setvareq(nameeq, flags | VNOSAVE); | 2882 | vp = setvareq(nameeq, flags | VNOSAVE); |
| 2887 | INT_ON; | 2883 | INT_ON; |
| @@ -10485,7 +10481,7 @@ evaltree(union node *n, int flags) | |||
| 10485 | } | 10481 | } |
| 10486 | if (flags & EV_EXIT) { | 10482 | if (flags & EV_EXIT) { |
| 10487 | exexit: | 10483 | exexit: |
| 10488 | raise_exception(EXEND); | 10484 | raise_exception(EXEND); /* does not return */ |
| 10489 | } | 10485 | } |
| 10490 | 10486 | ||
| 10491 | popstackmark(&smark); | 10487 | popstackmark(&smark); |
| @@ -11554,7 +11550,7 @@ evalcommand(union node *cmd, int flags) | |||
| 11554 | 11550 | ||
| 11555 | /* We have a redirection error. */ | 11551 | /* We have a redirection error. */ |
| 11556 | if (spclbltin > 0) | 11552 | if (spclbltin > 0) |
| 11557 | raise_exception(EXERROR); | 11553 | raise_exception(EXERROR); /* does not return */ |
| 11558 | 11554 | ||
| 11559 | goto out; | 11555 | goto out; |
| 11560 | } | 11556 | } |
| @@ -13347,18 +13343,19 @@ simplecmd(void) | |||
| 13347 | if (args && app == &args->narg.next | 13343 | if (args && app == &args->narg.next |
| 13348 | && !vars && !redir | 13344 | && !vars && !redir |
| 13349 | ) { | 13345 | ) { |
| 13350 | struct builtincmd *bcmd; | 13346 | // struct builtincmd *bcmd; |
| 13351 | const char *name; | 13347 | // const char *name; |
| 13352 | 13348 | ||
| 13353 | /* We have a function */ | 13349 | /* We have a function */ |
| 13354 | if (IF_BASH_FUNCTION(!function_flag &&) readtoken() != TRP) | 13350 | if (IF_BASH_FUNCTION(!function_flag &&) readtoken() != TRP) |
| 13355 | raise_error_unexpected_syntax(TRP); | 13351 | raise_error_unexpected_syntax(TRP); |
| 13356 | name = n->narg.text; | 13352 | //bash allows functions named "123", "..", "return"! |
| 13357 | if (!goodname(name) | 13353 | // name = n->narg.text; |
| 13358 | || ((bcmd = find_builtin(name)) && IS_BUILTIN_SPECIAL(bcmd)) | 13354 | // if (!goodname(name) |
| 13359 | ) { | 13355 | // || ((bcmd = find_builtin(name)) && IS_BUILTIN_SPECIAL(bcmd)) |
| 13360 | raise_error_syntax("bad function name"); | 13356 | // ) { |
| 13361 | } | 13357 | // raise_error_syntax("bad function name"); |
| 13358 | // } | ||
| 13362 | n->type = NDEFUN; | 13359 | n->type = NDEFUN; |
| 13363 | checkkwd = CHKNL | CHKKWD | CHKALIAS; | 13360 | checkkwd = CHKNL | CHKKWD | CHKALIAS; |
| 13364 | n->ndefun.text = n->narg.text; | 13361 | n->ndefun.text = n->narg.text; |
| @@ -15964,7 +15961,7 @@ procargs(char **argv) | |||
| 15964 | optlist[i] = 2; | 15961 | optlist[i] = 2; |
| 15965 | if (options(&login_sh)) { | 15962 | if (options(&login_sh)) { |
| 15966 | /* it already printed err message */ | 15963 | /* it already printed err message */ |
| 15967 | raise_exception(EXERROR); | 15964 | raise_exception(EXERROR); /* does not return */ |
| 15968 | } | 15965 | } |
| 15969 | xargv = argptr; | 15966 | xargv = argptr; |
| 15970 | xminusc = minusc; | 15967 | xminusc = minusc; |
diff --git a/shell/ash_test/ash-arith/arith-assign-in-varexp.right b/shell/ash_test/ash-arith/arith-assign-in-varexp.right new file mode 100644 index 000000000..06ac80a64 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-assign-in-varexp.right | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | 20:20 | ||
| 2 | a=b=10 | ||
| 3 | b=10 | ||
diff --git a/shell/ash_test/ash-arith/arith-assign-in-varexp.tests b/shell/ash_test/ash-arith/arith-assign-in-varexp.tests new file mode 100755 index 000000000..920aaa779 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-assign-in-varexp.tests | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | a='b=10' | ||
| 3 | b=3 | ||
| 4 | # The variables should evaluate left-to-right, | ||
| 5 | # thus b is set to 10 _before_ addition | ||
| 6 | echo 20:$((a + b)) | ||
| 7 | echo "a=$a" | ||
| 8 | echo "b=$b" | ||
diff --git a/shell/ash_test/ash-arith/arith-assign-in-varexp1.right b/shell/ash_test/ash-arith/arith-assign-in-varexp1.right new file mode 100644 index 000000000..1feb307d2 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-assign-in-varexp1.right | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | 7:7 | ||
| 2 | x=3 | ||
diff --git a/shell/ash_test/ash-arith/arith-assign-in-varexp1.tests b/shell/ash_test/ash-arith/arith-assign-in-varexp1.tests new file mode 100755 index 000000000..fc8ac9d97 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-assign-in-varexp1.tests | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | a='x=1' | ||
| 3 | b='x=2' | ||
| 4 | c='x=3' | ||
| 5 | # The variables should evaluate immediately when they encountered, | ||
| 6 | # not when they go into an operation. Here, order of evaluation | ||
| 7 | # of names to numbers should be a,b,c - not b,c,a: | ||
| 8 | echo 7:$((a+b*c)) | ||
| 9 | echo "x=$x" | ||
diff --git a/shell/ash_test/ash-arith/arith-bignum1.right b/shell/ash_test/ash-arith/arith-bignum1.right new file mode 100644 index 000000000..42a8016ec --- /dev/null +++ b/shell/ash_test/ash-arith/arith-bignum1.right | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | 18 digits: 999999999999999999 | ||
| 2 | 19 digits: -8446744073709551617 | ||
| 3 | 20 digits: 7766279631452241919 | ||
| 4 | 18 digits- -999999999999999999 | ||
| 5 | 19 digits- 8446744073709551617 | ||
| 6 | 20 digits- -7766279631452241919 | ||
| 7 | Hex base#: | ||
| 8 | 16 digits: 9876543210abcedf | ||
| 9 | 17 digits: 876543210abcedfc | ||
| 10 | 18 digits: 76543210abcedfcc | ||
| 11 | 16 digits: 6789abcdef543121 | ||
| 12 | 17 digits: 789abcdef5431204 | ||
| 13 | 18 digits: 89abcdef54312034 | ||
diff --git a/shell/ash_test/ash-arith/arith-bignum1.tests b/shell/ash_test/ash-arith/arith-bignum1.tests new file mode 100755 index 000000000..ef8f928bc --- /dev/null +++ b/shell/ash_test/ash-arith/arith-bignum1.tests | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | # If the number does not fit in 64 bits, bash uses truncated 64-bit value | ||
| 3 | # (essentially, it does not check for overflow in "n = n * base + digit" | ||
| 4 | # calculation). | ||
| 5 | echo 18 digits: $((999999999999999999)) | ||
| 6 | echo 19 digits: $((9999999999999999999)) | ||
| 7 | echo 20 digits: $((99999999999999999999)) | ||
| 8 | echo 18 digits- $((-999999999999999999)) | ||
| 9 | echo 19 digits- $((-9999999999999999999)) | ||
| 10 | echo 20 digits- $((-99999999999999999999)) | ||
| 11 | echo "Hex base#:" | ||
| 12 | printf '16 digits: %016x\n' $((16#9876543210abcedf)) | ||
| 13 | printf '17 digits: %016x\n' $((16#9876543210abcedfc)) | ||
| 14 | printf '18 digits: %016x\n' $((16#9876543210abcedfcc)) | ||
| 15 | printf '16 digits: %016x\n' $((-16#9876543210abcedf)) | ||
| 16 | printf '17 digits: %016x\n' $((-16#9876543210abcedfc)) | ||
| 17 | printf '18 digits: %016x\n' $((-16#9876543210abcedfcc)) | ||
diff --git a/shell/ash_test/ash-arith/arith-comma1.right b/shell/ash_test/ash-arith/arith-comma1.right new file mode 100644 index 000000000..be1264cc0 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-comma1.right | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | 10:10 | ||
| 2 | a=b=10 | ||
| 3 | b=10 | ||
diff --git a/shell/ash_test/ash-arith/arith-comma1.tests b/shell/ash_test/ash-arith/arith-comma1.tests new file mode 100755 index 000000000..f86304303 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-comma1.tests | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | a='b=10' | ||
| 3 | b=3 | ||
| 4 | echo 10:$((a,b)) | ||
| 5 | echo "a=$a" | ||
| 6 | echo "b=$b" | ||
diff --git a/shell/ash_test/ash-arith/arith-precedence1.right b/shell/ash_test/ash-arith/arith-precedence1.right new file mode 100644 index 000000000..3f9320a13 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-precedence1.right | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | 4:4 | ||
| 2 | 4:4 | ||
| 3 | 4:4 | ||
| 4 | 4:4 | ||
diff --git a/shell/ash_test/ash-arith/arith-precedence1.tests b/shell/ash_test/ash-arith/arith-precedence1.tests new file mode 100755 index 000000000..bfef05292 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-precedence1.tests | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | # bash documentation says that precedence order is: | ||
| 3 | # ... | ||
| 4 | # expr ? expr1 : expr2 | ||
| 5 | # = *= /= %= += -= <<= >>= &= ^= |= | ||
| 6 | # exprA , exprB | ||
| 7 | # but in practice, the rules for expr1 and expr2 are different: | ||
| 8 | # assignments and commas in expr1 have higher precedence than :?, | ||
| 9 | # but in expr2 they haven't: | ||
| 10 | # "v ? 1,2 : 3,4" is parsed as "(v ? (1,2) : 3),4" | ||
| 11 | # "v ? a=2 : b=4" is parsed as "(v ? (a=1) : b)=4" (thus, this is a syntax error) | ||
| 12 | echo 4:$((0 ? 1,2 : 3,4)) | ||
| 13 | echo 4:$((1 ? 1,2 : 3,4)) | ||
| 14 | echo 4:"$((0 ? 1,2 : 3,4))" | ||
| 15 | echo 4:"$((1 ? 1,2 : 3,4))" | ||
diff --git a/shell/ash_test/ash-arith/arith-ternary-assign.right b/shell/ash_test/ash-arith/arith-ternary-assign.right new file mode 100644 index 000000000..6644d86bf --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary-assign.right | |||
| @@ -0,0 +1 @@ | |||
| 42:42 | |||
diff --git a/shell/ash_test/ash-arith/arith-ternary-assign.tests b/shell/ash_test/ash-arith/arith-ternary-assign.tests new file mode 100755 index 000000000..fa18fe7b9 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary-assign.tests | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | a='@' | ||
| 3 | echo 42:$((a=1?42:3,a)) | ||
diff --git a/shell/ash_test/ash-arith/arith-ternary-comma.right b/shell/ash_test/ash-arith/arith-ternary-comma.right new file mode 100644 index 000000000..6644d86bf --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary-comma.right | |||
| @@ -0,0 +1 @@ | |||
| 42:42 | |||
diff --git a/shell/ash_test/ash-arith/arith-ternary-comma.tests b/shell/ash_test/ash-arith/arith-ternary-comma.tests new file mode 100755 index 000000000..5e05b58c4 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary-comma.tests | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | x='@' | ||
| 3 | echo 42:$((1?4:x,20*2+2)) | ||
diff --git a/shell/ash_test/ash-arith/arith-ternary-preincr.right b/shell/ash_test/ash-arith/arith-ternary-preincr.right new file mode 100644 index 000000000..6644d86bf --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary-preincr.right | |||
| @@ -0,0 +1 @@ | |||
| 42:42 | |||
diff --git a/shell/ash_test/ash-arith/arith-ternary-preincr.tests b/shell/ash_test/ash-arith/arith-ternary-preincr.tests new file mode 100755 index 000000000..3985c7079 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary-preincr.tests | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | x='@' | ||
| 3 | echo 42:$((1?42:++x)) | ||
diff --git a/shell/ash_test/ash-arith/arith-ternary1.right b/shell/ash_test/ash-arith/arith-ternary1.right new file mode 100644 index 000000000..6b751d7b8 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary1.right | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | 42:42 | ||
| 2 | a=0 | ||
diff --git a/shell/ash_test/ash-arith/arith-ternary1.tests b/shell/ash_test/ash-arith/arith-ternary1.tests new file mode 100755 index 000000000..3532ce54d --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary1.tests | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | a=0 | ||
| 3 | # The not-taken branch should not evaluate | ||
| 4 | echo 42:$((1 ? 42 : (a+=2))) | ||
| 5 | echo "a=$a" | ||
diff --git a/shell/ash_test/ash-arith/arith-ternary2.right b/shell/ash_test/ash-arith/arith-ternary2.right new file mode 100644 index 000000000..a549b1b5c --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary2.right | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | 6:6 | ||
| 2 | a=b=+err+ | ||
| 3 | b=6 | ||
diff --git a/shell/ash_test/ash-arith/arith-ternary2.tests b/shell/ash_test/ash-arith/arith-ternary2.tests new file mode 100755 index 000000000..cb3163932 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary2.tests | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | a='b=+err+' | ||
| 3 | b=5 | ||
| 4 | # The not-taken branch should not parse variables | ||
| 5 | echo 6:$((0 ? a : ++b)) | ||
| 6 | echo "a=$a" | ||
| 7 | echo "b=$b" | ||
diff --git a/shell/ash_test/ash-arith/arith-ternary3.right b/shell/ash_test/ash-arith/arith-ternary3.right new file mode 100644 index 000000000..6644d86bf --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary3.right | |||
| @@ -0,0 +1 @@ | |||
| 42:42 | |||
diff --git a/shell/ash_test/ash-arith/arith-ternary3.tests b/shell/ash_test/ash-arith/arith-ternary3.tests new file mode 100755 index 000000000..0bf9f3002 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary3.tests | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | # "EXPR ?..." should check _evaluated_ EXPR, | ||
| 3 | # not its last value | ||
| 4 | echo 42:$((1 < 1 ? -1 : 1 > 1 ? 1 : 42)) | ||
diff --git a/shell/ash_test/ash-arith/arith-ternary_nested.right b/shell/ash_test/ash-arith/arith-ternary_nested.right new file mode 100644 index 000000000..aa54bd925 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary_nested.right | |||
| @@ -0,0 +1 @@ | |||
| 5:5 | |||
diff --git a/shell/ash_test/ash-arith/arith-ternary_nested.tests b/shell/ash_test/ash-arith/arith-ternary_nested.tests new file mode 100755 index 000000000..eefc8e7ce --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary_nested.tests | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | echo 5:$((1?2?3?4?5:6:7:8:9)) | ||
diff --git a/shell/ash_test/ash-arith/arith-ternary_nested1.right b/shell/ash_test/ash-arith/arith-ternary_nested1.right new file mode 100644 index 000000000..d80319695 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary_nested1.right | |||
| @@ -0,0 +1 @@ | |||
| 3:3 | |||
diff --git a/shell/ash_test/ash-arith/arith-ternary_nested1.tests b/shell/ash_test/ash-arith/arith-ternary_nested1.tests new file mode 100755 index 000000000..469584bea --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary_nested1.tests | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | echo 3:$((1?(2?(3):4):5)) | ||
diff --git a/shell/ash_test/ash-arith/arith-ternary_nested2.right b/shell/ash_test/ash-arith/arith-ternary_nested2.right new file mode 100644 index 000000000..d80319695 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary_nested2.right | |||
| @@ -0,0 +1 @@ | |||
| 3:3 | |||
diff --git a/shell/ash_test/ash-arith/arith-ternary_nested2.tests b/shell/ash_test/ash-arith/arith-ternary_nested2.tests new file mode 100755 index 000000000..e8b8a9e1a --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary_nested2.tests | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | echo 3:$((0?1:2?3:4?5:6?7:8)) | ||
diff --git a/shell/ash_test/ash-arith/arith-ternary_nested3.right b/shell/ash_test/ash-arith/arith-ternary_nested3.right new file mode 100644 index 000000000..1a34fde65 --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary_nested3.right | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | 42:42 | ||
| 2 | a=2:2 | ||
diff --git a/shell/ash_test/ash-arith/arith-ternary_nested3.tests b/shell/ash_test/ash-arith/arith-ternary_nested3.tests new file mode 100755 index 000000000..6f753867e --- /dev/null +++ b/shell/ash_test/ash-arith/arith-ternary_nested3.tests | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | x='@' | ||
| 3 | a=2 | ||
| 4 | # After processing nested ?:, outermost ?: should still remember to NOT evaluate a*=2 | ||
| 5 | echo 42:$((1?0?41:42:(a*=2))) | ||
| 6 | echo "a=2:$a" | ||
diff --git a/shell/ash_test/ash-arith/arith.right b/shell/ash_test/ash-arith/arith.right index 61fcab55e..b2c3f56d8 100644 --- a/shell/ash_test/ash-arith/arith.right +++ b/shell/ash_test/ash-arith/arith.right | |||
| @@ -80,8 +80,9 @@ other bases | |||
| 80 | 62 62 | 80 | 62 62 |
| 81 | 63 63 | 81 | 63 63 |
| 82 | missing number after base | 82 | missing number after base |
| 83 | 0 0 | 83 | ./arith.tests: line 161: arithmetic syntax error |
| 84 | ./arith.tests: line 162: arithmetic syntax error | 84 | ./arith.tests: line 162: arithmetic syntax error |
| 85 | ./arith.tests: line 163: arithmetic syntax error | ||
| 85 | ./arith.tests: line 164: divide by zero | 86 | ./arith.tests: line 164: divide by zero |
| 86 | ./arith.tests: let: line 165: arithmetic syntax error | 87 | ./arith.tests: let: line 165: arithmetic syntax error |
| 87 | ./arith.tests: line 166: arithmetic syntax error | 88 | ./arith.tests: line 166: arithmetic syntax error |
| @@ -92,7 +93,7 @@ ghi | |||
| 92 | ./arith.tests: line 190: arithmetic syntax error | 93 | ./arith.tests: line 190: arithmetic syntax error |
| 93 | 16 16 | 94 | 16 16 |
| 94 | ./arith.tests: line 195: arithmetic syntax error | 95 | ./arith.tests: line 195: arithmetic syntax error |
| 95 | ./arith.tests: line 196: malformed ?: operator | 96 | ./arith.tests: line 196: arithmetic syntax error |
| 96 | ./arith.tests: line 197: arithmetic syntax error | 97 | ./arith.tests: line 197: arithmetic syntax error |
| 97 | 9 9 | 98 | 9 9 |
| 98 | ./arith.tests: line 204: arithmetic syntax error | 99 | ./arith.tests: line 204: arithmetic syntax error |
diff --git a/shell/ash_test/ash-arith/arith.tests b/shell/ash_test/ash-arith/arith.tests index b9cb8ba4c..42cd7fdbf 100755 --- a/shell/ash_test/ash-arith/arith.tests +++ b/shell/ash_test/ash-arith/arith.tests | |||
| @@ -155,12 +155,12 @@ echo 63 $(( 64#_ )) | |||
| 155 | #ash# # weird bases (error) | 155 | #ash# # weird bases (error) |
| 156 | #ash# echo $(( 3425#56 )) | 156 | #ash# echo $(( 3425#56 )) |
| 157 | 157 | ||
| 158 | echo missing number after base | ||
| 159 | echo 0 $(( 2# )) | ||
| 160 | 158 | ||
| 161 | # these should generate errors | 159 | # these should generate errors |
| 160 | echo missing number after base | ||
| 161 | ( echo $(( 2# )) ) | ||
| 162 | ( echo $(( 7 = 43 )) ) | 162 | ( echo $(( 7 = 43 )) ) |
| 163 | #ash# echo $(( 2#44 )) | 163 | ( echo $(( 2#44 )) ) |
| 164 | ( echo $(( 44 / 0 )) ) | 164 | ( echo $(( 44 / 0 )) ) |
| 165 | ( let 'jv += $iv' ) | 165 | ( let 'jv += $iv' ) |
| 166 | ( echo $(( jv += \$iv )) ) | 166 | ( echo $(( jv += \$iv )) ) |
diff --git a/shell/ash_test/ash-quoting/space_in_varexp1.right b/shell/ash_test/ash-quoting/space_in_varexp1.right new file mode 100644 index 000000000..a617a91c3 --- /dev/null +++ b/shell/ash_test/ash-quoting/space_in_varexp1.right | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | 1:'b c' | ||
| 2 | 2:'b c' | ||
diff --git a/shell/ash_test/ash-quoting/space_in_varexp1.tests b/shell/ash_test/ash-quoting/space_in_varexp1.tests new file mode 100755 index 000000000..1589587d1 --- /dev/null +++ b/shell/ash_test/ash-quoting/space_in_varexp1.tests | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | a=b | ||
| 2 | a=${a:+$a }c | ||
| 3 | echo "1:'$a'" | ||
| 4 | a=b | ||
| 5 | a="${a:+$a }c" | ||
| 6 | echo "2:'$a'" | ||
diff --git a/shell/ash_test/run-all b/shell/ash_test/run-all index 96703ef12..066327dc0 100755 --- a/shell/ash_test/run-all +++ b/shell/ash_test/run-all | |||
| @@ -47,6 +47,7 @@ do_test() | |||
| 47 | # $1 but with / replaced by # so that it can be used as filename part | 47 | # $1 but with / replaced by # so that it can be used as filename part |
| 48 | noslash=`echo "$1" | sed 's:/:#:g'` | 48 | noslash=`echo "$1" | sed 's:/:#:g'` |
| 49 | ( | 49 | ( |
| 50 | tret=0 | ||
| 50 | cd "$1" || { echo "cannot cd $1!"; exit 1; } | 51 | cd "$1" || { echo "cannot cd $1!"; exit 1; } |
| 51 | for x in run-*; do | 52 | for x in run-*; do |
| 52 | test -f "$x" || continue | 53 | test -f "$x" || continue |
| @@ -69,13 +70,25 @@ do_test() | |||
| 69 | test -f "$name.right" || continue | 70 | test -f "$name.right" || continue |
| 70 | # echo Running test: "$x" | 71 | # echo Running test: "$x" |
| 71 | echo -n "$1/$x:" | 72 | echo -n "$1/$x:" |
| 72 | { | 73 | ( |
| 73 | "$THIS_SH" "./$x" 2>&1 | \ | 74 | "$THIS_SH" "./$x" 2>&1 | \ |
| 74 | grep -va "^ash: using fallback suid method$" >"$name.xx" | 75 | grep -va "^ash: using fallback suid method$" >"$name.xx" |
| 76 | r=$? | ||
| 77 | # filter C library differences | ||
| 78 | sed -i \ | ||
| 79 | -e "/: invalid option /s:'::g" \ | ||
| 80 | "$name.xx" | ||
| 81 | test $r -eq 77 && rm -f "$TOPDIR/$noslash-$x.fail" && exit 77 | ||
| 75 | diff -u "$name.xx" "$name.right" >"$TOPDIR/$noslash-$x.fail" \ | 82 | diff -u "$name.xx" "$name.right" >"$TOPDIR/$noslash-$x.fail" \ |
| 76 | && rm -f "$name.xx" "$TOPDIR/$noslash-$x.fail" | 83 | && rm -f "$name.xx" "$TOPDIR/$noslash-$x.fail" |
| 77 | } && echo " ok" || echo " fail" | 84 | ) |
| 85 | case $? in | ||
| 86 | 0) echo " ok";; | ||
| 87 | 77) echo " skip (feature disabled)";; | ||
| 88 | *) echo " fail ($?)"; tret=1;; | ||
| 89 | esac | ||
| 78 | done | 90 | done |
| 91 | exit $tret | ||
| 79 | ) | 92 | ) |
| 80 | } | 93 | } |
| 81 | 94 | ||
| @@ -103,4 +116,4 @@ else | |||
| 103 | done | 116 | done |
| 104 | fi | 117 | fi |
| 105 | 118 | ||
| 106 | exit ${ret} | 119 | exit $ret |
diff --git a/shell/cttyhack.c b/shell/cttyhack.c index b9ee59bd0..62dfb2bc2 100644 --- a/shell/cttyhack.c +++ b/shell/cttyhack.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Licensed under GPLv2, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 6 | */ | 6 | */ |
| 7 | //config:config CTTYHACK | 7 | //config:config CTTYHACK |
| 8 | //config: bool "cttyhack (2.4 kb)" | 8 | //config: bool "cttyhack (2.7 kb)" |
| 9 | //config: default y | 9 | //config: default y |
| 10 | //config: help | 10 | //config: help |
| 11 | //config: One common problem reported on the mailing list is the "can't | 11 | //config: One common problem reported on the mailing list is the "can't |
diff --git a/shell/hush.c b/shell/hush.c index cdaa67a3b..8e632e0af 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
| @@ -91,7 +91,7 @@ | |||
| 91 | * in word = GLOB, quoting should be significant on char-by-char basis: a*cd"*" | 91 | * in word = GLOB, quoting should be significant on char-by-char basis: a*cd"*" |
| 92 | */ | 92 | */ |
| 93 | //config:config HUSH | 93 | //config:config HUSH |
| 94 | //config: bool "hush (68 kb)" | 94 | //config: bool "hush (70 kb)" |
| 95 | //config: default y | 95 | //config: default y |
| 96 | //config: select SHELL_HUSH | 96 | //config: select SHELL_HUSH |
| 97 | //config: help | 97 | //config: help |
| @@ -2255,14 +2255,14 @@ static const char *get_cwd(int force) | |||
| 2255 | /* | 2255 | /* |
| 2256 | * Shell and environment variable support | 2256 | * Shell and environment variable support |
| 2257 | */ | 2257 | */ |
| 2258 | static struct variable **get_ptr_to_local_var(const char *name, unsigned len) | 2258 | static struct variable **get_ptr_to_local_var(const char *name) |
| 2259 | { | 2259 | { |
| 2260 | struct variable **pp; | 2260 | struct variable **pp; |
| 2261 | struct variable *cur; | 2261 | struct variable *cur; |
| 2262 | 2262 | ||
| 2263 | pp = &G.top_var; | 2263 | pp = &G.top_var; |
| 2264 | while ((cur = *pp) != NULL) { | 2264 | while ((cur = *pp) != NULL) { |
| 2265 | if (strncmp(cur->varstr, name, len) == 0 && cur->varstr[len] == '=') | 2265 | if (varcmp(cur->varstr, name) == 0) |
| 2266 | return pp; | 2266 | return pp; |
| 2267 | pp = &cur->next; | 2267 | pp = &cur->next; |
| 2268 | } | 2268 | } |
| @@ -2272,21 +2272,20 @@ static struct variable **get_ptr_to_local_var(const char *name, unsigned len) | |||
| 2272 | static const char* FAST_FUNC get_local_var_value(const char *name) | 2272 | static const char* FAST_FUNC get_local_var_value(const char *name) |
| 2273 | { | 2273 | { |
| 2274 | struct variable **vpp; | 2274 | struct variable **vpp; |
| 2275 | unsigned len = strlen(name); | ||
| 2276 | 2275 | ||
| 2277 | if (G.expanded_assignments) { | 2276 | if (G.expanded_assignments) { |
| 2278 | char **cpp = G.expanded_assignments; | 2277 | char **cpp = G.expanded_assignments; |
| 2279 | while (*cpp) { | 2278 | while (*cpp) { |
| 2280 | char *cp = *cpp; | 2279 | char *cp = *cpp; |
| 2281 | if (strncmp(cp, name, len) == 0 && cp[len] == '=') | 2280 | if (varcmp(cp, name) == 0) |
| 2282 | return cp + len + 1; | 2281 | return strchr(cp, '=') + 1; |
| 2283 | cpp++; | 2282 | cpp++; |
| 2284 | } | 2283 | } |
| 2285 | } | 2284 | } |
| 2286 | 2285 | ||
| 2287 | vpp = get_ptr_to_local_var(name, len); | 2286 | vpp = get_ptr_to_local_var(name); |
| 2288 | if (vpp) | 2287 | if (vpp) |
| 2289 | return (*vpp)->varstr + len + 1; | 2288 | return strchr((*vpp)->varstr, '=') + 1; |
| 2290 | 2289 | ||
| 2291 | if (strcmp(name, "PPID") == 0) | 2290 | if (strcmp(name, "PPID") == 0) |
| 2292 | return utoa(G.root_ppid); | 2291 | return utoa(G.root_ppid); |
| @@ -2319,13 +2318,11 @@ static const char* FAST_FUNC get_local_var_value(const char *name) | |||
| 2319 | } | 2318 | } |
| 2320 | 2319 | ||
| 2321 | #if ENABLE_HUSH_GETOPTS | 2320 | #if ENABLE_HUSH_GETOPTS |
| 2322 | static void handle_changed_special_names(const char *name, unsigned name_len) | 2321 | static void handle_changed_special_names(const char *name) |
| 2323 | { | 2322 | { |
| 2324 | if (name_len == 6) { | 2323 | if (varcmp(name, "OPTIND") == 0) { |
| 2325 | if (strncmp(name, "OPTIND", 6) == 0) { | 2324 | G.getopt_count = 0; |
| 2326 | G.getopt_count = 0; | 2325 | return; |
| 2327 | return; | ||
| 2328 | } | ||
| 2329 | } | 2326 | } |
| 2330 | } | 2327 | } |
| 2331 | #else | 2328 | #else |
| @@ -2476,7 +2473,7 @@ static int set_local_var(char *str, unsigned flags) | |||
| 2476 | } | 2473 | } |
| 2477 | free(free_me); | 2474 | free(free_me); |
| 2478 | 2475 | ||
| 2479 | handle_changed_special_names(cur->varstr, name_len - 1); | 2476 | handle_changed_special_names(cur->varstr); |
| 2480 | 2477 | ||
| 2481 | return retval; | 2478 | return retval; |
| 2482 | } | 2479 | } |
| @@ -2499,16 +2496,14 @@ static void set_pwd_var(unsigned flag) | |||
| 2499 | } | 2496 | } |
| 2500 | 2497 | ||
| 2501 | #if ENABLE_HUSH_UNSET || ENABLE_HUSH_GETOPTS | 2498 | #if ENABLE_HUSH_UNSET || ENABLE_HUSH_GETOPTS |
| 2502 | static int unset_local_var_len(const char *name, int name_len) | 2499 | static int unset_local_var(const char *name) |
| 2503 | { | 2500 | { |
| 2504 | struct variable *cur; | 2501 | struct variable *cur; |
| 2505 | struct variable **cur_pp; | 2502 | struct variable **cur_pp; |
| 2506 | 2503 | ||
| 2507 | cur_pp = &G.top_var; | 2504 | cur_pp = &G.top_var; |
| 2508 | while ((cur = *cur_pp) != NULL) { | 2505 | while ((cur = *cur_pp) != NULL) { |
| 2509 | if (strncmp(cur->varstr, name, name_len) == 0 | 2506 | if (varcmp(cur->varstr, name) == 0) { |
| 2510 | && cur->varstr[name_len] == '=' | ||
| 2511 | ) { | ||
| 2512 | if (cur->flg_read_only) { | 2507 | if (cur->flg_read_only) { |
| 2513 | bb_error_msg("%s: readonly variable", name); | 2508 | bb_error_msg("%s: readonly variable", name); |
| 2514 | return EXIT_FAILURE; | 2509 | return EXIT_FAILURE; |
| @@ -2527,15 +2522,10 @@ static int unset_local_var_len(const char *name, int name_len) | |||
| 2527 | } | 2522 | } |
| 2528 | 2523 | ||
| 2529 | /* Handle "unset LINENO" et al even if did not find the variable to unset */ | 2524 | /* Handle "unset LINENO" et al even if did not find the variable to unset */ |
| 2530 | handle_changed_special_names(name, name_len); | 2525 | handle_changed_special_names(name); |
| 2531 | 2526 | ||
| 2532 | return EXIT_SUCCESS; | 2527 | return EXIT_SUCCESS; |
| 2533 | } | 2528 | } |
| 2534 | |||
| 2535 | static int unset_local_var(const char *name) | ||
| 2536 | { | ||
| 2537 | return unset_local_var_len(name, strlen(name)); | ||
| 2538 | } | ||
| 2539 | #endif | 2529 | #endif |
| 2540 | 2530 | ||
| 2541 | 2531 | ||
| @@ -2581,7 +2571,7 @@ static void set_vars_and_save_old(char **strings) | |||
| 2581 | eq = strchr(*s, '='); | 2571 | eq = strchr(*s, '='); |
| 2582 | if (HUSH_DEBUG && !eq) | 2572 | if (HUSH_DEBUG && !eq) |
| 2583 | bb_simple_error_msg_and_die("BUG in varexp4"); | 2573 | bb_simple_error_msg_and_die("BUG in varexp4"); |
| 2584 | var_pp = get_ptr_to_local_var(*s, eq - *s); | 2574 | var_pp = get_ptr_to_local_var(*s); |
| 2585 | if (var_pp) { | 2575 | if (var_pp) { |
| 2586 | var_p = *var_pp; | 2576 | var_p = *var_pp; |
| 2587 | if (var_p->flg_read_only) { | 2577 | if (var_p->flg_read_only) { |
| @@ -4316,7 +4306,7 @@ static int done_word(struct parse_context *ctx) | |||
| 4316 | || endofname(command->argv[0])[0] != '\0' | 4306 | || endofname(command->argv[0])[0] != '\0' |
| 4317 | ) { | 4307 | ) { |
| 4318 | /* bash says just "not a valid identifier" */ | 4308 | /* bash says just "not a valid identifier" */ |
| 4319 | syntax_error("bad variable name in for"); | 4309 | syntax_error("bad for loop variable"); |
| 4320 | return 1; | 4310 | return 1; |
| 4321 | } | 4311 | } |
| 4322 | /* Force FOR to have just one word (variable name) */ | 4312 | /* Force FOR to have just one word (variable name) */ |
| @@ -4693,6 +4683,11 @@ static int parse_group(struct parse_context *ctx, | |||
| 4693 | syntax_error_unexpected_ch(ch); | 4683 | syntax_error_unexpected_ch(ch); |
| 4694 | return -1; | 4684 | return -1; |
| 4695 | } | 4685 | } |
| 4686 | //bash allows functions named "123", "..", "return"! | ||
| 4687 | // if (endofname(command->argv[0])[0] != '\0') { | ||
| 4688 | // syntax_error("bad function name"); | ||
| 4689 | // return -1; | ||
| 4690 | // } | ||
| 4696 | nommu_addchr(&ctx->as_string, ch); | 4691 | nommu_addchr(&ctx->as_string, ch); |
| 4697 | command->cmd_type = CMD_FUNCDEF; | 4692 | command->cmd_type = CMD_FUNCDEF; |
| 4698 | goto skip; | 4693 | goto skip; |
| @@ -6398,7 +6393,7 @@ static NOINLINE int encode_then_append_var_plusminus(o_string *output, int n, | |||
| 6398 | if (!dest.o_expflags) { | 6393 | if (!dest.o_expflags) { |
| 6399 | if (ch == EOF) | 6394 | if (ch == EOF) |
| 6400 | break; | 6395 | break; |
| 6401 | if (!dquoted && strchr(G.ifs, ch)) { | 6396 | if (!dquoted && !(output->o_expflags & EXP_FLAG_SINGLEWORD) && strchr(G.ifs, ch)) { |
| 6402 | /* PREFIX${x:d${e}f ...} and we met space: expand "d${e}f" and start new word. | 6397 | /* PREFIX${x:d${e}f ...} and we met space: expand "d${e}f" and start new word. |
| 6403 | * do not assume we are at the start of the word (PREFIX above). | 6398 | * do not assume we are at the start of the word (PREFIX above). |
| 6404 | */ | 6399 | */ |
| @@ -11178,7 +11173,7 @@ static int FAST_FUNC builtin_umask(char **argv) | |||
| 11178 | } | 11173 | } |
| 11179 | #endif | 11174 | #endif |
| 11180 | 11175 | ||
| 11181 | #if ENABLE_HUSH_EXPORT || ENABLE_HUSH_TRAP | 11176 | #if ENABLE_HUSH_EXPORT || ENABLE_HUSH_READONLY || ENABLE_HUSH_SET || ENABLE_HUSH_TRAP |
| 11182 | static void print_escaped(const char *s) | 11177 | static void print_escaped(const char *s) |
| 11183 | { | 11178 | { |
| 11184 | //TODO? bash "set" does not quote variables which contain only alnums and "%+,-./:=@_~", | 11179 | //TODO? bash "set" does not quote variables which contain only alnums and "%+,-./:=@_~", |
| @@ -11215,7 +11210,7 @@ static int helper_export_local(char **argv, unsigned flags) | |||
| 11215 | if (*name_end == '\0') { | 11210 | if (*name_end == '\0') { |
| 11216 | struct variable *var, **vpp; | 11211 | struct variable *var, **vpp; |
| 11217 | 11212 | ||
| 11218 | vpp = get_ptr_to_local_var(name, name_end - name); | 11213 | vpp = get_ptr_to_local_var(name); |
| 11219 | var = vpp ? *vpp : NULL; | 11214 | var = vpp ? *vpp : NULL; |
| 11220 | 11215 | ||
| 11221 | if (flags & SETFLAG_UNEXPORT) { | 11216 | if (flags & SETFLAG_UNEXPORT) { |
| @@ -11317,8 +11312,8 @@ static int FAST_FUNC builtin_export(char **argv) | |||
| 11317 | 11312 | ||
| 11318 | if (!p) /* wtf? take next variable */ | 11313 | if (!p) /* wtf? take next variable */ |
| 11319 | continue; | 11314 | continue; |
| 11320 | /* export var= */ | 11315 | /* "export VAR=" */ |
| 11321 | printf("export %.*s", (int)(p - s) + 1, s); | 11316 | printf("%s %.*s", "export", (int)(p - s) + 1, s); |
| 11322 | print_escaped(p + 1); | 11317 | print_escaped(p + 1); |
| 11323 | putchar('\n'); | 11318 | putchar('\n'); |
| 11324 | # endif | 11319 | # endif |
| @@ -11362,8 +11357,15 @@ static int FAST_FUNC builtin_readonly(char **argv) | |||
| 11362 | struct variable *e; | 11357 | struct variable *e; |
| 11363 | for (e = G.top_var; e; e = e->next) { | 11358 | for (e = G.top_var; e; e = e->next) { |
| 11364 | if (e->flg_read_only) { | 11359 | if (e->flg_read_only) { |
| 11365 | //TODO: quote value: readonly VAR='VAL' | 11360 | const char *s = e->varstr; |
| 11366 | printf("readonly %s\n", e->varstr); | 11361 | const char *p = strchr(s, '='); |
| 11362 | |||
| 11363 | if (!p) /* wtf? take next variable */ | ||
| 11364 | continue; | ||
| 11365 | /* "readonly VAR=" */ | ||
| 11366 | printf("%s %.*s", "readonly", (int)(p - s) + 1, s); | ||
| 11367 | print_escaped(p + 1); | ||
| 11368 | putchar('\n'); | ||
| 11367 | } | 11369 | } |
| 11368 | } | 11370 | } |
| 11369 | return EXIT_SUCCESS; | 11371 | return EXIT_SUCCESS; |
diff --git a/shell/hush_test/hush-arith/arith-assign-in-varexp.right b/shell/hush_test/hush-arith/arith-assign-in-varexp.right new file mode 100644 index 000000000..06ac80a64 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-assign-in-varexp.right | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | 20:20 | ||
| 2 | a=b=10 | ||
| 3 | b=10 | ||
diff --git a/shell/hush_test/hush-arith/arith-assign-in-varexp.tests b/shell/hush_test/hush-arith/arith-assign-in-varexp.tests new file mode 100755 index 000000000..920aaa779 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-assign-in-varexp.tests | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | a='b=10' | ||
| 3 | b=3 | ||
| 4 | # The variables should evaluate left-to-right, | ||
| 5 | # thus b is set to 10 _before_ addition | ||
| 6 | echo 20:$((a + b)) | ||
| 7 | echo "a=$a" | ||
| 8 | echo "b=$b" | ||
diff --git a/shell/hush_test/hush-arith/arith-assign-in-varexp1.right b/shell/hush_test/hush-arith/arith-assign-in-varexp1.right new file mode 100644 index 000000000..1feb307d2 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-assign-in-varexp1.right | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | 7:7 | ||
| 2 | x=3 | ||
diff --git a/shell/hush_test/hush-arith/arith-assign-in-varexp1.tests b/shell/hush_test/hush-arith/arith-assign-in-varexp1.tests new file mode 100755 index 000000000..fc8ac9d97 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-assign-in-varexp1.tests | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | a='x=1' | ||
| 3 | b='x=2' | ||
| 4 | c='x=3' | ||
| 5 | # The variables should evaluate immediately when they encountered, | ||
| 6 | # not when they go into an operation. Here, order of evaluation | ||
| 7 | # of names to numbers should be a,b,c - not b,c,a: | ||
| 8 | echo 7:$((a+b*c)) | ||
| 9 | echo "x=$x" | ||
diff --git a/shell/hush_test/hush-arith/arith-bignum1.right b/shell/hush_test/hush-arith/arith-bignum1.right new file mode 100644 index 000000000..42a8016ec --- /dev/null +++ b/shell/hush_test/hush-arith/arith-bignum1.right | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | 18 digits: 999999999999999999 | ||
| 2 | 19 digits: -8446744073709551617 | ||
| 3 | 20 digits: 7766279631452241919 | ||
| 4 | 18 digits- -999999999999999999 | ||
| 5 | 19 digits- 8446744073709551617 | ||
| 6 | 20 digits- -7766279631452241919 | ||
| 7 | Hex base#: | ||
| 8 | 16 digits: 9876543210abcedf | ||
| 9 | 17 digits: 876543210abcedfc | ||
| 10 | 18 digits: 76543210abcedfcc | ||
| 11 | 16 digits: 6789abcdef543121 | ||
| 12 | 17 digits: 789abcdef5431204 | ||
| 13 | 18 digits: 89abcdef54312034 | ||
diff --git a/shell/hush_test/hush-arith/arith-bignum1.tests b/shell/hush_test/hush-arith/arith-bignum1.tests new file mode 100755 index 000000000..ef8f928bc --- /dev/null +++ b/shell/hush_test/hush-arith/arith-bignum1.tests | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | # If the number does not fit in 64 bits, bash uses truncated 64-bit value | ||
| 3 | # (essentially, it does not check for overflow in "n = n * base + digit" | ||
| 4 | # calculation). | ||
| 5 | echo 18 digits: $((999999999999999999)) | ||
| 6 | echo 19 digits: $((9999999999999999999)) | ||
| 7 | echo 20 digits: $((99999999999999999999)) | ||
| 8 | echo 18 digits- $((-999999999999999999)) | ||
| 9 | echo 19 digits- $((-9999999999999999999)) | ||
| 10 | echo 20 digits- $((-99999999999999999999)) | ||
| 11 | echo "Hex base#:" | ||
| 12 | printf '16 digits: %016x\n' $((16#9876543210abcedf)) | ||
| 13 | printf '17 digits: %016x\n' $((16#9876543210abcedfc)) | ||
| 14 | printf '18 digits: %016x\n' $((16#9876543210abcedfcc)) | ||
| 15 | printf '16 digits: %016x\n' $((-16#9876543210abcedf)) | ||
| 16 | printf '17 digits: %016x\n' $((-16#9876543210abcedfc)) | ||
| 17 | printf '18 digits: %016x\n' $((-16#9876543210abcedfcc)) | ||
diff --git a/shell/hush_test/hush-arith/arith-comma1.right b/shell/hush_test/hush-arith/arith-comma1.right new file mode 100644 index 000000000..be1264cc0 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-comma1.right | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | 10:10 | ||
| 2 | a=b=10 | ||
| 3 | b=10 | ||
diff --git a/shell/hush_test/hush-arith/arith-comma1.tests b/shell/hush_test/hush-arith/arith-comma1.tests new file mode 100755 index 000000000..f86304303 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-comma1.tests | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | a='b=10' | ||
| 3 | b=3 | ||
| 4 | echo 10:$((a,b)) | ||
| 5 | echo "a=$a" | ||
| 6 | echo "b=$b" | ||
diff --git a/shell/hush_test/hush-arith/arith-precedence1.right b/shell/hush_test/hush-arith/arith-precedence1.right new file mode 100644 index 000000000..3f9320a13 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-precedence1.right | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | 4:4 | ||
| 2 | 4:4 | ||
| 3 | 4:4 | ||
| 4 | 4:4 | ||
diff --git a/shell/hush_test/hush-arith/arith-precedence1.tests b/shell/hush_test/hush-arith/arith-precedence1.tests new file mode 100755 index 000000000..bfef05292 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-precedence1.tests | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | # bash documentation says that precedence order is: | ||
| 3 | # ... | ||
| 4 | # expr ? expr1 : expr2 | ||
| 5 | # = *= /= %= += -= <<= >>= &= ^= |= | ||
| 6 | # exprA , exprB | ||
| 7 | # but in practice, the rules for expr1 and expr2 are different: | ||
| 8 | # assignments and commas in expr1 have higher precedence than :?, | ||
| 9 | # but in expr2 they haven't: | ||
| 10 | # "v ? 1,2 : 3,4" is parsed as "(v ? (1,2) : 3),4" | ||
| 11 | # "v ? a=2 : b=4" is parsed as "(v ? (a=1) : b)=4" (thus, this is a syntax error) | ||
| 12 | echo 4:$((0 ? 1,2 : 3,4)) | ||
| 13 | echo 4:$((1 ? 1,2 : 3,4)) | ||
| 14 | echo 4:"$((0 ? 1,2 : 3,4))" | ||
| 15 | echo 4:"$((1 ? 1,2 : 3,4))" | ||
diff --git a/shell/hush_test/hush-arith/arith-ternary-assign.right b/shell/hush_test/hush-arith/arith-ternary-assign.right new file mode 100644 index 000000000..6644d86bf --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary-assign.right | |||
| @@ -0,0 +1 @@ | |||
| 42:42 | |||
diff --git a/shell/hush_test/hush-arith/arith-ternary-assign.tests b/shell/hush_test/hush-arith/arith-ternary-assign.tests new file mode 100755 index 000000000..fa18fe7b9 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary-assign.tests | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | a='@' | ||
| 3 | echo 42:$((a=1?42:3,a)) | ||
diff --git a/shell/hush_test/hush-arith/arith-ternary-comma.right b/shell/hush_test/hush-arith/arith-ternary-comma.right new file mode 100644 index 000000000..6644d86bf --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary-comma.right | |||
| @@ -0,0 +1 @@ | |||
| 42:42 | |||
diff --git a/shell/hush_test/hush-arith/arith-ternary-comma.tests b/shell/hush_test/hush-arith/arith-ternary-comma.tests new file mode 100755 index 000000000..5e05b58c4 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary-comma.tests | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | x='@' | ||
| 3 | echo 42:$((1?4:x,20*2+2)) | ||
diff --git a/shell/hush_test/hush-arith/arith-ternary-preincr.right b/shell/hush_test/hush-arith/arith-ternary-preincr.right new file mode 100644 index 000000000..6644d86bf --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary-preincr.right | |||
| @@ -0,0 +1 @@ | |||
| 42:42 | |||
diff --git a/shell/hush_test/hush-arith/arith-ternary-preincr.tests b/shell/hush_test/hush-arith/arith-ternary-preincr.tests new file mode 100755 index 000000000..3985c7079 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary-preincr.tests | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | x='@' | ||
| 3 | echo 42:$((1?42:++x)) | ||
diff --git a/shell/hush_test/hush-arith/arith-ternary1.right b/shell/hush_test/hush-arith/arith-ternary1.right new file mode 100644 index 000000000..6b751d7b8 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary1.right | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | 42:42 | ||
| 2 | a=0 | ||
diff --git a/shell/hush_test/hush-arith/arith-ternary1.tests b/shell/hush_test/hush-arith/arith-ternary1.tests new file mode 100755 index 000000000..3532ce54d --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary1.tests | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | a=0 | ||
| 3 | # The not-taken branch should not evaluate | ||
| 4 | echo 42:$((1 ? 42 : (a+=2))) | ||
| 5 | echo "a=$a" | ||
diff --git a/shell/hush_test/hush-arith/arith-ternary2.right b/shell/hush_test/hush-arith/arith-ternary2.right new file mode 100644 index 000000000..a549b1b5c --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary2.right | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | 6:6 | ||
| 2 | a=b=+err+ | ||
| 3 | b=6 | ||
diff --git a/shell/hush_test/hush-arith/arith-ternary2.tests b/shell/hush_test/hush-arith/arith-ternary2.tests new file mode 100755 index 000000000..cb3163932 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary2.tests | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | a='b=+err+' | ||
| 3 | b=5 | ||
| 4 | # The not-taken branch should not parse variables | ||
| 5 | echo 6:$((0 ? a : ++b)) | ||
| 6 | echo "a=$a" | ||
| 7 | echo "b=$b" | ||
diff --git a/shell/hush_test/hush-arith/arith-ternary3.right b/shell/hush_test/hush-arith/arith-ternary3.right new file mode 100644 index 000000000..6644d86bf --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary3.right | |||
| @@ -0,0 +1 @@ | |||
| 42:42 | |||
diff --git a/shell/hush_test/hush-arith/arith-ternary3.tests b/shell/hush_test/hush-arith/arith-ternary3.tests new file mode 100755 index 000000000..0bf9f3002 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary3.tests | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | # "EXPR ?..." should check _evaluated_ EXPR, | ||
| 3 | # not its last value | ||
| 4 | echo 42:$((1 < 1 ? -1 : 1 > 1 ? 1 : 42)) | ||
diff --git a/shell/hush_test/hush-arith/arith-ternary_nested.right b/shell/hush_test/hush-arith/arith-ternary_nested.right new file mode 100644 index 000000000..aa54bd925 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary_nested.right | |||
| @@ -0,0 +1 @@ | |||
| 5:5 | |||
diff --git a/shell/hush_test/hush-arith/arith-ternary_nested.tests b/shell/hush_test/hush-arith/arith-ternary_nested.tests new file mode 100755 index 000000000..eefc8e7ce --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary_nested.tests | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | echo 5:$((1?2?3?4?5:6:7:8:9)) | ||
diff --git a/shell/hush_test/hush-arith/arith-ternary_nested1.right b/shell/hush_test/hush-arith/arith-ternary_nested1.right new file mode 100644 index 000000000..d80319695 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary_nested1.right | |||
| @@ -0,0 +1 @@ | |||
| 3:3 | |||
diff --git a/shell/hush_test/hush-arith/arith-ternary_nested1.tests b/shell/hush_test/hush-arith/arith-ternary_nested1.tests new file mode 100755 index 000000000..469584bea --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary_nested1.tests | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | echo 3:$((1?(2?(3):4):5)) | ||
diff --git a/shell/hush_test/hush-arith/arith-ternary_nested2.right b/shell/hush_test/hush-arith/arith-ternary_nested2.right new file mode 100644 index 000000000..d80319695 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary_nested2.right | |||
| @@ -0,0 +1 @@ | |||
| 3:3 | |||
diff --git a/shell/hush_test/hush-arith/arith-ternary_nested2.tests b/shell/hush_test/hush-arith/arith-ternary_nested2.tests new file mode 100755 index 000000000..e8b8a9e1a --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary_nested2.tests | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | echo 3:$((0?1:2?3:4?5:6?7:8)) | ||
diff --git a/shell/hush_test/hush-arith/arith-ternary_nested3.right b/shell/hush_test/hush-arith/arith-ternary_nested3.right new file mode 100644 index 000000000..1a34fde65 --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary_nested3.right | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | 42:42 | ||
| 2 | a=2:2 | ||
diff --git a/shell/hush_test/hush-arith/arith-ternary_nested3.tests b/shell/hush_test/hush-arith/arith-ternary_nested3.tests new file mode 100755 index 000000000..6f753867e --- /dev/null +++ b/shell/hush_test/hush-arith/arith-ternary_nested3.tests | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | exec 2>&1 | ||
| 2 | x='@' | ||
| 3 | a=2 | ||
| 4 | # After processing nested ?:, outermost ?: should still remember to NOT evaluate a*=2 | ||
| 5 | echo 42:$((1?0?41:42:(a*=2))) | ||
| 6 | echo "a=2:$a" | ||
diff --git a/shell/hush_test/hush-arith/arith.right b/shell/hush_test/hush-arith/arith.right index a8612295e..d3a978611 100644 --- a/shell/hush_test/hush-arith/arith.right +++ b/shell/hush_test/hush-arith/arith.right | |||
| @@ -82,7 +82,8 @@ other bases | |||
| 82 | 62 62 | 82 | 62 62 |
| 83 | 63 63 | 83 | 63 63 |
| 84 | missing number after base | 84 | missing number after base |
| 85 | 0 0 | 85 | hush: arithmetic syntax error |
| 86 | hush: arithmetic syntax error | ||
| 86 | hush: arithmetic syntax error | 87 | hush: arithmetic syntax error |
| 87 | hush: divide by zero | 88 | hush: divide by zero |
| 88 | hush: can't execute 'let': No such file or directory | 89 | hush: can't execute 'let': No such file or directory |
| @@ -94,7 +95,7 @@ ghi | |||
| 94 | hush: arithmetic syntax error | 95 | hush: arithmetic syntax error |
| 95 | 16 16 | 96 | 16 16 |
| 96 | hush: arithmetic syntax error | 97 | hush: arithmetic syntax error |
| 97 | hush: malformed ?: operator | 98 | hush: arithmetic syntax error |
| 98 | hush: arithmetic syntax error | 99 | hush: arithmetic syntax error |
| 99 | 9 9 | 100 | 9 9 |
| 100 | hush: arithmetic syntax error | 101 | hush: arithmetic syntax error |
diff --git a/shell/hush_test/hush-arith/arith.tests b/shell/hush_test/hush-arith/arith.tests index 6b707486c..9f0399816 100755 --- a/shell/hush_test/hush-arith/arith.tests +++ b/shell/hush_test/hush-arith/arith.tests | |||
| @@ -159,12 +159,12 @@ echo 63 $(( 64#_ )) | |||
| 159 | #ash# # weird bases (error) | 159 | #ash# # weird bases (error) |
| 160 | #ash# echo $(( 3425#56 )) | 160 | #ash# echo $(( 3425#56 )) |
| 161 | 161 | ||
| 162 | echo missing number after base | ||
| 163 | echo 0 $(( 2# )) | ||
| 164 | 162 | ||
| 165 | # these should generate errors | 163 | # these should generate errors |
| 164 | echo missing number after base | ||
| 165 | ( echo $(( 2# )) ) | ||
| 166 | ( echo $(( 7 = 43 )) ) | 166 | ( echo $(( 7 = 43 )) ) |
| 167 | #ash# echo $(( 2#44 )) | 167 | ( echo $(( 2#44 )) ) |
| 168 | ( echo $(( 44 / 0 )) ) | 168 | ( echo $(( 44 / 0 )) ) |
| 169 | ( let 'jv += $iv' ) | 169 | ( let 'jv += $iv' ) |
| 170 | ( echo $(( jv += \$iv )) ) | 170 | ( echo $(( jv += \$iv )) ) |
diff --git a/shell/hush_test/hush-quoting/space_in_varexp1.right b/shell/hush_test/hush-quoting/space_in_varexp1.right new file mode 100644 index 000000000..a617a91c3 --- /dev/null +++ b/shell/hush_test/hush-quoting/space_in_varexp1.right | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | 1:'b c' | ||
| 2 | 2:'b c' | ||
diff --git a/shell/hush_test/hush-quoting/space_in_varexp1.tests b/shell/hush_test/hush-quoting/space_in_varexp1.tests new file mode 100755 index 000000000..1589587d1 --- /dev/null +++ b/shell/hush_test/hush-quoting/space_in_varexp1.tests | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | a=b | ||
| 2 | a=${a:+$a }c | ||
| 3 | echo "1:'$a'" | ||
| 4 | a=b | ||
| 5 | a="${a:+$a }c" | ||
| 6 | echo "2:'$a'" | ||
diff --git a/shell/hush_test/hush-vars/readonly0.right b/shell/hush_test/hush-vars/readonly0.right index 8b750eb5f..7599698d2 100644 --- a/shell/hush_test/hush-vars/readonly0.right +++ b/shell/hush_test/hush-vars/readonly0.right | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | readonly a=A | 1 | readonly a='A' |
| 2 | readonly b=B | 2 | readonly b='B' |
| 3 | Ok:0 | 3 | Ok:0 |
| 4 | 4 | ||
| 5 | hush: a=A: readonly variable | 5 | hush: a=A: readonly variable |
diff --git a/shell/hush_test/run-all b/shell/hush_test/run-all index 3fbc7c531..7345fee43 100755 --- a/shell/hush_test/run-all +++ b/shell/hush_test/run-all | |||
| @@ -29,7 +29,7 @@ fi | |||
| 29 | 29 | ||
| 30 | eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' .config) | 30 | eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' .config) |
| 31 | 31 | ||
| 32 | PATH="`pwd`:$PATH" # for hush and recho/zecho/printenv | 32 | PATH="`pwd`:$PATH" # for hush |
| 33 | export PATH | 33 | export PATH |
| 34 | 34 | ||
| 35 | THIS_SH="`pwd`/hush" | 35 | THIS_SH="`pwd`/hush" |
| @@ -67,7 +67,8 @@ do_test() | |||
| 67 | # echo Running test: "$x" | 67 | # echo Running test: "$x" |
| 68 | echo -n "$1/$x:" | 68 | echo -n "$1/$x:" |
| 69 | ( | 69 | ( |
| 70 | "$THIS_SH" "./$x" >"$name.xx" 2>&1 | 70 | "$THIS_SH" "./$x" 2>&1 | \ |
| 71 | grep -va "^hush: using fallback suid method$" >"$name.xx" | ||
| 71 | r=$? | 72 | r=$? |
| 72 | # filter C library differences | 73 | # filter C library differences |
| 73 | sed -i \ | 74 | sed -i \ |
| @@ -83,7 +84,7 @@ do_test() | |||
| 83 | *) echo " fail ($?)"; tret=1;; | 84 | *) echo " fail ($?)"; tret=1;; |
| 84 | esac | 85 | esac |
| 85 | done | 86 | done |
| 86 | exit ${tret} | 87 | exit $tret |
| 87 | ) | 88 | ) |
| 88 | } | 89 | } |
| 89 | 90 | ||
| @@ -95,6 +96,9 @@ ret=0 | |||
| 95 | if [ $# -lt 1 ]; then | 96 | if [ $# -lt 1 ]; then |
| 96 | # All sub directories | 97 | # All sub directories |
| 97 | modules=`ls -d hush-*` | 98 | modules=`ls -d hush-*` |
| 99 | # If you want to test hush against ash testsuite | ||
| 100 | # (have to copy ash_test dir to current dir first): | ||
| 101 | #modules=`ls -d hush-* ash_test/ash-*` | ||
| 98 | 102 | ||
| 99 | for module in $modules; do | 103 | for module in $modules; do |
| 100 | do_test $module || ret=1 | 104 | do_test $module || ret=1 |
| @@ -108,4 +112,4 @@ else | |||
| 108 | done | 112 | done |
| 109 | fi | 113 | fi |
| 110 | 114 | ||
| 111 | exit ${ret} | 115 | exit $ret |
diff --git a/shell/math.c b/shell/math.c index 76d22c9bd..e90a38f05 100644 --- a/shell/math.c +++ b/shell/math.c | |||
| @@ -46,7 +46,6 @@ | |||
| 46 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | 46 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 47 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 47 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 48 | */ | 48 | */ |
| 49 | |||
| 50 | /* This is my infix parser/evaluator. It is optimized for size, intended | 49 | /* This is my infix parser/evaluator. It is optimized for size, intended |
| 51 | * as a replacement for yacc-based parsers. However, it may well be faster | 50 | * as a replacement for yacc-based parsers. However, it may well be faster |
| 52 | * than a comparable parser written in yacc. The supported operators are | 51 | * than a comparable parser written in yacc. The supported operators are |
| @@ -61,7 +60,6 @@ | |||
| 61 | * to the stack instead of adding them to a queue to end up with an | 60 | * to the stack instead of adding them to a queue to end up with an |
| 62 | * expression). | 61 | * expression). |
| 63 | */ | 62 | */ |
| 64 | |||
| 65 | /* | 63 | /* |
| 66 | * Aug 24, 2001 Manuel Novoa III | 64 | * Aug 24, 2001 Manuel Novoa III |
| 67 | * | 65 | * |
| @@ -96,7 +94,6 @@ | |||
| 96 | * | 94 | * |
| 97 | * Merge in Aaron's comments previously posted to the busybox list, | 95 | * Merge in Aaron's comments previously posted to the busybox list, |
| 98 | * modified slightly to take account of my changes to the code. | 96 | * modified slightly to take account of my changes to the code. |
| 99 | * | ||
| 100 | */ | 97 | */ |
| 101 | /* | 98 | /* |
| 102 | * (C) 2003 Vladimir Oleynik <dzo@simtreas.ru> | 99 | * (C) 2003 Vladimir Oleynik <dzo@simtreas.ru> |
| @@ -116,6 +113,12 @@ | |||
| 116 | #include "libbb.h" | 113 | #include "libbb.h" |
| 117 | #include "math.h" | 114 | #include "math.h" |
| 118 | 115 | ||
| 116 | #if 1 | ||
| 117 | # define dbg(...) ((void)0) | ||
| 118 | #else | ||
| 119 | # define dbg(...) bb_error_msg(__VA_ARGS__) | ||
| 120 | #endif | ||
| 121 | |||
| 119 | typedef unsigned char operator; | 122 | typedef unsigned char operator; |
| 120 | 123 | ||
| 121 | /* An operator's token id is a bit of a bitfield. The lower 5 bits are the | 124 | /* An operator's token id is a bit of a bitfield. The lower 5 bits are the |
| @@ -125,9 +128,13 @@ typedef unsigned char operator; | |||
| 125 | * Consider * and / | 128 | * Consider * and / |
| 126 | */ | 129 | */ |
| 127 | #define tok_decl(prec,id) (((id)<<5) | (prec)) | 130 | #define tok_decl(prec,id) (((id)<<5) | (prec)) |
| 128 | #define PREC(op) ((op) & 0x1F) | 131 | #define ID_SHIFT 5 |
| 132 | #define PREC(op) ((op) & 0x1f) | ||
| 129 | 133 | ||
| 134 | #define PREC_LPAREN 0 | ||
| 130 | #define TOK_LPAREN tok_decl(0,0) | 135 | #define TOK_LPAREN tok_decl(0,0) |
| 136 | /* Precedence value of RPAREN is used only to distinguish it from LPAREN */ | ||
| 137 | #define TOK_RPAREN tok_decl(1,1) | ||
| 131 | 138 | ||
| 132 | #define TOK_COMMA tok_decl(1,0) | 139 | #define TOK_COMMA tok_decl(1,0) |
| 133 | 140 | ||
| @@ -135,22 +142,37 @@ typedef unsigned char operator; | |||
| 135 | * but there are 11 of them, which doesn't fit into 3 bits for unique id. | 142 | * but there are 11 of them, which doesn't fit into 3 bits for unique id. |
| 136 | * Abusing another precedence level: | 143 | * Abusing another precedence level: |
| 137 | */ | 144 | */ |
| 145 | #define PREC_ASSIGN1 2 | ||
| 138 | #define TOK_ASSIGN tok_decl(2,0) | 146 | #define TOK_ASSIGN tok_decl(2,0) |
| 139 | #define TOK_AND_ASSIGN tok_decl(2,1) | 147 | #define TOK_AND_ASSIGN tok_decl(2,1) |
| 140 | #define TOK_OR_ASSIGN tok_decl(2,2) | 148 | #define TOK_OR_ASSIGN tok_decl(2,2) |
| 141 | #define TOK_XOR_ASSIGN tok_decl(2,3) | 149 | #define TOK_XOR_ASSIGN tok_decl(2,3) |
| 142 | #define TOK_PLUS_ASSIGN tok_decl(2,4) | 150 | #define TOK_ADD_ASSIGN tok_decl(2,4) |
| 143 | #define TOK_MINUS_ASSIGN tok_decl(2,5) | 151 | #define TOK_SUB_ASSIGN tok_decl(2,5) |
| 144 | #define TOK_LSHIFT_ASSIGN tok_decl(2,6) | 152 | #define TOK_LSHIFT_ASSIGN tok_decl(2,6) |
| 145 | #define TOK_RSHIFT_ASSIGN tok_decl(2,7) | 153 | #define TOK_RSHIFT_ASSIGN tok_decl(2,7) |
| 146 | 154 | ||
| 155 | #define PREC_ASSIGN2 3 | ||
| 147 | #define TOK_MUL_ASSIGN tok_decl(3,0) | 156 | #define TOK_MUL_ASSIGN tok_decl(3,0) |
| 148 | #define TOK_DIV_ASSIGN tok_decl(3,1) | 157 | /* "/" and "/=" ops have the same id bits */ |
| 158 | #define DIV_ID1 1 | ||
| 159 | #define TOK_DIV_ASSIGN tok_decl(3,DIV_ID1) | ||
| 149 | #define TOK_REM_ASSIGN tok_decl(3,2) | 160 | #define TOK_REM_ASSIGN tok_decl(3,2) |
| 150 | 161 | ||
| 151 | #define fix_assignment_prec(prec) do { if (prec == 3) prec = 2; } while (0) | 162 | #define fix_assignment_prec(prec) do { prec -= (prec == 3); } while (0) |
| 152 | 163 | ||
| 153 | /* Ternary conditional operator is right associative too */ | 164 | /* Ternary conditional operator is right associative too */ |
| 165 | /* | ||
| 166 | * bash documentation says that precedence order is: | ||
| 167 | * ... | ||
| 168 | * expr ? expr1 : expr2 | ||
| 169 | * = *= /= %= += -= <<= >>= &= ^= |= | ||
| 170 | * exprA , exprB | ||
| 171 | * What it omits is that expr1 is parsed as if parenthesized | ||
| 172 | * (this matches the rules of ?: in C language): | ||
| 173 | * "v ? 1,2 : 3,4" is parsed as "(v ? (1,2) : 3),4" | ||
| 174 | * "v ? a=2 : b=4" is parsed as "(v ? (a=1) : b)=4" (thus, this is a syntax error) | ||
| 175 | */ | ||
| 154 | #define TOK_CONDITIONAL tok_decl(4,0) | 176 | #define TOK_CONDITIONAL tok_decl(4,0) |
| 155 | #define TOK_CONDITIONAL_SEP tok_decl(4,1) | 177 | #define TOK_CONDITIONAL_SEP tok_decl(4,1) |
| 156 | 178 | ||
| @@ -179,7 +201,7 @@ typedef unsigned char operator; | |||
| 179 | #define TOK_SUB tok_decl(13,1) | 201 | #define TOK_SUB tok_decl(13,1) |
| 180 | 202 | ||
| 181 | #define TOK_MUL tok_decl(14,0) | 203 | #define TOK_MUL tok_decl(14,0) |
| 182 | #define TOK_DIV tok_decl(14,1) | 204 | #define TOK_DIV tok_decl(14,DIV_ID1) |
| 183 | #define TOK_REM tok_decl(14,2) | 205 | #define TOK_REM tok_decl(14,2) |
| 184 | 206 | ||
| 185 | /* Exponent is right associative */ | 207 | /* Exponent is right associative */ |
| @@ -194,26 +216,25 @@ typedef unsigned char operator; | |||
| 194 | #define TOK_UPLUS tok_decl(UNARYPREC+1,1) | 216 | #define TOK_UPLUS tok_decl(UNARYPREC+1,1) |
| 195 | 217 | ||
| 196 | #define PREC_PRE (UNARYPREC+2) | 218 | #define PREC_PRE (UNARYPREC+2) |
| 197 | 219 | #define TOK_PRE_INC tok_decl(PREC_PRE,0) | |
| 198 | #define TOK_PRE_INC tok_decl(PREC_PRE, 0) | 220 | #define TOK_PRE_DEC tok_decl(PREC_PRE,1) |
| 199 | #define TOK_PRE_DEC tok_decl(PREC_PRE, 1) | ||
| 200 | 221 | ||
| 201 | #define PREC_POST (UNARYPREC+3) | 222 | #define PREC_POST (UNARYPREC+3) |
| 223 | #define TOK_POST_INC tok_decl(PREC_POST,0) | ||
| 224 | #define TOK_POST_DEC tok_decl(PREC_POST,1) | ||
| 202 | 225 | ||
| 203 | #define TOK_POST_INC tok_decl(PREC_POST, 0) | 226 | /* TOK_VALUE marks a number, name, name++/name--, or (EXPR): |
| 204 | #define TOK_POST_DEC tok_decl(PREC_POST, 1) | 227 | * IOW: something which can be used as the left side of a binary op. |
| 205 | 228 | * Since it's never pushed to opstack, its precedence does not matter. | |
| 206 | #define SPEC_PREC (UNARYPREC+4) | 229 | */ |
| 207 | 230 | #define TOK_VALUE tok_decl(PREC_POST,2) | |
| 208 | #define TOK_NUM tok_decl(SPEC_PREC, 0) | ||
| 209 | #define TOK_RPAREN tok_decl(SPEC_PREC, 1) | ||
| 210 | 231 | ||
| 211 | static int | 232 | static int |
| 212 | is_assign_op(operator op) | 233 | is_assign_op(operator op) |
| 213 | { | 234 | { |
| 214 | operator prec = PREC(op); | 235 | operator prec = PREC(op); |
| 215 | fix_assignment_prec(prec); | 236 | return prec == PREC_ASSIGN1 |
| 216 | return prec == PREC(TOK_ASSIGN) | 237 | || prec == PREC_ASSIGN2 |
| 217 | || prec == PREC_PRE | 238 | || prec == PREC_PRE |
| 218 | || prec == PREC_POST; | 239 | || prec == PREC_POST; |
| 219 | } | 240 | } |
| @@ -226,91 +247,107 @@ is_right_associative(operator prec) | |||
| 226 | || prec == PREC(TOK_CONDITIONAL); | 247 | || prec == PREC(TOK_CONDITIONAL); |
| 227 | } | 248 | } |
| 228 | 249 | ||
| 229 | |||
| 230 | typedef struct { | 250 | typedef struct { |
| 231 | arith_t val; | 251 | arith_t val; |
| 232 | /* We acquire second_val only when "expr1 : expr2" part | 252 | const char *var_name; |
| 233 | * of ternary ?: op is evaluated. | ||
| 234 | * We treat ?: as two binary ops: (expr ? (expr1 : expr2)). | ||
| 235 | * ':' produces a new value which has two parts, val and second_val; | ||
| 236 | * then '?' selects one of them based on its left side. | ||
| 237 | */ | ||
| 238 | arith_t second_val; | ||
| 239 | char second_val_present; | ||
| 240 | /* If NULL then it's just a number, else it's a named variable */ | ||
| 241 | char *var; | ||
| 242 | } var_or_num_t; | 253 | } var_or_num_t; |
| 243 | 254 | ||
| 255 | #define VALID_NAME(name) (name) | ||
| 256 | #define NOT_NAME(name) (!(name)) | ||
| 257 | |||
| 244 | typedef struct remembered_name { | 258 | typedef struct remembered_name { |
| 245 | struct remembered_name *next; | 259 | struct remembered_name *next; |
| 246 | const char *var; | 260 | const char *var_name; |
| 247 | } remembered_name; | 261 | } remembered_name; |
| 248 | 262 | ||
| 263 | static ALWAYS_INLINE int isalnum_(int c) | ||
| 264 | { | ||
| 265 | return (isalnum(c) || c == '_'); | ||
| 266 | } | ||
| 249 | 267 | ||
| 250 | static arith_t | 268 | static arith_t |
| 251 | evaluate_string(arith_state_t *math_state, const char *expr); | 269 | evaluate_string(arith_state_t *math_state, const char *expr); |
| 252 | 270 | ||
| 253 | static const char* | 271 | static arith_t |
| 254 | arith_lookup_val(arith_state_t *math_state, var_or_num_t *t) | 272 | arith_lookup_val(arith_state_t *math_state, const char *name, char *endname) |
| 255 | { | 273 | { |
| 256 | if (t->var) { | 274 | char c; |
| 257 | const char *p = math_state->lookupvar(t->var); | 275 | const char *p; |
| 258 | if (p) { | 276 | |
| 259 | remembered_name *cur; | 277 | c = *endname; |
| 260 | remembered_name cur_save; | 278 | *endname = '\0'; |
| 261 | 279 | p = math_state->lookupvar(name); | |
| 262 | /* did we already see this name? | 280 | *endname = c; |
| 263 | * testcase: a=b; b=a; echo $((a)) | 281 | if (p) { |
| 264 | */ | 282 | arith_t val; |
| 265 | for (cur = math_state->list_of_recursed_names; cur; cur = cur->next) { | 283 | size_t len = endname - name; |
| 266 | if (strcmp(cur->var, t->var) == 0) { | 284 | remembered_name *cur; |
| 267 | /* Yes */ | 285 | remembered_name remember; |
| 268 | return "expression recursion loop detected"; | 286 | |
| 269 | } | 287 | /* did we already see this name? |
| 288 | * testcase: a=b; b=a; echo $((a)) | ||
| 289 | */ | ||
| 290 | for (cur = math_state->list_of_recursed_names; cur; cur = cur->next) { | ||
| 291 | if (strncmp(cur->var_name, name, len) == 0 | ||
| 292 | && !isalnum_(cur->var_name[len]) | ||
| 293 | ) { | ||
| 294 | /* yes */ | ||
| 295 | math_state->errmsg = "expression recursion loop detected"; | ||
| 296 | return -1; | ||
| 270 | } | 297 | } |
| 298 | } | ||
| 271 | 299 | ||
| 272 | /* push current var name */ | 300 | /* push current var name */ |
| 273 | cur = math_state->list_of_recursed_names; | 301 | remember.var_name = name; |
| 274 | cur_save.var = t->var; | 302 | remember.next = math_state->list_of_recursed_names; |
| 275 | cur_save.next = cur; | 303 | math_state->list_of_recursed_names = &remember; |
| 276 | math_state->list_of_recursed_names = &cur_save; | ||
| 277 | 304 | ||
| 278 | /* recursively evaluate p as expression */ | 305 | /* recursively evaluate p as expression */ |
| 279 | t->val = evaluate_string(math_state, p); | 306 | /* this sets math_state->errmsg on error */ |
| 307 | val = evaluate_string(math_state, p); | ||
| 280 | 308 | ||
| 281 | /* pop current var name */ | 309 | /* pop current var name */ |
| 282 | math_state->list_of_recursed_names = cur; | 310 | math_state->list_of_recursed_names = remember.next; |
| 283 | 311 | ||
| 284 | return math_state->errmsg; | 312 | return val; |
| 285 | } | ||
| 286 | /* treat undefined var as 0 */ | ||
| 287 | t->val = 0; | ||
| 288 | } | 313 | } |
| 314 | /* treat undefined var as 0 */ | ||
| 289 | return 0; | 315 | return 0; |
| 290 | } | 316 | } |
| 291 | 317 | ||
| 292 | /* "Applying" a token means performing it on the top elements on the integer | 318 | /* "Applying" a token means performing it on the top elements on the integer |
| 293 | * stack. For an unary operator it will only change the top element, but a | 319 | * stack. For an unary operator it will only change the top element, |
| 294 | * binary operator will pop two arguments and push the result */ | 320 | * a binary operator will pop two arguments and push the result, |
| 321 | * the ternary ?: op will pop three arguments and push the result. | ||
| 322 | */ | ||
| 295 | static NOINLINE const char* | 323 | static NOINLINE const char* |
| 296 | arith_apply(arith_state_t *math_state, operator op, var_or_num_t *numstack, var_or_num_t **numstackptr) | 324 | arith_apply(arith_state_t *math_state, operator op, var_or_num_t *numstack, var_or_num_t **numstackptr) |
| 297 | { | 325 | { |
| 298 | #define NUMPTR (*numstackptr) | 326 | #define NUMSTACKPTR (*numstackptr) |
| 299 | 327 | ||
| 300 | var_or_num_t *top_of_stack; | 328 | var_or_num_t *top_of_stack; |
| 301 | arith_t rez; | 329 | arith_t rez; |
| 302 | const char *err; | ||
| 303 | 330 | ||
| 304 | /* There is no operator that can work without arguments */ | 331 | /* There is no operator that can work without arguments */ |
| 305 | if (NUMPTR == numstack) | 332 | if (NUMSTACKPTR == numstack) |
| 306 | goto err; | 333 | goto syntax_err; |
| 307 | 334 | ||
| 308 | top_of_stack = NUMPTR - 1; | 335 | top_of_stack = NUMSTACKPTR - 1; |
| 309 | 336 | ||
| 310 | /* Resolve name to value, if needed */ | 337 | if (op == TOK_CONDITIONAL_SEP) { |
| 311 | err = arith_lookup_val(math_state, top_of_stack); | 338 | /* "expr1 ? expr2 : expr3" operation */ |
| 312 | if (err) | 339 | var_or_num_t *expr1 = &top_of_stack[-2]; |
| 313 | return err; | 340 | NUMSTACKPTR = expr1 + 1; |
| 341 | if (expr1 < numstack) /* Example: $((2:3)) */ | ||
| 342 | return "malformed ?: operator"; | ||
| 343 | if (expr1->val != 0) /* select expr2 or expr3 */ | ||
| 344 | top_of_stack--; | ||
| 345 | rez = top_of_stack->val; | ||
| 346 | top_of_stack = expr1; | ||
| 347 | goto ret_rez; | ||
| 348 | } | ||
| 349 | if (op == TOK_CONDITIONAL) /* Example: $((a ? b)) */ | ||
| 350 | return "malformed ?: operator"; | ||
| 314 | 351 | ||
| 315 | rez = top_of_stack->val; | 352 | rez = top_of_stack->val; |
| 316 | if (op == TOK_UMINUS) | 353 | if (op == TOK_UMINUS) |
| @@ -323,50 +360,30 @@ arith_apply(arith_state_t *math_state, operator op, var_or_num_t *numstack, var_ | |||
| 323 | rez++; | 360 | rez++; |
| 324 | else if (op == TOK_POST_DEC || op == TOK_PRE_DEC) | 361 | else if (op == TOK_POST_DEC || op == TOK_PRE_DEC) |
| 325 | rez--; | 362 | rez--; |
| 326 | else if (op != TOK_UPLUS) { | 363 | else /*if (op != TOK_UPLUS) - always true, we drop TOK_UPLUS earlier */ { |
| 327 | /* Binary operators */ | 364 | /* Binary operators */ |
| 328 | arith_t right_side_val; | 365 | arith_t right_side_val; |
| 329 | char bad_second_val; | ||
| 330 | |||
| 331 | /* Binary operators need two arguments */ | ||
| 332 | if (top_of_stack == numstack) | ||
| 333 | goto err; | ||
| 334 | /* ...and they pop one */ | ||
| 335 | NUMPTR = top_of_stack; /* this decrements NUMPTR */ | ||
| 336 | |||
| 337 | bad_second_val = top_of_stack->second_val_present; | ||
| 338 | if (op == TOK_CONDITIONAL) { /* ? operation */ | ||
| 339 | /* Make next if (...) protect against | ||
| 340 | * $((expr1 ? expr2)) - that is, missing ": expr" */ | ||
| 341 | bad_second_val = !bad_second_val; | ||
| 342 | } | ||
| 343 | if (bad_second_val) { | ||
| 344 | /* Protect against $((expr <not_?_op> expr1 : expr2)) */ | ||
| 345 | return "malformed ?: operator"; | ||
| 346 | } | ||
| 347 | 366 | ||
| 348 | top_of_stack--; /* now points to left side */ | 367 | if (top_of_stack == numstack) /* have two arguments? */ |
| 368 | goto syntax_err; /* no */ | ||
| 369 | |||
| 370 | /* Pop numstack */ | ||
| 371 | NUMSTACKPTR = top_of_stack; /* this decrements NUMSTACKPTR */ | ||
| 349 | 372 | ||
| 350 | if (op != TOK_ASSIGN) { | 373 | if (math_state->evaluation_disabled) { |
| 351 | /* Resolve left side value (unless the op is '=') */ | 374 | dbg("binary op %02x skipped", op); |
| 352 | err = arith_lookup_val(math_state, top_of_stack); | 375 | return NULL; |
| 353 | if (err) | 376 | /* bash 5.2.12 does not execute "2/0" in disabled |
| 354 | return err; | 377 | * branches of ?: (and thus does not complain), |
| 378 | * but complains about negative exp: "2**-1". | ||
| 379 | * I don't think we need to emulate that. | ||
| 380 | */ | ||
| 355 | } | 381 | } |
| 356 | 382 | ||
| 383 | top_of_stack--; /* now points to left side */ | ||
| 357 | right_side_val = rez; | 384 | right_side_val = rez; |
| 358 | rez = top_of_stack->val; | 385 | rez = top_of_stack->val; |
| 359 | if (op == TOK_CONDITIONAL) /* ? operation */ | 386 | if (op == TOK_BOR || op == TOK_OR_ASSIGN) |
| 360 | rez = (rez ? right_side_val : top_of_stack[1].second_val); | ||
| 361 | else if (op == TOK_CONDITIONAL_SEP) { /* : operation */ | ||
| 362 | if (top_of_stack == numstack) { | ||
| 363 | /* Protect against $((expr : expr)) */ | ||
| 364 | return "malformed ?: operator"; | ||
| 365 | } | ||
| 366 | top_of_stack->second_val_present = op; | ||
| 367 | top_of_stack->second_val = right_side_val; | ||
| 368 | } | ||
| 369 | else if (op == TOK_BOR || op == TOK_OR_ASSIGN) | ||
| 370 | rez |= right_side_val; | 387 | rez |= right_side_val; |
| 371 | else if (op == TOK_OR) | 388 | else if (op == TOK_OR) |
| 372 | rez = right_side_val || rez; | 389 | rez = right_side_val || rez; |
| @@ -394,9 +411,9 @@ arith_apply(arith_state_t *math_state, operator op, var_or_num_t *numstack, var_ | |||
| 394 | rez = (rez <= right_side_val); | 411 | rez = (rez <= right_side_val); |
| 395 | else if (op == TOK_MUL || op == TOK_MUL_ASSIGN) | 412 | else if (op == TOK_MUL || op == TOK_MUL_ASSIGN) |
| 396 | rez *= right_side_val; | 413 | rez *= right_side_val; |
| 397 | else if (op == TOK_ADD || op == TOK_PLUS_ASSIGN) | 414 | else if (op == TOK_ADD || op == TOK_ADD_ASSIGN) |
| 398 | rez += right_side_val; | 415 | rez += right_side_val; |
| 399 | else if (op == TOK_SUB || op == TOK_MINUS_ASSIGN) | 416 | else if (op == TOK_SUB || op == TOK_SUB_ASSIGN) |
| 400 | rez -= right_side_val; | 417 | rez -= right_side_val; |
| 401 | else if (op == TOK_ASSIGN || op == TOK_COMMA) | 418 | else if (op == TOK_ASSIGN || op == TOK_COMMA) |
| 402 | rez = right_side_val; | 419 | rez = right_side_val; |
| @@ -405,14 +422,26 @@ arith_apply(arith_state_t *math_state, operator op, var_or_num_t *numstack, var_ | |||
| 405 | if (right_side_val < 0) | 422 | if (right_side_val < 0) |
| 406 | return "exponent less than 0"; | 423 | return "exponent less than 0"; |
| 407 | c = 1; | 424 | c = 1; |
| 408 | while (--right_side_val >= 0) | 425 | while (right_side_val != 0) { |
| 426 | if ((right_side_val & 1) == 0) { | ||
| 427 | /* this if() block is not necessary for correctness, | ||
| 428 | * but otherwise echo $((3**999999999999999999)) | ||
| 429 | * takes a VERY LONG time | ||
| 430 | * (and it's not interruptible by ^C) | ||
| 431 | */ | ||
| 432 | rez *= rez; | ||
| 433 | right_side_val >>= 1; | ||
| 434 | } | ||
| 409 | c *= rez; | 435 | c *= rez; |
| 436 | right_side_val--; | ||
| 437 | } | ||
| 410 | rez = c; | 438 | rez = c; |
| 411 | } | 439 | } |
| 412 | else if (right_side_val == 0) | 440 | else /*if (op == TOK_DIV || op == TOK_DIV_ASSIGN |
| 413 | return "divide by zero"; | 441 | || op == TOK_REM || op == TOK_REM_ASSIGN) - always true */ |
| 414 | else if (op == TOK_DIV || op == TOK_DIV_ASSIGN | 442 | { |
| 415 | || op == TOK_REM || op == TOK_REM_ASSIGN) { | 443 | if (right_side_val == 0) |
| 444 | return "divide by zero"; | ||
| 416 | /* | 445 | /* |
| 417 | * bash 4.2.45 x86 64bit: SEGV on 'echo $((2**63 / -1))' | 446 | * bash 4.2.45 x86 64bit: SEGV on 'echo $((2**63 / -1))' |
| 418 | * | 447 | * |
| @@ -424,42 +453,53 @@ arith_apply(arith_state_t *math_state, operator op, var_or_num_t *numstack, var_ | |||
| 424 | * Make sure to at least not SEGV here: | 453 | * Make sure to at least not SEGV here: |
| 425 | */ | 454 | */ |
| 426 | if (right_side_val == -1 | 455 | if (right_side_val == -1 |
| 427 | && rez << 1 == 0 /* MAX_NEGATIVE_INT or 0 */ | 456 | && (rez << 1) == 0 /* MAX_NEGATIVE_INT or 0 */ |
| 428 | ) { | 457 | ) { |
| 429 | right_side_val = 1; | 458 | right_side_val = 1; |
| 430 | } | 459 | } |
| 431 | if (op == TOK_DIV || op == TOK_DIV_ASSIGN) | 460 | if (op & (DIV_ID1 << ID_SHIFT)) /* DIV or DIV_ASSIGN? */ |
| 432 | rez /= right_side_val; | 461 | rez /= right_side_val; |
| 433 | else { | 462 | else |
| 434 | rez %= right_side_val; | 463 | rez %= right_side_val; |
| 435 | } | ||
| 436 | } | 464 | } |
| 437 | } | 465 | } |
| 438 | 466 | ||
| 467 | if (math_state->evaluation_disabled) { | ||
| 468 | dbg("unary op %02x skipped", op); | ||
| 469 | return NULL; | ||
| 470 | } | ||
| 471 | |||
| 439 | if (is_assign_op(op)) { | 472 | if (is_assign_op(op)) { |
| 440 | char buf[sizeof(arith_t)*3 + 2]; | 473 | char buf[sizeof(arith_t)*3 + 2]; |
| 441 | 474 | ||
| 442 | if (top_of_stack->var == NULL) { | 475 | if (NOT_NAME(top_of_stack->var_name)) { |
| 443 | /* Hmm, 1=2 ? */ | 476 | /* Hmm, 1=2 ? */ |
| 444 | goto err; | 477 | goto syntax_err; |
| 445 | } | 478 | } |
| 446 | /* Save to shell variable */ | 479 | /* Save to shell variable */ |
| 447 | sprintf(buf, ARITH_FMT, rez); | 480 | sprintf(buf, ARITH_FMT, rez); |
| 448 | math_state->setvar(top_of_stack->var, buf); | 481 | { |
| 449 | /* After saving, make previous value for v++ or v-- */ | 482 | char *e = (char*)endofname(top_of_stack->var_name); |
| 450 | if (op == TOK_POST_INC) | 483 | char c = *e; |
| 451 | rez--; | 484 | *e = '\0'; |
| 452 | if (op == TOK_POST_DEC) | 485 | math_state->setvar(top_of_stack->var_name, buf); |
| 453 | rez++; | 486 | *e = c; |
| 487 | } | ||
| 488 | /* VAR++ or VAR--? */ | ||
| 489 | if (PREC(op) == PREC_POST) { | ||
| 490 | /* Do not store new value to stack (keep old value) */ | ||
| 491 | goto ret_NULL; | ||
| 492 | } | ||
| 454 | } | 493 | } |
| 455 | 494 | ret_rez: | |
| 456 | top_of_stack->val = rez; | 495 | top_of_stack->val = rez; |
| 496 | ret_NULL: | ||
| 457 | /* Erase var name, it is just a number now */ | 497 | /* Erase var name, it is just a number now */ |
| 458 | top_of_stack->var = NULL; | 498 | top_of_stack->var_name = NULL; |
| 459 | return NULL; | 499 | return NULL; |
| 460 | err: | 500 | syntax_err: |
| 461 | return "arithmetic syntax error"; | 501 | return "arithmetic syntax error"; |
| 462 | #undef NUMPTR | 502 | #undef NUMSTACKPTR |
| 463 | } | 503 | } |
| 464 | 504 | ||
| 465 | /* longest must be first */ | 505 | /* longest must be first */ |
| @@ -479,8 +519,8 @@ static const char op_tokens[] ALIGN1 = { | |||
| 479 | '*','=', 0, TOK_MUL_ASSIGN, | 519 | '*','=', 0, TOK_MUL_ASSIGN, |
| 480 | '/','=', 0, TOK_DIV_ASSIGN, | 520 | '/','=', 0, TOK_DIV_ASSIGN, |
| 481 | '%','=', 0, TOK_REM_ASSIGN, | 521 | '%','=', 0, TOK_REM_ASSIGN, |
| 482 | '+','=', 0, TOK_PLUS_ASSIGN, | 522 | '+','=', 0, TOK_ADD_ASSIGN, |
| 483 | '-','=', 0, TOK_MINUS_ASSIGN, | 523 | '-','=', 0, TOK_SUB_ASSIGN, |
| 484 | '-','-', 0, TOK_POST_DEC, | 524 | '-','-', 0, TOK_POST_DEC, |
| 485 | '^','=', 0, TOK_XOR_ASSIGN, | 525 | '^','=', 0, TOK_XOR_ASSIGN, |
| 486 | '+','+', 0, TOK_POST_INC, | 526 | '+','+', 0, TOK_POST_INC, |
| @@ -497,7 +537,6 @@ static const char op_tokens[] ALIGN1 = { | |||
| 497 | '+', 0, TOK_ADD, | 537 | '+', 0, TOK_ADD, |
| 498 | '-', 0, TOK_SUB, | 538 | '-', 0, TOK_SUB, |
| 499 | '^', 0, TOK_BXOR, | 539 | '^', 0, TOK_BXOR, |
| 500 | /* uniq */ | ||
| 501 | '~', 0, TOK_BNOT, | 540 | '~', 0, TOK_BNOT, |
| 502 | ',', 0, TOK_COMMA, | 541 | ',', 0, TOK_COMMA, |
| 503 | '?', 0, TOK_CONDITIONAL, | 542 | '?', 0, TOK_CONDITIONAL, |
| @@ -506,41 +545,26 @@ static const char op_tokens[] ALIGN1 = { | |||
| 506 | '(', 0, TOK_LPAREN, | 545 | '(', 0, TOK_LPAREN, |
| 507 | 0 | 546 | 0 |
| 508 | }; | 547 | }; |
| 509 | #define ptr_to_rparen (&op_tokens[sizeof(op_tokens)-7]) | 548 | #define END_POINTER (&op_tokens[sizeof(op_tokens)-1]) |
| 510 | 549 | ||
| 511 | #if ENABLE_FEATURE_SH_MATH_BASE | 550 | #if ENABLE_FEATURE_SH_MATH_BASE |
| 512 | static arith_t strto_arith_t(const char *nptr, char **endptr) | 551 | static arith_t parse_with_base(const char *nptr, char **endptr, unsigned base) |
| 513 | { | 552 | { |
| 514 | unsigned base; | 553 | arith_t n = 0; |
| 515 | arith_t n; | 554 | const char *start = nptr; |
| 516 | |||
| 517 | # if ENABLE_FEATURE_SH_MATH_64 | ||
| 518 | n = strtoull(nptr, endptr, 0); | ||
| 519 | # else | ||
| 520 | n = strtoul(nptr, endptr, 0); | ||
| 521 | # endif | ||
| 522 | if (**endptr != '#' | ||
| 523 | || (*nptr < '1' || *nptr > '9') | ||
| 524 | || (n < 2 || n > 64) | ||
| 525 | ) { | ||
| 526 | return n; | ||
| 527 | } | ||
| 528 | 555 | ||
| 529 | /* It's "N#nnnn" or "NN#nnnn" syntax, NN can't start with 0, | ||
| 530 | * NN is in 2..64 range. | ||
| 531 | */ | ||
| 532 | base = (unsigned)n; | ||
| 533 | n = 0; | ||
| 534 | nptr = *endptr + 1; | ||
| 535 | for (;;) { | 556 | for (;;) { |
| 536 | unsigned digit = (unsigned)*nptr - '0'; | 557 | unsigned digit = (unsigned)*nptr - '0'; |
| 537 | if (digit >= 10 /* not 0..9 */ | 558 | if (digit >= 10 /* not 0..9 */ |
| 538 | && digit <= 'z' - '0' /* needed to reject e.g. $((64#~)) */ | 559 | && digit <= 'z' - '0' /* reject e.g. $((64#~)) */ |
| 539 | ) { | 560 | ) { |
| 540 | /* in bases up to 36, case does not matter for a-z */ | 561 | /* current char is one of :;<=>?@A..Z[\]^_`a..z */ |
| 562 | |||
| 563 | /* in bases up to 36, case does not matter for a-z, | ||
| 564 | * map @A..Z and `a..z to 9..35: */ | ||
| 541 | digit = (unsigned)(*nptr | 0x20) - ('a' - 10); | 565 | digit = (unsigned)(*nptr | 0x20) - ('a' - 10); |
| 542 | if (base > 36 && *nptr <= '_') { | 566 | if (base > 36 && *nptr <= '_') { |
| 543 | /* otherwise, A-Z,@,_ are 36-61,62,63 */ | 567 | /* base > 36: A-Z,@,_ are 36-61,62,63 */ |
| 544 | if (*nptr == '_') | 568 | if (*nptr == '_') |
| 545 | digit = 63; | 569 | digit = 63; |
| 546 | else if (*nptr == '@') | 570 | else if (*nptr == '@') |
| @@ -551,8 +575,8 @@ static arith_t strto_arith_t(const char *nptr, char **endptr) | |||
| 551 | break; /* error: one of [\]^ */ | 575 | break; /* error: one of [\]^ */ |
| 552 | } | 576 | } |
| 553 | //bb_error_msg("ch:'%c'%d digit:%u", *nptr, *nptr, digit); | 577 | //bb_error_msg("ch:'%c'%d digit:%u", *nptr, *nptr, digit); |
| 554 | //if (digit < 10) - example where we need this? | 578 | if (digit < 10) /* reject e.g. $((36#@)) */ |
| 555 | // break; | 579 | break; |
| 556 | } | 580 | } |
| 557 | if (digit >= base) | 581 | if (digit >= base) |
| 558 | break; | 582 | break; |
| @@ -560,15 +584,55 @@ static arith_t strto_arith_t(const char *nptr, char **endptr) | |||
| 560 | n = n * base + digit; | 584 | n = n * base + digit; |
| 561 | nptr++; | 585 | nptr++; |
| 562 | } | 586 | } |
| 563 | /* Note: we do not set errno on bad chars, we just set a pointer | ||
| 564 | * to the first invalid char. For example, this allows | ||
| 565 | * "N#" (empty "nnnn" part): 64#+1 is a valid expression, | ||
| 566 | * it means 64# + 1, whereas 64#~... is not, since ~ is not a valid | ||
| 567 | * operator. | ||
| 568 | */ | ||
| 569 | *endptr = (char*)nptr; | 587 | *endptr = (char*)nptr; |
| 588 | /* "64#" and "64#+1" used to be valid expressions, but bash 5.2.15 | ||
| 589 | * no longer allow such, detect this: | ||
| 590 | */ | ||
| 591 | // NB: bash allows $((0x)), this is probably a bug... | ||
| 592 | if (nptr == start) | ||
| 593 | *endptr = NULL; /* there weren't any digits, bad */ | ||
| 570 | return n; | 594 | return n; |
| 571 | } | 595 | } |
| 596 | |||
| 597 | static arith_t strto_arith_t(const char *nptr, char **endptr) | ||
| 598 | { | ||
| 599 | /* NB: we do not use strtoull here to be bash-compatible: | ||
| 600 | * $((99999999999999999999)) is 7766279631452241919 | ||
| 601 | * (the 64-bit truncated value). | ||
| 602 | */ | ||
| 603 | unsigned base; | ||
| 604 | |||
| 605 | /* nptr[0] is '0'..'9' here */ | ||
| 606 | |||
| 607 | base = nptr[0] - '0'; | ||
| 608 | if (base == 0) { /* nptr[0] is '0' */ | ||
| 609 | base = 8; | ||
| 610 | if ((nptr[1] | 0x20) == 'x') { | ||
| 611 | base = 16; | ||
| 612 | nptr += 2; | ||
| 613 | } | ||
| 614 | // NB: bash allows $((0x)), this is probably a bug... | ||
| 615 | return parse_with_base(nptr, endptr, base); | ||
| 616 | } | ||
| 617 | |||
| 618 | /* base is 1..9 here */ | ||
| 619 | |||
| 620 | if (nptr[1] == '#') { | ||
| 621 | if (base > 1) | ||
| 622 | return parse_with_base(nptr + 2, endptr, base); | ||
| 623 | /* else: "1#NN", bash says "invalid arithmetic base" */ | ||
| 624 | } | ||
| 625 | |||
| 626 | if (isdigit(nptr[1]) && nptr[2] == '#') { | ||
| 627 | base = 10 * base + (nptr[1] - '0'); | ||
| 628 | /* base is at least 10 here */ | ||
| 629 | if (base <= 64) | ||
| 630 | return parse_with_base(nptr + 3, endptr, base); | ||
| 631 | /* else: bash says "invalid arithmetic base" */ | ||
| 632 | } | ||
| 633 | |||
| 634 | return parse_with_base(nptr, endptr, 10); | ||
| 635 | } | ||
| 572 | #else /* !ENABLE_FEATURE_SH_MATH_BASE */ | 636 | #else /* !ENABLE_FEATURE_SH_MATH_BASE */ |
| 573 | # if ENABLE_FEATURE_SH_MATH_64 | 637 | # if ENABLE_FEATURE_SH_MATH_64 |
| 574 | # define strto_arith_t(nptr, endptr) strtoull(nptr, endptr, 0) | 638 | # define strto_arith_t(nptr, endptr) strtoull(nptr, endptr, 0) |
| @@ -580,23 +644,52 @@ static arith_t strto_arith_t(const char *nptr, char **endptr) | |||
| 580 | static arith_t | 644 | static arith_t |
| 581 | evaluate_string(arith_state_t *math_state, const char *expr) | 645 | evaluate_string(arith_state_t *math_state, const char *expr) |
| 582 | { | 646 | { |
| 647 | /* Stack of integers/names */ | ||
| 648 | var_or_num_t *numstack, *numstackptr; | ||
| 649 | /* Stack of operator tokens */ | ||
| 650 | operator *opstack, *opstackptr; | ||
| 651 | /* To detect whether we are after a "value": */ | ||
| 583 | operator lasttok; | 652 | operator lasttok; |
| 653 | /* To insert implicit () in ?: ternary op: */ | ||
| 654 | operator insert_op = 0xff; | ||
| 655 | unsigned ternary_level = 0; | ||
| 584 | const char *errmsg; | 656 | const char *errmsg; |
| 585 | const char *start_expr = expr = skip_whitespace(expr); | 657 | const char *start_expr = expr = skip_whitespace(expr); |
| 586 | unsigned expr_len = strlen(expr) + 2; | 658 | |
| 587 | /* Stack of integers */ | 659 | { |
| 588 | /* The proof that there can be no more than strlen(startbuf)/2+1 | 660 | unsigned expr_len = strlen(expr); |
| 589 | * integers in any given correct or incorrect expression | 661 | /* If LOTS of whitespace, do not blow up the estimation */ |
| 590 | * is left as an exercise to the reader. */ | 662 | const char *p = expr; |
| 591 | var_or_num_t *const numstack = alloca((expr_len / 2) * sizeof(numstack[0])); | 663 | while (*p) { |
| 592 | var_or_num_t *numstackptr = numstack; | 664 | /* in a run of whitespace, count only 1st char */ |
| 593 | /* Stack of operator tokens */ | 665 | if (isspace(*p)) { |
| 594 | operator *const stack = alloca(expr_len * sizeof(stack[0])); | 666 | while (p++, isspace(*p)) |
| 595 | operator *stackptr = stack; | 667 | expr_len--; |
| 668 | } else { | ||
| 669 | p++; | ||
| 670 | } | ||
| 671 | } | ||
| 672 | dbg("expr:'%s' expr_len:%u", expr, expr_len); | ||
| 673 | /* expr_len deep opstack is needed. Think "------------7". | ||
| 674 | * Only "?" operator temporarily needs two opstack slots | ||
| 675 | * (IOW: more than one slot), but its second slot (LPAREN) | ||
| 676 | * is popped off when ":" is reached. | ||
| 677 | */ | ||
| 678 | expr_len++; /* +1 for 1st LPAREN. See what $((1?)) pushes to opstack */ | ||
| 679 | opstackptr = opstack = alloca(expr_len * sizeof(opstack[0])); | ||
| 680 | /* There can be no more than (expr_len/2 + 1) | ||
| 681 | * integers/names in any given correct or incorrect expression. | ||
| 682 | * (modulo "09", "0v" cases where 2 chars are 2 ints/names, | ||
| 683 | * but we have code to detect that early) | ||
| 684 | */ | ||
| 685 | expr_len = (expr_len / 2) | ||
| 686 | + 1 /* "1+2" has two nums, 2 = len/2+1, NOT len/2 */; | ||
| 687 | numstackptr = numstack = alloca(expr_len * sizeof(numstack[0])); | ||
| 688 | } | ||
| 596 | 689 | ||
| 597 | /* Start with a left paren */ | 690 | /* Start with a left paren */ |
| 598 | *stackptr++ = lasttok = TOK_LPAREN; | 691 | dbg("(%d) op:TOK_LPAREN", (int)(opstackptr - opstack)); |
| 599 | errmsg = NULL; | 692 | *opstackptr++ = lasttok = TOK_LPAREN; |
| 600 | 693 | ||
| 601 | while (1) { | 694 | while (1) { |
| 602 | const char *p; | 695 | const char *p; |
| @@ -607,8 +700,7 @@ evaluate_string(arith_state_t *math_state, const char *expr) | |||
| 607 | if (*expr == '\0') { | 700 | if (*expr == '\0') { |
| 608 | if (expr == start_expr) { | 701 | if (expr == start_expr) { |
| 609 | /* Null expression */ | 702 | /* Null expression */ |
| 610 | numstack->val = 0; | 703 | return 0; |
| 611 | goto ret; | ||
| 612 | } | 704 | } |
| 613 | 705 | ||
| 614 | /* This is only reached after all tokens have been extracted from the | 706 | /* This is only reached after all tokens have been extracted from the |
| @@ -616,46 +708,71 @@ evaluate_string(arith_state_t *math_state, const char *expr) | |||
| 616 | * are to be applied in order. At the end, there should be a final | 708 | * are to be applied in order. At the end, there should be a final |
| 617 | * result on the integer stack */ | 709 | * result on the integer stack */ |
| 618 | 710 | ||
| 619 | if (expr != ptr_to_rparen + 1) { | 711 | if (expr != END_POINTER) { |
| 620 | /* If we haven't done so already, | 712 | /* If we haven't done so already, |
| 621 | * append a closing right paren | 713 | * append a closing right paren |
| 622 | * and let the loop process it */ | 714 | * and let the loop process it */ |
| 623 | expr = ptr_to_rparen; | 715 | expr = END_POINTER; |
| 624 | //bb_error_msg("expr=')'"); | 716 | op = TOK_RPAREN; |
| 625 | continue; | 717 | goto tok_found1; |
| 626 | } | 718 | } |
| 627 | /* At this point, we're done with the expression */ | 719 | /* At this point, we're done with the expression */ |
| 628 | if (numstackptr != numstack + 1) { | 720 | if (numstackptr != numstack + 1) { |
| 629 | /* ...but if there isn't, it's bad */ | 721 | /* if there is not exactly one result, it's bad */ |
| 630 | goto err; | 722 | /* Example: $((1 2)) */ |
| 723 | goto syntax_err; | ||
| 631 | } | 724 | } |
| 632 | goto ret; | 725 | return numstack->val; |
| 633 | } | 726 | } |
| 634 | 727 | ||
| 635 | p = endofname(expr); | 728 | p = endofname(expr); |
| 636 | if (p != expr) { | 729 | if (p != expr) { |
| 637 | /* Name */ | 730 | /* Name */ |
| 638 | size_t var_name_size = (p - expr) + 1; /* +1 for NUL */ | 731 | if (!math_state->evaluation_disabled) { |
| 639 | numstackptr->var = alloca(var_name_size); | 732 | numstackptr->var_name = expr; |
| 640 | safe_strncpy(numstackptr->var, expr, var_name_size); | 733 | dbg("[%d] var:'%.*s'", (int)(numstackptr - numstack), (int)(p - expr), expr); |
| 641 | //bb_error_msg("var:'%s'", numstackptr->var); | 734 | expr = skip_whitespace(p); |
| 642 | expr = p; | 735 | /* If it is not followed by "=" operator... */ |
| 643 | num: | 736 | if (expr[0] != '=' /* not "=..." */ |
| 644 | numstackptr->second_val_present = 0; | 737 | || expr[1] == '=' /* or "==..." */ |
| 738 | ) { | ||
| 739 | /* Evaluate variable to value */ | ||
| 740 | arith_t val = arith_lookup_val(math_state, numstackptr->var_name, (char*)p); | ||
| 741 | if (math_state->errmsg) | ||
| 742 | return val; /* -1 */ | ||
| 743 | numstackptr->val = val; | ||
| 744 | } | ||
| 745 | } else { | ||
| 746 | dbg("[%d] var:IGNORED", (int)(numstackptr - numstack)); | ||
| 747 | expr = p; | ||
| 748 | numstackptr->var_name = NULL; /* not needed, paranoia */ | ||
| 749 | numstackptr->val = 0; /* not needed, paranoia */ | ||
| 750 | } | ||
| 751 | push_value: | ||
| 645 | numstackptr++; | 752 | numstackptr++; |
| 646 | lasttok = TOK_NUM; | 753 | lasttok = TOK_VALUE; |
| 647 | continue; | 754 | continue; |
| 648 | } | 755 | } |
| 649 | 756 | ||
| 650 | if (isdigit(*expr)) { | 757 | if (isdigit(*expr)) { |
| 651 | /* Number */ | 758 | /* Number */ |
| 652 | numstackptr->var = NULL; | 759 | char *end; |
| 653 | errno = 0; | 760 | numstackptr->var_name = NULL; |
| 654 | numstackptr->val = strto_arith_t(expr, (char**) &expr); | 761 | /* code is smaller compared to using &expr here: */ |
| 655 | //bb_error_msg("val:%lld", numstackptr->val); | 762 | numstackptr->val = strto_arith_t(expr, &end); |
| 656 | if (errno) | 763 | expr = end; |
| 657 | numstackptr->val = 0; /* bash compat */ | 764 | dbg("[%d] val:%lld", (int)(numstackptr - numstack), numstackptr->val); |
| 658 | goto num; | 765 | if (!expr) /* example: $((10#)) */ |
| 766 | goto syntax_err; | ||
| 767 | /* A number can't be followed by another number, or a variable name. | ||
| 768 | * We'd catch this later anyway, but this would require numstack[] | ||
| 769 | * to be ~twice as deep to handle strings where _every_ char is | ||
| 770 | * a new number or name. | ||
| 771 | * Examples: "09" is two numbers, "0v" is number and name. | ||
| 772 | */ | ||
| 773 | if (isalnum(*expr) || *expr == '_') | ||
| 774 | goto syntax_err; | ||
| 775 | goto push_value; | ||
| 659 | } | 776 | } |
| 660 | 777 | ||
| 661 | /* Should be an operator */ | 778 | /* Should be an operator */ |
| @@ -671,10 +788,11 @@ evaluate_string(arith_state_t *math_state, const char *expr) | |||
| 671 | if ((expr[0] == '+' || expr[0] == '-') | 788 | if ((expr[0] == '+' || expr[0] == '-') |
| 672 | && (expr[1] == expr[0]) | 789 | && (expr[1] == expr[0]) |
| 673 | ) { | 790 | ) { |
| 674 | if (numstackptr == numstack || !numstackptr[-1].var) { /* not a VAR++ */ | 791 | if (numstackptr == numstack || NOT_NAME(numstackptr[-1].var_name)) { |
| 792 | /* not a VAR++ */ | ||
| 675 | char next = skip_whitespace(expr + 2)[0]; | 793 | char next = skip_whitespace(expr + 2)[0]; |
| 676 | if (!(isalpha(next) || next == '_')) { /* not a ++VAR */ | 794 | if (!(isalpha(next) || next == '_')) { |
| 677 | //bb_error_msg("special %c%c", expr[0], expr[0]); | 795 | /* not a ++VAR */ |
| 678 | op = (expr[0] == '+' ? TOK_ADD : TOK_SUB); | 796 | op = (expr[0] == '+' ? TOK_ADD : TOK_SUB); |
| 679 | expr++; | 797 | expr++; |
| 680 | goto tok_found1; | 798 | goto tok_found1; |
| @@ -704,27 +822,41 @@ evaluate_string(arith_state_t *math_state, const char *expr) | |||
| 704 | if (*p == '\0') { | 822 | if (*p == '\0') { |
| 705 | /* No next element, operator not found */ | 823 | /* No next element, operator not found */ |
| 706 | //math_state->syntax_error_at = expr; | 824 | //math_state->syntax_error_at = expr; |
| 707 | goto err; | 825 | goto syntax_err; |
| 708 | } | 826 | } |
| 709 | } | 827 | } |
| 828 | /* NB: expr now points past the operator */ | ||
| 710 | tok_found: | 829 | tok_found: |
| 711 | op = p[1]; /* fetch TOK_foo value */ | 830 | op = p[1]; /* fetch TOK_foo value */ |
| 712 | tok_found1: | ||
| 713 | /* NB: expr now points past the operator */ | ||
| 714 | 831 | ||
| 715 | /* post grammar: a++ reduce to num */ | 832 | /* Special rule for "? EXPR :" |
| 716 | if (lasttok == TOK_POST_INC || lasttok == TOK_POST_DEC) | 833 | * "EXPR in the middle of ? : is parsed as if parenthesized" |
| 717 | lasttok = TOK_NUM; | 834 | * (this quirk originates in C grammar, I think). |
| 835 | */ | ||
| 836 | if (op == TOK_CONDITIONAL) { | ||
| 837 | insert_op = TOK_LPAREN; | ||
| 838 | dbg("insert_op=%02x", insert_op); | ||
| 839 | } | ||
| 840 | if (op == TOK_CONDITIONAL_SEP) { | ||
| 841 | insert_op = op; | ||
| 842 | op = TOK_RPAREN; | ||
| 843 | dbg("insert_op=%02x op=%02x", insert_op, op); | ||
| 844 | } | ||
| 845 | tok_found1: | ||
| 846 | /* NAME++ is a "value" (something suitable for a binop) */ | ||
| 847 | if (PREC(lasttok) == PREC_POST) | ||
| 848 | lasttok = TOK_VALUE; | ||
| 718 | 849 | ||
| 719 | /* Plus and minus are binary (not unary) _only_ if the last | 850 | /* Plus and minus are binary (not unary) _only_ if the last |
| 720 | * token was a number, or a right paren (which pretends to be | 851 | * token was a "value". Think about it. It makes sense. |
| 721 | * a number, since it evaluates to one). Think about it. | 852 | */ |
| 722 | * It makes sense. */ | 853 | if (lasttok != TOK_VALUE) { |
| 723 | if (lasttok != TOK_NUM) { | ||
| 724 | switch (op) { | 854 | switch (op) { |
| 725 | case TOK_ADD: | 855 | case TOK_ADD: |
| 726 | op = TOK_UPLUS; | 856 | //op = TOK_UPLUS; |
| 727 | break; | 857 | //break; |
| 858 | /* Unary plus does nothing, do not even push it to opstack */ | ||
| 859 | continue; | ||
| 728 | case TOK_SUB: | 860 | case TOK_SUB: |
| 729 | op = TOK_UMINUS; | 861 | op = TOK_UMINUS; |
| 730 | break; | 862 | break; |
| @@ -744,80 +876,137 @@ evaluate_string(arith_state_t *math_state, const char *expr) | |||
| 744 | * stack until we find an operator with a lesser priority than the | 876 | * stack until we find an operator with a lesser priority than the |
| 745 | * one we have just extracted. If op is right-associative, | 877 | * one we have just extracted. If op is right-associative, |
| 746 | * then stop "applying" on the equal priority too. | 878 | * then stop "applying" on the equal priority too. |
| 747 | * Left paren is given the lowest priority so it will never be | 879 | * Left paren will never be "applied" in this way. |
| 748 | * "applied" in this way. | ||
| 749 | */ | 880 | */ |
| 750 | prec = PREC(op); | 881 | prec = PREC(op); |
| 751 | //bb_error_msg("prec:%02x", prec); | 882 | if (prec != PREC_LPAREN && prec < UNARYPREC) { |
| 752 | if ((prec > 0 && prec < UNARYPREC) || prec == SPEC_PREC) { | 883 | /* Binary, ternary or RPAREN */ |
| 753 | /* not left paren or unary */ | 884 | if (lasttok != TOK_VALUE) { |
| 754 | if (lasttok != TOK_NUM) { | 885 | /* Must be preceded by a value. |
| 755 | /* binary op must be preceded by a num */ | 886 | * $((2 2 + * 3)) would be accepted without this. |
| 756 | goto err; | 887 | */ |
| 888 | goto syntax_err; | ||
| 757 | } | 889 | } |
| 758 | /* The algorithm employed here is simple: while we don't | 890 | /* if op is RPAREN: |
| 759 | * hit an open paren nor the bottom of the stack, pop | 891 | * while opstack is not empty: |
| 760 | * tokens and apply them */ | 892 | * pop prev_op |
| 761 | while (stackptr != stack) { | 893 | * if prev_op is LPAREN (finished evaluating (EXPR)): |
| 762 | operator prev_op = *--stackptr; | 894 | * goto N |
| 895 | * evaluate prev_op on top of numstack | ||
| 896 | * BUG (unpaired RPAREN) | ||
| 897 | * else (op is not RPAREN): | ||
| 898 | * while opstack is not empty: | ||
| 899 | * pop prev_op | ||
| 900 | * if can't evaluate prev_op (it is lower precedence than op): | ||
| 901 | * push prev_op back | ||
| 902 | * goto C | ||
| 903 | * evaluate prev_op on top of numstack | ||
| 904 | * C:if op is "?": check result, set disable flag if needed | ||
| 905 | * push op | ||
| 906 | * N:loop to parse the rest of string | ||
| 907 | */ | ||
| 908 | while (opstackptr != opstack) { | ||
| 909 | operator prev_op = *--opstackptr; | ||
| 763 | if (op == TOK_RPAREN) { | 910 | if (op == TOK_RPAREN) { |
| 764 | //bb_error_msg("op == TOK_RPAREN"); | ||
| 765 | if (prev_op == TOK_LPAREN) { | 911 | if (prev_op == TOK_LPAREN) { |
| 766 | //bb_error_msg("prev_op == TOK_LPAREN"); | 912 | /* Erase var name: for example, (VAR) = 1 is not valid */ |
| 767 | //bb_error_msg(" %p %p numstackptr[-1].var:'%s'", numstack, numstackptr-1, numstackptr[-1].var); | 913 | numstackptr[-1].var_name = NULL; |
| 768 | if (numstackptr[-1].var) { | 914 | /* (EXPR) is a "value": next operator directly after |
| 769 | /* Expression is (var), lookup now */ | 915 | * close paren should be considered binary |
| 770 | errmsg = arith_lookup_val(math_state, &numstackptr[-1]); | 916 | */ |
| 771 | if (errmsg) | 917 | lasttok = TOK_VALUE; |
| 772 | goto err_with_custom_msg; | ||
| 773 | /* Erase var name: (var) is just a number, for example, (var) = 1 is not valid */ | ||
| 774 | numstackptr[-1].var = NULL; | ||
| 775 | } | ||
| 776 | /* Any operator directly after a | ||
| 777 | * close paren should consider itself binary */ | ||
| 778 | lasttok = TOK_NUM; | ||
| 779 | goto next; | 918 | goto next; |
| 780 | } | 919 | } |
| 781 | //bb_error_msg("prev_op != TOK_LPAREN"); | 920 | /* Not (y), but ...x~y). Fall through to evaluate x~y */ |
| 782 | } else { | 921 | } else { |
| 783 | operator prev_prec = PREC(prev_op); | 922 | operator prev_prec = PREC(prev_op); |
| 784 | //bb_error_msg("op != TOK_RPAREN"); | ||
| 785 | fix_assignment_prec(prec); | 923 | fix_assignment_prec(prec); |
| 786 | fix_assignment_prec(prev_prec); | 924 | fix_assignment_prec(prev_prec); |
| 787 | if (prev_prec < prec | 925 | if (prev_prec < prec |
| 788 | || (prev_prec == prec && is_right_associative(prec)) | 926 | || (prev_prec == prec && is_right_associative(prec)) |
| 789 | ) { | 927 | ) { |
| 790 | stackptr++; | 928 | /* ...x~y@. push @ on opstack */ |
| 791 | break; | 929 | opstackptr++; /* undo removal of ~ op */ |
| 930 | goto check_cond; | ||
| 792 | } | 931 | } |
| 932 | /* else: ...x~y@. Evaluate x~y, replace it on stack with result. Then repeat */ | ||
| 793 | } | 933 | } |
| 794 | //bb_error_msg("arith_apply(prev_op:%02x)", prev_op); | 934 | dbg("arith_apply(prev_op:%02x, numstack:%d)", prev_op, (int)(numstackptr - numstack)); |
| 795 | errmsg = arith_apply(math_state, prev_op, numstack, &numstackptr); | 935 | errmsg = arith_apply(math_state, prev_op, numstack, &numstackptr); |
| 796 | if (errmsg) | 936 | if (errmsg) |
| 797 | goto err_with_custom_msg; | 937 | goto err_with_custom_msg; |
| 938 | dbg(" numstack:%d val:%lld '%s'", (int)(numstackptr - numstack), numstackptr[-1].val, numstackptr[-1].var_name); | ||
| 939 | if (prev_op == TOK_CONDITIONAL_SEP) { | ||
| 940 | /* We just executed ":" */ | ||
| 941 | /* Remove "?" from opstack too, not just ":" */ | ||
| 942 | opstackptr--; | ||
| 943 | if (*opstackptr != TOK_CONDITIONAL) { | ||
| 944 | /* Example: $((1,2:3)) */ | ||
| 945 | errmsg = "malformed ?: operator"; | ||
| 946 | goto err_with_custom_msg; | ||
| 947 | } | ||
| 948 | /* Example: a=1?2:3,a. We just executed ":". | ||
| 949 | * Prevent assignment from being still disabled. | ||
| 950 | */ | ||
| 951 | if (ternary_level == math_state->evaluation_disabled) { | ||
| 952 | math_state->evaluation_disabled = 0; | ||
| 953 | dbg("':' executed: evaluation_disabled=CLEAR"); | ||
| 954 | } | ||
| 955 | ternary_level--; | ||
| 956 | } | ||
| 957 | } /* while (opstack not empty) */ | ||
| 958 | |||
| 959 | if (op == TOK_RPAREN) /* unpaired RPAREN? */ | ||
| 960 | goto syntax_err; | ||
| 961 | check_cond: | ||
| 962 | if (op == TOK_CONDITIONAL) { | ||
| 963 | /* We just now evaluated EXPR before "?". | ||
| 964 | * Should we disable evaluation now? | ||
| 965 | */ | ||
| 966 | ternary_level++; | ||
| 967 | if (numstackptr[-1].val == 0 && !math_state->evaluation_disabled) { | ||
| 968 | math_state->evaluation_disabled = ternary_level; | ||
| 969 | dbg("'?' entered: evaluation_disabled=%u", math_state->evaluation_disabled); | ||
| 970 | } | ||
| 971 | } | ||
| 972 | } /* if */ | ||
| 973 | /* else: LPAREN or UNARY: push it on opstack */ | ||
| 974 | |||
| 975 | /* Push this operator to opstack */ | ||
| 976 | dbg("(%d) op:%02x insert_op:%02x", (int)(opstackptr - opstack), op, insert_op); | ||
| 977 | *opstackptr++ = lasttok = op; | ||
| 978 | next: | ||
| 979 | if (insert_op != 0xff) { | ||
| 980 | op = insert_op; | ||
| 981 | insert_op = 0xff; | ||
| 982 | dbg("inserting %02x", op); | ||
| 983 | if (op == TOK_CONDITIONAL_SEP) { | ||
| 984 | /* The next token is ":". Toggle "do not evaluate" state */ | ||
| 985 | if (!math_state->evaluation_disabled) { | ||
| 986 | math_state->evaluation_disabled = ternary_level; | ||
| 987 | dbg("':' entered: evaluation_disabled=%u", math_state->evaluation_disabled); | ||
| 988 | } else if (ternary_level == math_state->evaluation_disabled) { | ||
| 989 | math_state->evaluation_disabled = 0; | ||
| 990 | dbg("':' entered: evaluation_disabled=CLEAR"); | ||
| 991 | } /* else: ternary_level > evaluation_disabled && evaluation_disabled != 0 */ | ||
| 992 | /* We are in nested "?:" while in outer "?:" disabled branch */ | ||
| 993 | /* do_nothing */ | ||
| 798 | } | 994 | } |
| 799 | if (op == TOK_RPAREN) | 995 | goto tok_found1; |
| 800 | goto err; | ||
| 801 | } | 996 | } |
| 802 | |||
| 803 | /* Push this operator to the stack and remember it */ | ||
| 804 | //bb_error_msg("push op:%02x", op); | ||
| 805 | *stackptr++ = lasttok = op; | ||
| 806 | next: ; | ||
| 807 | } /* while (1) */ | 997 | } /* while (1) */ |
| 808 | 998 | ||
| 809 | err: | 999 | syntax_err: |
| 810 | errmsg = "arithmetic syntax error"; | 1000 | errmsg = "arithmetic syntax error"; |
| 811 | err_with_custom_msg: | 1001 | err_with_custom_msg: |
| 812 | numstack->val = -1; | ||
| 813 | ret: | ||
| 814 | math_state->errmsg = errmsg; | 1002 | math_state->errmsg = errmsg; |
| 815 | return numstack->val; | 1003 | return -1; |
| 816 | } | 1004 | } |
| 817 | 1005 | ||
| 818 | arith_t FAST_FUNC | 1006 | arith_t FAST_FUNC |
| 819 | arith(arith_state_t *math_state, const char *expr) | 1007 | arith(arith_state_t *math_state, const char *expr) |
| 820 | { | 1008 | { |
| 1009 | math_state->evaluation_disabled = 0; | ||
| 821 | math_state->errmsg = NULL; | 1010 | math_state->errmsg = NULL; |
| 822 | math_state->list_of_recursed_names = NULL; | 1011 | math_state->list_of_recursed_names = NULL; |
| 823 | return evaluate_string(math_state, expr); | 1012 | return evaluate_string(math_state, expr); |
diff --git a/shell/math.h b/shell/math.h index a3fe51b6b..aeb3b93c3 100644 --- a/shell/math.h +++ b/shell/math.h | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | * | 6 | * |
| 7 | * See math.c for internal documentation. | 7 | * See math.c for internal documentation. |
| 8 | */ | 8 | */ |
| 9 | |||
| 10 | /* The math library has just one function: | 9 | /* The math library has just one function: |
| 11 | * | 10 | * |
| 12 | * arith_t arith(arith_state_t *state, const char *expr); | 11 | * arith_t arith(arith_state_t *state, const char *expr); |
| @@ -22,7 +21,6 @@ | |||
| 22 | * "1 + 2 + 3" | 21 | * "1 + 2 + 3" |
| 23 | * you would obviously get back 6. | 22 | * you would obviously get back 6. |
| 24 | */ | 23 | */ |
| 25 | |||
| 26 | /* To add support to a shell, you need to implement three functions: | 24 | /* To add support to a shell, you need to implement three functions: |
| 27 | * | 25 | * |
| 28 | * lookupvar() - look up and return the value of a variable | 26 | * lookupvar() - look up and return the value of a variable |
| @@ -36,28 +34,12 @@ | |||
| 36 | * setvar() - set a variable to some value | 34 | * setvar() - set a variable to some value |
| 37 | * | 35 | * |
| 38 | * If the arithmetic expansion does something like: | 36 | * If the arithmetic expansion does something like: |
| 39 | * $(( i = 1)) | 37 | * $((i = 1)) |
| 40 | * then the math code will make a call like so: | 38 | * then the math code will make a call like so: |
| 41 | * setvar("i", "1", 0); | 39 | * setvar("i", "1"); |
| 42 | * The storage for the first two parameters are not allocated, so your | 40 | * The storage for the first two parameters are not allocated, so your |
| 43 | * shell implementation will most likely need to strdup() them to save. | 41 | * shell implementation will most likely need to strdup() them to save. |
| 44 | * | ||
| 45 | * endofname() - return the end of a variable name from input | ||
| 46 | * | ||
| 47 | * The arithmetic code does not know about variable naming conventions. | ||
| 48 | * So when it is given an experession, it knows something is not numeric, | ||
| 49 | * but it is up to the shell to dictate what is a valid identifiers. | ||
| 50 | * So when it encounters something like: | ||
| 51 | * $(( some_var + 123 )) | ||
| 52 | * It will make a call like so: | ||
| 53 | * end = endofname("some_var + 123"); | ||
| 54 | * So the shell needs to scan the input string and return a pointer to the | ||
| 55 | * first non-identifier string. In this case, it should return the input | ||
| 56 | * pointer with an offset pointing to the first space. The typical | ||
| 57 | * implementation will return the offset of first char that does not match | ||
| 58 | * the regex (in C locale): ^[a-zA-Z_][a-zA-Z_0-9]* | ||
| 59 | */ | 42 | */ |
| 60 | |||
| 61 | #ifndef SHELL_MATH_H | 43 | #ifndef SHELL_MATH_H |
| 62 | #define SHELL_MATH_H 1 | 44 | #define SHELL_MATH_H 1 |
| 63 | 45 | ||
| @@ -73,14 +55,13 @@ typedef long arith_t; | |||
| 73 | 55 | ||
| 74 | typedef const char* FAST_FUNC (*arith_var_lookup_t)(const char *name); | 56 | typedef const char* FAST_FUNC (*arith_var_lookup_t)(const char *name); |
| 75 | typedef void FAST_FUNC (*arith_var_set_t)(const char *name, const char *val); | 57 | typedef void FAST_FUNC (*arith_var_set_t)(const char *name, const char *val); |
| 76 | //typedef const char* FAST_FUNC (*arith_var_endofname_t)(const char *name); | ||
| 77 | 58 | ||
| 78 | typedef struct arith_state_t { | 59 | typedef struct arith_state_t { |
| 60 | unsigned evaluation_disabled; | ||
| 79 | const char *errmsg; | 61 | const char *errmsg; |
| 62 | void *list_of_recursed_names; | ||
| 80 | arith_var_lookup_t lookupvar; | 63 | arith_var_lookup_t lookupvar; |
| 81 | arith_var_set_t setvar; | 64 | arith_var_set_t setvar; |
| 82 | // arith_var_endofname_t endofname; | ||
| 83 | void *list_of_recursed_names; | ||
| 84 | } arith_state_t; | 65 | } arith_state_t; |
| 85 | 66 | ||
| 86 | arith_t FAST_FUNC arith(arith_state_t *state, const char *expr); | 67 | arith_t FAST_FUNC arith(arith_state_t *state, const char *expr); |
diff --git a/shell/shell_common.c b/shell/shell_common.c index 657ee9969..da157ea0e 100644 --- a/shell/shell_common.c +++ b/shell/shell_common.c | |||
| @@ -22,6 +22,25 @@ | |||
| 22 | const char defifsvar[] ALIGN1 = "IFS= \t\n"; | 22 | const char defifsvar[] ALIGN1 = "IFS= \t\n"; |
| 23 | const char defoptindvar[] ALIGN1 = "OPTIND=1"; | 23 | const char defoptindvar[] ALIGN1 = "OPTIND=1"; |
| 24 | 24 | ||
| 25 | /* Compare two strings up to the first '=' or '\0'. */ | ||
| 26 | int FAST_FUNC varcmp(const char *p, const char *q) | ||
| 27 | { | ||
| 28 | int c, d; | ||
| 29 | |||
| 30 | while ((c = *p) == (d = *q)) { | ||
| 31 | if (c == '\0' || c == '=') | ||
| 32 | goto out; | ||
| 33 | p++; | ||
| 34 | q++; | ||
| 35 | } | ||
| 36 | if (c == '=') | ||
| 37 | c = '\0'; | ||
| 38 | if (d == '=') | ||
| 39 | d = '\0'; | ||
| 40 | out: | ||
| 41 | return c - d; | ||
| 42 | } | ||
| 43 | |||
| 25 | /* read builtin */ | 44 | /* read builtin */ |
| 26 | 45 | ||
| 27 | /* Needs to be interruptible: shell must handle traps and shell-special signals | 46 | /* Needs to be interruptible: shell must handle traps and shell-special signals |
| @@ -59,7 +78,7 @@ shell_builtin_read(struct builtin_read_params *params) | |||
| 59 | argv = params->argv; | 78 | argv = params->argv; |
| 60 | pp = argv; | 79 | pp = argv; |
| 61 | while (*pp) { | 80 | while (*pp) { |
| 62 | if (endofname(*pp)[0] != '\0') { | 81 | if (!*pp[0] || endofname(*pp)[0] != '\0') { |
| 63 | /* Mimic bash message */ | 82 | /* Mimic bash message */ |
| 64 | bb_error_msg("read: '%s': bad variable name", *pp); | 83 | bb_error_msg("read: '%s': bad variable name", *pp); |
| 65 | return (const char *)(uintptr_t)1; | 84 | return (const char *)(uintptr_t)1; |
diff --git a/shell/shell_common.h b/shell/shell_common.h index 7b478f1df..fab676e4a 100644 --- a/shell/shell_common.h +++ b/shell/shell_common.h | |||
| @@ -26,6 +26,8 @@ extern const char defifsvar[] ALIGN1; /* "IFS= \t\n" */ | |||
| 26 | 26 | ||
| 27 | extern const char defoptindvar[] ALIGN1; /* "OPTIND=1" */ | 27 | extern const char defoptindvar[] ALIGN1; /* "OPTIND=1" */ |
| 28 | 28 | ||
| 29 | int FAST_FUNC varcmp(const char *p, const char *q); | ||
| 30 | |||
| 29 | /* Builtins */ | 31 | /* Builtins */ |
| 30 | 32 | ||
| 31 | struct builtin_read_params { | 33 | struct builtin_read_params { |
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index df0edee0a..d4f2c0c8f 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 17 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 18 | */ | 18 | */ |
| 19 | //config:config KLOGD | 19 | //config:config KLOGD |
| 20 | //config: bool "klogd (5.7 kb)" | 20 | //config: bool "klogd (6.2 kb)" |
| 21 | //config: default y | 21 | //config: default y |
| 22 | //config: help | 22 | //config: help |
| 23 | //config: klogd is a utility which intercepts and logs all | 23 | //config: klogd is a utility which intercepts and logs all |
diff --git a/sysklogd/logger.c b/sysklogd/logger.c index 04b2c8e3b..b99e8af74 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config LOGGER | 9 | //config:config LOGGER |
| 10 | //config: bool "logger (6.3 kb)" | 10 | //config: bool "logger (6.5 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: select FEATURE_SYSLOG | 12 | //config: select FEATURE_SYSLOG |
| 13 | //config: help | 13 | //config: help |
diff --git a/sysklogd/logread.c b/sysklogd/logread.c index e6cfcf4a7..632346d28 100644 --- a/sysklogd/logread.c +++ b/sysklogd/logread.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config LOGREAD | 11 | //config:config LOGREAD |
| 12 | //config: bool "logread (4.8 kb)" | 12 | //config: bool "logread (5 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //WRONG: it should be compilable without SYSLOG=y: | 14 | //WRONG: it should be compilable without SYSLOG=y: |
| 15 | //WRONG: depends on FEATURE_IPC_SYSLOG | 15 | //WRONG: depends on FEATURE_IPC_SYSLOG |
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 6ddfd771a..83b5c0cf6 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 13 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 14 | */ | 14 | */ |
| 15 | //config:config SYSLOGD | 15 | //config:config SYSLOGD |
| 16 | //config: bool "syslogd (13 kb)" | 16 | //config: bool "syslogd (14 kb)" |
| 17 | //config: default y | 17 | //config: default y |
| 18 | //config: help | 18 | //config: help |
| 19 | //config: The syslogd utility is used to record logs of all the | 19 | //config: The syslogd utility is used to record logs of all the |
| @@ -1002,20 +1002,71 @@ static int try_to_resolve_remote(remoteHost_t *rh) | |||
| 1002 | } | 1002 | } |
| 1003 | #endif | 1003 | #endif |
| 1004 | 1004 | ||
| 1005 | static void do_syslogd(void) NORETURN; | 1005 | /* By doing init in a separate function we decrease stack usage |
| 1006 | static void do_syslogd(void) | 1006 | * in main loop. |
| 1007 | */ | ||
| 1008 | static int NOINLINE syslogd_init(char **argv) | ||
| 1007 | { | 1009 | { |
| 1010 | int opts; | ||
| 1011 | char OPTION_DECL; | ||
| 1008 | #if ENABLE_FEATURE_REMOTE_LOG | 1012 | #if ENABLE_FEATURE_REMOTE_LOG |
| 1009 | llist_t *item; | 1013 | llist_t *remoteAddrList = NULL; |
| 1010 | #endif | 1014 | #endif |
| 1011 | #if ENABLE_FEATURE_SYSLOGD_DUP | 1015 | |
| 1012 | int last_sz = -1; | 1016 | /* No non-option params */ |
| 1013 | char *last_buf; | 1017 | opts = getopt32(argv, "^"OPTION_STR"\0""=0", OPTION_PARAM); |
| 1014 | char *recvbuf = G.recvbuf; | 1018 | #if ENABLE_FEATURE_REMOTE_LOG |
| 1015 | #else | 1019 | while (remoteAddrList) { |
| 1016 | #define recvbuf (G.recvbuf) | 1020 | remoteHost_t *rh = xzalloc(sizeof(*rh)); |
| 1021 | rh->remoteHostname = llist_pop(&remoteAddrList); | ||
| 1022 | rh->remoteFD = -1; | ||
| 1023 | rh->last_dns_resolve = monotonic_sec() - DNS_WAIT_SEC - 1; | ||
| 1024 | llist_add_to(&G.remoteHosts, rh); | ||
| 1025 | } | ||
| 1026 | #endif | ||
| 1027 | |||
| 1028 | #ifdef SYSLOGD_MARK | ||
| 1029 | if (opts & OPT_mark) // -m | ||
| 1030 | G.markInterval = xatou_range(opt_m, 0, INT_MAX/60) * 60; | ||
| 1031 | #endif | ||
| 1032 | //if (opts & OPT_nofork) // -n | ||
| 1033 | //if (opts & OPT_outfile) // -O | ||
| 1034 | if (opts & OPT_loglevel) // -l | ||
| 1035 | G.logLevel = xatou_range(opt_l, 1, 8); | ||
| 1036 | //if (opts & OPT_small) // -S | ||
| 1037 | #if ENABLE_FEATURE_ROTATE_LOGFILE | ||
| 1038 | if (opts & OPT_filesize) // -s | ||
| 1039 | G.logFileSize = xatou_range(opt_s, 0, INT_MAX/1024) * 1024; | ||
| 1040 | if (opts & OPT_rotatecnt) // -b | ||
| 1041 | G.logFileRotate = xatou_range(opt_b, 0, 99); | ||
| 1042 | #endif | ||
| 1043 | #if ENABLE_FEATURE_IPC_SYSLOG | ||
| 1044 | if (opt_C) // -Cn | ||
| 1045 | G.shm_size = xatoul_range(opt_C, 4, INT_MAX/1024) * 1024; | ||
| 1046 | #endif | ||
| 1047 | /* If they have not specified remote logging, then log locally */ | ||
| 1048 | if (ENABLE_FEATURE_REMOTE_LOG && !(opts & OPT_remotelog)) // -R | ||
| 1049 | option_mask32 |= OPT_locallog; | ||
| 1050 | #if ENABLE_FEATURE_SYSLOGD_CFG | ||
| 1051 | parse_syslogdcfg(opt_f); | ||
| 1017 | #endif | 1052 | #endif |
| 1018 | 1053 | ||
| 1054 | /* Store away localhost's name before the fork */ | ||
| 1055 | G.hostname = safe_gethostname(); | ||
| 1056 | *strchrnul(G.hostname, '.') = '\0'; | ||
| 1057 | |||
| 1058 | xmove_fd(create_socket(), STDIN_FILENO); | ||
| 1059 | |||
| 1060 | if (opts & OPT_circularlog) | ||
| 1061 | ipcsyslog_init(); | ||
| 1062 | |||
| 1063 | if (opts & OPT_kmsg) | ||
| 1064 | kmsg_init(); | ||
| 1065 | |||
| 1066 | if (!(opts & OPT_nofork)) { | ||
| 1067 | bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv); | ||
| 1068 | } | ||
| 1069 | |||
| 1019 | /* Set up signal handlers (so that they interrupt read()) */ | 1070 | /* Set up signal handlers (so that they interrupt read()) */ |
| 1020 | signal_no_SA_RESTART_empty_mask(SIGTERM, record_signo); | 1071 | signal_no_SA_RESTART_empty_mask(SIGTERM, record_signo); |
| 1021 | signal_no_SA_RESTART_empty_mask(SIGINT, record_signo); | 1072 | signal_no_SA_RESTART_empty_mask(SIGINT, record_signo); |
| @@ -1025,17 +1076,33 @@ static void do_syslogd(void) | |||
| 1025 | signal(SIGALRM, do_mark); | 1076 | signal(SIGALRM, do_mark); |
| 1026 | alarm(G.markInterval); | 1077 | alarm(G.markInterval); |
| 1027 | #endif | 1078 | #endif |
| 1028 | xmove_fd(create_socket(), STDIN_FILENO); | 1079 | return opts; |
| 1080 | } | ||
| 1029 | 1081 | ||
| 1030 | if (option_mask32 & OPT_circularlog) | 1082 | int syslogd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
| 1031 | ipcsyslog_init(); | 1083 | int syslogd_main(int argc UNUSED_PARAM, char **argv) |
| 1084 | { | ||
| 1085 | int opts; | ||
| 1086 | #if ENABLE_FEATURE_REMOTE_LOG | ||
| 1087 | llist_t *item; | ||
| 1088 | #endif | ||
| 1089 | #if ENABLE_FEATURE_SYSLOGD_DUP | ||
| 1090 | int last_sz = -1; | ||
| 1091 | char *last_buf; | ||
| 1092 | char *recvbuf; | ||
| 1093 | #else | ||
| 1094 | #define recvbuf (G.recvbuf) | ||
| 1095 | #endif | ||
| 1032 | 1096 | ||
| 1033 | if (option_mask32 & OPT_kmsg) | 1097 | INIT_G(); |
| 1034 | kmsg_init(); | 1098 | opts = syslogd_init(argv); |
| 1035 | 1099 | ||
| 1036 | timestamp_and_log_internal("syslogd started: BusyBox v" BB_VER); | 1100 | timestamp_and_log_internal("syslogd started: BusyBox v" BB_VER); |
| 1037 | write_pidfile_std_path_and_ext("syslogd"); | 1101 | write_pidfile_std_path_and_ext("syslogd"); |
| 1038 | 1102 | ||
| 1103 | #if ENABLE_FEATURE_SYSLOGD_DUP | ||
| 1104 | recvbuf = G.recvbuf; | ||
| 1105 | #endif | ||
| 1039 | while (!bb_got_signal) { | 1106 | while (!bb_got_signal) { |
| 1040 | ssize_t sz; | 1107 | ssize_t sz; |
| 1041 | 1108 | ||
| @@ -1070,7 +1137,7 @@ static void do_syslogd(void) | |||
| 1070 | sz--; | 1137 | sz--; |
| 1071 | } | 1138 | } |
| 1072 | #if ENABLE_FEATURE_SYSLOGD_DUP | 1139 | #if ENABLE_FEATURE_SYSLOGD_DUP |
| 1073 | if ((option_mask32 & OPT_dup) && (sz == last_sz)) | 1140 | if ((opts & OPT_dup) && (sz == last_sz)) |
| 1074 | if (memcmp(last_buf, recvbuf, sz) == 0) | 1141 | if (memcmp(last_buf, recvbuf, sz) == 0) |
| 1075 | continue; | 1142 | continue; |
| 1076 | last_sz = sz; | 1143 | last_sz = sz; |
| @@ -1111,7 +1178,7 @@ static void do_syslogd(void) | |||
| 1111 | } | 1178 | } |
| 1112 | } | 1179 | } |
| 1113 | #endif | 1180 | #endif |
| 1114 | if (!ENABLE_FEATURE_REMOTE_LOG || (option_mask32 & OPT_locallog)) { | 1181 | if (!ENABLE_FEATURE_REMOTE_LOG || (opts & OPT_locallog)) { |
| 1115 | recvbuf[sz] = '\0'; /* ensure it *is* NUL terminated */ | 1182 | recvbuf[sz] = '\0'; /* ensure it *is* NUL terminated */ |
| 1116 | split_escape_and_log(recvbuf, sz); | 1183 | split_escape_and_log(recvbuf, sz); |
| 1117 | } | 1184 | } |
| @@ -1120,73 +1187,12 @@ static void do_syslogd(void) | |||
| 1120 | timestamp_and_log_internal("syslogd exiting"); | 1187 | timestamp_and_log_internal("syslogd exiting"); |
| 1121 | remove_pidfile_std_path_and_ext("syslogd"); | 1188 | remove_pidfile_std_path_and_ext("syslogd"); |
| 1122 | ipcsyslog_cleanup(); | 1189 | ipcsyslog_cleanup(); |
| 1123 | if (option_mask32 & OPT_kmsg) | 1190 | if (opts & OPT_kmsg) |
| 1124 | kmsg_cleanup(); | 1191 | kmsg_cleanup(); |
| 1125 | kill_myself_with_sig(bb_got_signal); | 1192 | kill_myself_with_sig(bb_got_signal); |
| 1126 | #undef recvbuf | 1193 | #undef recvbuf |
| 1127 | } | 1194 | } |
| 1128 | 1195 | ||
| 1129 | int syslogd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | ||
| 1130 | int syslogd_main(int argc UNUSED_PARAM, char **argv) | ||
| 1131 | { | ||
| 1132 | int opts; | ||
| 1133 | char OPTION_DECL; | ||
| 1134 | #if ENABLE_FEATURE_REMOTE_LOG | ||
| 1135 | llist_t *remoteAddrList = NULL; | ||
| 1136 | #endif | ||
| 1137 | |||
| 1138 | INIT_G(); | ||
| 1139 | |||
| 1140 | /* No non-option params */ | ||
| 1141 | opts = getopt32(argv, "^"OPTION_STR"\0""=0", OPTION_PARAM); | ||
| 1142 | #if ENABLE_FEATURE_REMOTE_LOG | ||
| 1143 | while (remoteAddrList) { | ||
| 1144 | remoteHost_t *rh = xzalloc(sizeof(*rh)); | ||
| 1145 | rh->remoteHostname = llist_pop(&remoteAddrList); | ||
| 1146 | rh->remoteFD = -1; | ||
| 1147 | rh->last_dns_resolve = monotonic_sec() - DNS_WAIT_SEC - 1; | ||
| 1148 | llist_add_to(&G.remoteHosts, rh); | ||
| 1149 | } | ||
| 1150 | #endif | ||
| 1151 | |||
| 1152 | #ifdef SYSLOGD_MARK | ||
| 1153 | if (opts & OPT_mark) // -m | ||
| 1154 | G.markInterval = xatou_range(opt_m, 0, INT_MAX/60) * 60; | ||
| 1155 | #endif | ||
| 1156 | //if (opts & OPT_nofork) // -n | ||
| 1157 | //if (opts & OPT_outfile) // -O | ||
| 1158 | if (opts & OPT_loglevel) // -l | ||
| 1159 | G.logLevel = xatou_range(opt_l, 1, 8); | ||
| 1160 | //if (opts & OPT_small) // -S | ||
| 1161 | #if ENABLE_FEATURE_ROTATE_LOGFILE | ||
| 1162 | if (opts & OPT_filesize) // -s | ||
| 1163 | G.logFileSize = xatou_range(opt_s, 0, INT_MAX/1024) * 1024; | ||
| 1164 | if (opts & OPT_rotatecnt) // -b | ||
| 1165 | G.logFileRotate = xatou_range(opt_b, 0, 99); | ||
| 1166 | #endif | ||
| 1167 | #if ENABLE_FEATURE_IPC_SYSLOG | ||
| 1168 | if (opt_C) // -Cn | ||
| 1169 | G.shm_size = xatoul_range(opt_C, 4, INT_MAX/1024) * 1024; | ||
| 1170 | #endif | ||
| 1171 | /* If they have not specified remote logging, then log locally */ | ||
| 1172 | if (ENABLE_FEATURE_REMOTE_LOG && !(opts & OPT_remotelog)) // -R | ||
| 1173 | option_mask32 |= OPT_locallog; | ||
| 1174 | #if ENABLE_FEATURE_SYSLOGD_CFG | ||
| 1175 | parse_syslogdcfg(opt_f); | ||
| 1176 | #endif | ||
| 1177 | |||
| 1178 | /* Store away localhost's name before the fork */ | ||
| 1179 | G.hostname = safe_gethostname(); | ||
| 1180 | *strchrnul(G.hostname, '.') = '\0'; | ||
| 1181 | |||
| 1182 | if (!(opts & OPT_nofork)) { | ||
| 1183 | bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv); | ||
| 1184 | } | ||
| 1185 | |||
| 1186 | do_syslogd(); | ||
| 1187 | /* return EXIT_SUCCESS; */ | ||
| 1188 | } | ||
| 1189 | |||
| 1190 | /* Clean up. Needed because we are included from syslogd_and_logger.c */ | 1196 | /* Clean up. Needed because we are included from syslogd_and_logger.c */ |
| 1191 | #undef DEBUG | 1197 | #undef DEBUG |
| 1192 | #undef SYSLOGD_MARK | 1198 | #undef SYSLOGD_MARK |
diff --git a/util-linux/acpid.c b/util-linux/acpid.c index 00613f8e3..5c0bb1768 100644 --- a/util-linux/acpid.c +++ b/util-linux/acpid.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config ACPID | 9 | //config:config ACPID |
| 10 | //config: bool "acpid (9 kb)" | 10 | //config: bool "acpid (9.3 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: acpid listens to ACPI events coming either in textual form from | 13 | //config: acpid listens to ACPI events coming either in textual form from |
diff --git a/util-linux/blkdiscard.c b/util-linux/blkdiscard.c index 7ac8045f9..70fd34af3 100644 --- a/util-linux/blkdiscard.c +++ b/util-linux/blkdiscard.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config BLKDISCARD | 8 | //config:config BLKDISCARD |
| 9 | //config: bool "blkdiscard (4.3 kb)" | 9 | //config: bool "blkdiscard (4.6 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: blkdiscard discards sectors on a given device. | 12 | //config: blkdiscard discards sectors on a given device. |
diff --git a/util-linux/blockdev.c b/util-linux/blockdev.c index 3b550220a..d47e43e55 100644 --- a/util-linux/blockdev.c +++ b/util-linux/blockdev.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config BLOCKDEV | 8 | //config:config BLOCKDEV |
| 9 | //config: bool "blockdev (2.3 kb)" | 9 | //config: bool "blockdev (2.6 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: Performs some ioctls with block devices. | 12 | //config: Performs some ioctls with block devices. |
diff --git a/util-linux/cal.c b/util-linux/cal.c index 522ab3476..0577c3899 100644 --- a/util-linux/cal.c +++ b/util-linux/cal.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * Major size reduction... over 50% (>1.5k) on i386. | 11 | * Major size reduction... over 50% (>1.5k) on i386. |
| 12 | */ | 12 | */ |
| 13 | //config:config CAL | 13 | //config:config CAL |
| 14 | //config: bool "cal (5.8 kb)" | 14 | //config: bool "cal (6.1 kb)" |
| 15 | //config: default y | 15 | //config: default y |
| 16 | //config: help | 16 | //config: help |
| 17 | //config: cal is used to display a monthly calendar. | 17 | //config: cal is used to display a monthly calendar. |
diff --git a/util-linux/chrt.c b/util-linux/chrt.c index be96fa426..51d08584e 100644 --- a/util-linux/chrt.c +++ b/util-linux/chrt.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config CHRT | 8 | //config:config CHRT |
| 9 | //config: bool "chrt (4.7 kb)" | 9 | //config: bool "chrt (5.1 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: Manipulate real-time attributes of a process. | 12 | //config: Manipulate real-time attributes of a process. |
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 6670b84de..5d8f01a64 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Licensed under GPLv2, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config DMESG | 11 | //config:config DMESG |
| 12 | //config: bool "dmesg (3.7 kb)" | 12 | //config: bool "dmesg (3.9 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: dmesg is used to examine or control the kernel ring buffer. When the | 15 | //config: dmesg is used to examine or control the kernel ring buffer. When the |
diff --git a/util-linux/eject.c b/util-linux/eject.c index 29b0a86bd..b9813262b 100644 --- a/util-linux/eject.c +++ b/util-linux/eject.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | * Most of the dirty work blatantly ripped off from cat.c =) | 13 | * Most of the dirty work blatantly ripped off from cat.c =) |
| 14 | */ | 14 | */ |
| 15 | //config:config EJECT | 15 | //config:config EJECT |
| 16 | //config: bool "eject (4 kb)" | 16 | //config: bool "eject (4.3 kb)" |
| 17 | //config: default y | 17 | //config: default y |
| 18 | //config: help | 18 | //config: help |
| 19 | //config: Used to eject cdroms. (defaults to /dev/cdrom) | 19 | //config: Used to eject cdroms. (defaults to /dev/cdrom) |
diff --git a/util-linux/fallocate.c b/util-linux/fallocate.c index 3935e7c9b..d5c25894d 100644 --- a/util-linux/fallocate.c +++ b/util-linux/fallocate.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Licensed under GPLv2, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 6 | */ | 6 | */ |
| 7 | //config:config FALLOCATE | 7 | //config:config FALLOCATE |
| 8 | //config: bool "fallocate (4.1 kb)" | 8 | //config: bool "fallocate (4.3 kb)" |
| 9 | //config: default y | 9 | //config: default y |
| 10 | //config: help | 10 | //config: help |
| 11 | //config: Preallocate space for files. | 11 | //config: Preallocate space for files. |
diff --git a/util-linux/fatattr.c b/util-linux/fatattr.c index afd70c45d..d8ea4553d 100644 --- a/util-linux/fatattr.c +++ b/util-linux/fatattr.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Public License | 9 | * Public License |
| 10 | */ | 10 | */ |
| 11 | //config:config FATATTR | 11 | //config:config FATATTR |
| 12 | //config: bool "fatattr (1.9 kb)" | 12 | //config: bool "fatattr (2.2 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: fatattr lists or changes the file attributes on a fat file system. | 15 | //config: fatattr lists or changes the file attributes on a fat file system. |
diff --git a/util-linux/fbset.c b/util-linux/fbset.c index 768ab80eb..7e88c8313 100644 --- a/util-linux/fbset.c +++ b/util-linux/fbset.c | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be) | 12 | * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be) |
| 13 | */ | 13 | */ |
| 14 | //config:config FBSET | 14 | //config:config FBSET |
| 15 | //config: bool "fbset (5.9 kb)" | 15 | //config: bool "fbset (6.2 kb)" |
| 16 | //config: default y | 16 | //config: default y |
| 17 | //config: help | 17 | //config: help |
| 18 | //config: fbset is used to show or change the settings of a Linux frame buffer | 18 | //config: fbset is used to show or change the settings of a Linux frame buffer |
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c index f0466fdbd..0f8743020 100644 --- a/util-linux/fdformat.c +++ b/util-linux/fdformat.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config FDFORMAT | 8 | //config:config FDFORMAT |
| 9 | //config: bool "fdformat (4.4 kb)" | 9 | //config: bool "fdformat (4.7 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: fdformat is used to low-level format a floppy disk. | 12 | //config: fdformat is used to low-level format a floppy disk. |
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index 20e7d56fa..96e2abffe 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config FDISK | 10 | //config:config FDISK |
| 11 | //config: bool "fdisk (37 kb)" | 11 | //config: bool "fdisk (31 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: The fdisk utility is used to divide hard disks into one or more | 14 | //config: The fdisk utility is used to divide hard disks into one or more |
diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c index 6c66c130d..049f0b169 100644 --- a/util-linux/fdisk_osf.c +++ b/util-linux/fdisk_osf.c | |||
| @@ -746,11 +746,12 @@ xbsd_write_bootstrap(void) | |||
| 746 | return; | 746 | return; |
| 747 | 747 | ||
| 748 | e = d + sizeof(struct xbsd_disklabel); | 748 | e = d + sizeof(struct xbsd_disklabel); |
| 749 | for (p = d; p < e; p++) | 749 | for (p = d; p < e; p++) { |
| 750 | if (*p) { | 750 | if (*p) { |
| 751 | printf("Bootstrap overlaps with disk label!\n"); | 751 | printf("Bootstrap overlaps with disk label!\n"); |
| 752 | exit(EXIT_FAILURE); | 752 | exit_FAILURE(); |
| 753 | } | 753 | } |
| 754 | } | ||
| 754 | 755 | ||
| 755 | memmove(d, &dl, sizeof(struct xbsd_disklabel)); | 756 | memmove(d, &dl, sizeof(struct xbsd_disklabel)); |
| 756 | 757 | ||
diff --git a/util-linux/findfs.c b/util-linux/findfs.c index f5621a1fa..ec0375dfb 100644 --- a/util-linux/findfs.c +++ b/util-linux/findfs.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config FINDFS | 10 | //config:config FINDFS |
| 11 | //config: bool "findfs (12 kb)" | 11 | //config: bool "findfs (11 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: select VOLUMEID | 13 | //config: select VOLUMEID |
| 14 | //config: help | 14 | //config: help |
diff --git a/util-linux/flock.c b/util-linux/flock.c index 1ed752a80..ee88be5b7 100644 --- a/util-linux/flock.c +++ b/util-linux/flock.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * This is free software, licensed under the GNU General Public License v2. | 4 | * This is free software, licensed under the GNU General Public License v2. |
| 5 | */ | 5 | */ |
| 6 | //config:config FLOCK | 6 | //config:config FLOCK |
| 7 | //config: bool "flock (6.3 kb)" | 7 | //config: bool "flock (6.5 kb)" |
| 8 | //config: default y | 8 | //config: default y |
| 9 | //config: help | 9 | //config: help |
| 10 | //config: Manage locks from shell scripts | 10 | //config: Manage locks from shell scripts |
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c index 309169d25..88f50c51a 100644 --- a/util-linux/freeramdisk.c +++ b/util-linux/freeramdisk.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Licensed under GPLv2, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config FDFLUSH | 11 | //config:config FDFLUSH |
| 12 | //config: bool "fdflush (1.3 kb)" | 12 | //config: bool "fdflush (1.6 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: fdflush is only needed when changing media on slightly-broken | 15 | //config: fdflush is only needed when changing media on slightly-broken |
| @@ -21,7 +21,7 @@ | |||
| 21 | //config: leave this disabled. | 21 | //config: leave this disabled. |
| 22 | //config: | 22 | //config: |
| 23 | //config:config FREERAMDISK | 23 | //config:config FREERAMDISK |
| 24 | //config: bool "freeramdisk (1.3 kb)" | 24 | //config: bool "freeramdisk (1.6 kb)" |
| 25 | //config: default y | 25 | //config: default y |
| 26 | //config: help | 26 | //config: help |
| 27 | //config: Linux allows you to create ramdisks. This utility allows you to | 27 | //config: Linux allows you to create ramdisks. This utility allows you to |
diff --git a/util-linux/fsfreeze.c b/util-linux/fsfreeze.c index 6e2ff0a54..66b6fd06f 100644 --- a/util-linux/fsfreeze.c +++ b/util-linux/fsfreeze.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Licensed under GPLv2, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 6 | */ | 6 | */ |
| 7 | //config:config FSFREEZE | 7 | //config:config FSFREEZE |
| 8 | //config: bool "fsfreeze (3.5 kb)" | 8 | //config: bool "fsfreeze (3.7 kb)" |
| 9 | //config: default y | 9 | //config: default y |
| 10 | //config: select LONG_OPTS | 10 | //config: select LONG_OPTS |
| 11 | //config: help | 11 | //config: help |
diff --git a/util-linux/fstrim.c b/util-linux/fstrim.c index 6d673002f..c28e67270 100644 --- a/util-linux/fstrim.c +++ b/util-linux/fstrim.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config FSTRIM | 10 | //config:config FSTRIM |
| 11 | //config: bool "fstrim (4.4 kb)" | 11 | //config: bool "fstrim (4.6 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: Discard unused blocks on a mounted filesystem. | 14 | //config: Discard unused blocks on a mounted filesystem. |
diff --git a/util-linux/getopt.c b/util-linux/getopt.c index 42e0a2730..e61d68982 100644 --- a/util-linux/getopt.c +++ b/util-linux/getopt.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | * Replaced our_malloc with xmalloc and our_realloc with xrealloc | 29 | * Replaced our_malloc with xmalloc and our_realloc with xrealloc |
| 30 | */ | 30 | */ |
| 31 | //config:config GETOPT | 31 | //config:config GETOPT |
| 32 | //config: bool "getopt (5.8 kb)" | 32 | //config: bool "getopt (6 kb)" |
| 33 | //config: default y | 33 | //config: default y |
| 34 | //config: help | 34 | //config: help |
| 35 | //config: The getopt utility is used to break up (parse) options in command | 35 | //config: The getopt utility is used to break up (parse) options in command |
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c index be4c1964f..c46ffeca7 100644 --- a/util-linux/hexdump.c +++ b/util-linux/hexdump.c | |||
| @@ -9,14 +9,14 @@ | |||
| 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config HEXDUMP | 11 | //config:config HEXDUMP |
| 12 | //config: bool "hexdump (8.6 kb)" | 12 | //config: bool "hexdump (8.7 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: The hexdump utility is used to display binary data in a readable | 15 | //config: The hexdump utility is used to display binary data in a readable |
| 16 | //config: way that is comparable to the output from most hex editors. | 16 | //config: way that is comparable to the output from most hex editors. |
| 17 | //config: | 17 | //config: |
| 18 | //config:config HD | 18 | //config:config HD |
| 19 | //config: bool "hd (7.8 kb)" | 19 | //config: bool "hd (8.3 kb)" |
| 20 | //config: default y | 20 | //config: default y |
| 21 | //config: help | 21 | //config: help |
| 22 | //config: hd is an alias to hexdump -C. | 22 | //config: hd is an alias to hexdump -C. |
diff --git a/util-linux/hexdump_xxd.c b/util-linux/hexdump_xxd.c index 636cbfeec..1e8ecb6e6 100644 --- a/util-linux/hexdump_xxd.c +++ b/util-linux/hexdump_xxd.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config XXD | 9 | //config:config XXD |
| 10 | //config: bool "xxd (8.9 kb)" | 10 | //config: bool "xxd (11 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: The xxd utility is used to display binary data in a readable | 13 | //config: The xxd utility is used to display binary data in a readable |
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index 723b09589..d78bfe374 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config HWCLOCK | 9 | //config:config HWCLOCK |
| 10 | //config: bool "hwclock (5.8 kb)" | 10 | //config: bool "hwclock (5.9 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: The hwclock utility is used to read and set the hardware clock | 13 | //config: The hwclock utility is used to read and set the hardware clock |
| @@ -320,6 +320,70 @@ static void from_sys_clock(const char **pp_rtcname, int utc) | |||
| 320 | close(rtc); | 320 | close(rtc); |
| 321 | } | 321 | } |
| 322 | 322 | ||
| 323 | static uint64_t resolve_rtc_param_alias(const char *alias) | ||
| 324 | { | ||
| 325 | int n; | ||
| 326 | |||
| 327 | BUILD_BUG_ON(RTC_PARAM_FEATURES != 0 | ||
| 328 | || RTC_PARAM_CORRECTION != 1 | ||
| 329 | || RTC_PARAM_BACKUP_SWITCH_MODE != 2 | ||
| 330 | ); | ||
| 331 | n = index_in_strings( | ||
| 332 | "features" "\0" | ||
| 333 | "correction" "\0" | ||
| 334 | "bsm" "\0" | ||
| 335 | , alias); | ||
| 336 | if (n >= 0) | ||
| 337 | return n; | ||
| 338 | return xstrtoull(alias, 0); | ||
| 339 | } | ||
| 340 | |||
| 341 | static void get_rtc_param(const char **pp_rtcname, const char *rtc_param) | ||
| 342 | { | ||
| 343 | int rtc; | ||
| 344 | struct rtc_param param; | ||
| 345 | |||
| 346 | param.param = resolve_rtc_param_alias(rtc_param); | ||
| 347 | |||
| 348 | rtc = rtc_xopen(pp_rtcname, O_RDONLY); | ||
| 349 | |||
| 350 | xioctl(rtc, RTC_PARAM_GET, ¶m); | ||
| 351 | |||
| 352 | printf("The RTC parameter 0x%llx is set to 0x%llx.\n", | ||
| 353 | (unsigned long long) param.param, (unsigned long long) param.uvalue); | ||
| 354 | |||
| 355 | if (ENABLE_FEATURE_CLEAN_UP) | ||
| 356 | close(rtc); | ||
| 357 | } | ||
| 358 | |||
| 359 | static void set_rtc_param(const char **pp_rtcname, char *rtc_param) | ||
| 360 | { | ||
| 361 | int rtc; | ||
| 362 | struct rtc_param param; | ||
| 363 | char *eq; | ||
| 364 | |||
| 365 | /* handle param name */ | ||
| 366 | eq = strchr(rtc_param, '='); | ||
| 367 | if (!eq) | ||
| 368 | bb_error_msg_and_die("expected <param>=<value>"); | ||
| 369 | *eq = '\0'; | ||
| 370 | param.param = resolve_rtc_param_alias(rtc_param); | ||
| 371 | *eq = '='; | ||
| 372 | |||
| 373 | /* handle param value */ | ||
| 374 | param.uvalue = xstrtoull(eq + 1, 0); | ||
| 375 | |||
| 376 | rtc = rtc_xopen(pp_rtcname, O_WRONLY); | ||
| 377 | |||
| 378 | printf("The RTC parameter 0x%llx will be set to 0x%llx.\n", | ||
| 379 | (unsigned long long) param.param, (unsigned long long) param.uvalue); | ||
| 380 | |||
| 381 | xioctl(rtc, RTC_PARAM_SET, ¶m); | ||
| 382 | |||
| 383 | if (ENABLE_FEATURE_CLEAN_UP) | ||
| 384 | close(rtc); | ||
| 385 | } | ||
| 386 | |||
| 323 | // hwclock from util-linux 2.36.1 | 387 | // hwclock from util-linux 2.36.1 |
| 324 | // hwclock [function] [option...] | 388 | // hwclock [function] [option...] |
| 325 | //Functions: | 389 | //Functions: |
| @@ -346,10 +410,10 @@ static void from_sys_clock(const char **pp_rtcname, int utc) | |||
| 346 | 410 | ||
| 347 | //usage:#define hwclock_trivial_usage | 411 | //usage:#define hwclock_trivial_usage |
| 348 | //usage: IF_LONG_OPTS( | 412 | //usage: IF_LONG_OPTS( |
| 349 | //usage: "[-swul] [--systz] [-f DEV]" | 413 | //usage: "[-swul] [--systz] [--param-get PARAM] [--param-set PARAM=VAL] [-f DEV]" |
| 350 | //usage: ) | 414 | //usage: ) |
| 351 | //usage: IF_NOT_LONG_OPTS( | 415 | //usage: IF_NOT_LONG_OPTS( |
| 352 | //usage: "[-swult] [-f DEV]" | 416 | //usage: "[-swult] [-g PARAM] [-p PARAM=VAL] [-f DEV]" |
| 353 | //usage: ) | 417 | //usage: ) |
| 354 | //usage:#define hwclock_full_usage "\n\n" | 418 | //usage:#define hwclock_full_usage "\n\n" |
| 355 | //usage: "Show or set hardware clock (RTC)\n" | 419 | //usage: "Show or set hardware clock (RTC)\n" |
| @@ -360,6 +424,8 @@ static void from_sys_clock(const char **pp_rtcname, int utc) | |||
| 360 | //usage: IF_LONG_OPTS( | 424 | //usage: IF_LONG_OPTS( |
| 361 | //usage: "\n --systz Set in-kernel timezone, correct system time" | 425 | //usage: "\n --systz Set in-kernel timezone, correct system time" |
| 362 | //usage: "\n if RTC is kept in local time" | 426 | //usage: "\n if RTC is kept in local time" |
| 427 | //usage: "\n --param-get PARAM Get RTC parameter" | ||
| 428 | //usage: "\n --param-set PARAM=VAL Set RTC parameter" | ||
| 363 | //usage: ) | 429 | //usage: ) |
| 364 | //usage: "\n -f DEV Use specified device (e.g. /dev/rtc2)" | 430 | //usage: "\n -f DEV Use specified device (e.g. /dev/rtc2)" |
| 365 | //usage: "\n -u Assume RTC is kept in UTC" | 431 | //usage: "\n -u Assume RTC is kept in UTC" |
| @@ -375,11 +441,14 @@ static void from_sys_clock(const char **pp_rtcname, int utc) | |||
| 375 | #define HWCLOCK_OPT_SYSTOHC 0x10 | 441 | #define HWCLOCK_OPT_SYSTOHC 0x10 |
| 376 | #define HWCLOCK_OPT_SYSTZ 0x20 | 442 | #define HWCLOCK_OPT_SYSTZ 0x20 |
| 377 | #define HWCLOCK_OPT_RTCFILE 0x40 | 443 | #define HWCLOCK_OPT_RTCFILE 0x40 |
| 444 | #define HWCLOCK_OPT_PARAM_GET 0x80 | ||
| 445 | #define HWCLOCK_OPT_PARAM_SET 0x100 | ||
| 378 | 446 | ||
| 379 | int hwclock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 447 | int hwclock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
| 380 | int hwclock_main(int argc UNUSED_PARAM, char **argv) | 448 | int hwclock_main(int argc UNUSED_PARAM, char **argv) |
| 381 | { | 449 | { |
| 382 | const char *rtcname = NULL; | 450 | const char *rtcname = NULL; |
| 451 | char *param; | ||
| 383 | unsigned opt; | 452 | unsigned opt; |
| 384 | int utc; | 453 | int utc; |
| 385 | #if ENABLE_LONG_OPTS | 454 | #if ENABLE_LONG_OPTS |
| @@ -391,14 +460,18 @@ int hwclock_main(int argc UNUSED_PARAM, char **argv) | |||
| 391 | "systohc\0" No_argument "w" | 460 | "systohc\0" No_argument "w" |
| 392 | "systz\0" No_argument "t" /* short opt is non-standard */ | 461 | "systz\0" No_argument "t" /* short opt is non-standard */ |
| 393 | "rtc\0" Required_argument "f" | 462 | "rtc\0" Required_argument "f" |
| 463 | "param-get\0" Required_argument "g" /* short opt is non-standard */ | ||
| 464 | "param-set\0" Required_argument "p" /* short opt is non-standard */ | ||
| 394 | ; | 465 | ; |
| 395 | #endif | 466 | #endif |
| 396 | opt = getopt32long(argv, | 467 | opt = getopt32long(argv, |
| 397 | "^""lurswtf:v" /* -v is accepted and ignored */ | 468 | "^""lurswtf:g:p:v" /* -v is accepted and ignored */ |
| 398 | "\0" | 469 | "\0" |
| 399 | "r--wst:w--rst:s--wrt:t--rsw:l--u:u--l", | 470 | "r--wstgp:w--rstgp:s--wrtgp:t--rswgp:g--rswtp:p--rswtg:l--u:u--l", |
| 400 | hwclock_longopts, | 471 | hwclock_longopts, |
| 401 | &rtcname | 472 | &rtcname, |
| 473 | ¶m, | ||
| 474 | ¶m | ||
| 402 | ); | 475 | ); |
| 403 | 476 | ||
| 404 | /* If -u or -l wasn't given, check if we are using utc */ | 477 | /* If -u or -l wasn't given, check if we are using utc */ |
| @@ -413,6 +486,10 @@ int hwclock_main(int argc UNUSED_PARAM, char **argv) | |||
| 413 | from_sys_clock(&rtcname, utc); | 486 | from_sys_clock(&rtcname, utc); |
| 414 | else if (opt & HWCLOCK_OPT_SYSTZ) | 487 | else if (opt & HWCLOCK_OPT_SYSTZ) |
| 415 | set_kernel_timezone_and_clock(utc, NULL); | 488 | set_kernel_timezone_and_clock(utc, NULL); |
| 489 | else if (opt & HWCLOCK_OPT_PARAM_GET) | ||
| 490 | get_rtc_param(&rtcname, param); | ||
| 491 | else if (opt & HWCLOCK_OPT_PARAM_SET) | ||
| 492 | set_rtc_param(&rtcname, param); | ||
| 416 | else | 493 | else |
| 417 | /* default HWCLOCK_OPT_SHOW */ | 494 | /* default HWCLOCK_OPT_SHOW */ |
| 418 | show_clock(&rtcname, utc); | 495 | show_clock(&rtcname, utc); |
diff --git a/util-linux/ionice.c b/util-linux/ionice.c index 82bd309d1..b768c8322 100644 --- a/util-linux/ionice.c +++ b/util-linux/ionice.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config IONICE | 9 | //config:config IONICE |
| 10 | //config: bool "ionice (3.8 kb)" | 10 | //config: bool "ionice (4 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Set/set program io scheduling class and priority | 13 | //config: Set/set program io scheduling class and priority |
diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c index 3d3ad0b56..126221c83 100644 --- a/util-linux/ipcrm.c +++ b/util-linux/ipcrm.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config IPCRM | 10 | //config:config IPCRM |
| 11 | //config: bool "ipcrm (3.2 kb)" | 11 | //config: bool "ipcrm (3.5 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: The ipcrm utility allows the removal of System V interprocess | 14 | //config: The ipcrm utility allows the removal of System V interprocess |
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c index 5973cbf57..f0e5c5a7f 100644 --- a/util-linux/ipcs.c +++ b/util-linux/ipcs.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config IPCS | 10 | //config:config IPCS |
| 11 | //config: bool "ipcs (11 kb)" | 11 | //config: bool "ipcs (12 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: The ipcs utility is used to provide information on the currently | 14 | //config: The ipcs utility is used to provide information on the currently |
diff --git a/util-linux/last.c b/util-linux/last.c index 63751ca45..7530d013d 100644 --- a/util-linux/last.c +++ b/util-linux/last.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config LAST | 9 | //config:config LAST |
| 10 | //config: bool "last (6.1 kb)" | 10 | //config: bool "last (7.4 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: depends on FEATURE_WTMP | 12 | //config: depends on FEATURE_WTMP |
| 13 | //config: help | 13 | //config: help |
diff --git a/util-linux/losetup.c b/util-linux/losetup.c index 24f7a2349..9b43d20b3 100644 --- a/util-linux/losetup.c +++ b/util-linux/losetup.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config LOSETUP | 9 | //config:config LOSETUP |
| 10 | //config: bool "losetup (5.5 kb)" | 10 | //config: bool "losetup (6.2 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: losetup is used to associate or detach a loop device with a regular | 13 | //config: losetup is used to associate or detach a loop device with a regular |
diff --git a/util-linux/lspci.c b/util-linux/lspci.c index c22cbcc1e..b38b46be3 100644 --- a/util-linux/lspci.c +++ b/util-linux/lspci.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config LSPCI | 9 | //config:config LSPCI |
| 10 | //config: bool "lspci (6.3 kb)" | 10 | //config: bool "lspci (6.4 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: lspci is a utility for displaying information about PCI buses in the | 13 | //config: lspci is a utility for displaying information about PCI buses in the |
diff --git a/util-linux/lsusb.c b/util-linux/lsusb.c index 9abb748ce..262c70a1b 100644 --- a/util-linux/lsusb.c +++ b/util-linux/lsusb.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config LSUSB | 9 | //config:config LSUSB |
| 10 | //config: bool "lsusb (4.2 kb)" | 10 | //config: bool "lsusb (4.4 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: lsusb is a utility for displaying information about USB buses in the | 13 | //config: lsusb is a utility for displaying information about USB buses in the |
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index ebdc0c254..e98d46743 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config MDEV | 10 | //config:config MDEV |
| 11 | //config: bool "mdev (17 kb)" | 11 | //config: bool "mdev (20 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: mdev is a mini-udev implementation for dynamically creating device | 14 | //config: mdev is a mini-udev implementation for dynamically creating device |
diff --git a/util-linux/mesg.c b/util-linux/mesg.c index 8c032555b..9461dbc5e 100644 --- a/util-linux/mesg.c +++ b/util-linux/mesg.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config MESG | 9 | //config:config MESG |
| 10 | //config: bool "mesg (1.4 kb)" | 10 | //config: bool "mesg (1.8 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Mesg controls access to your terminal by others. It is typically | 13 | //config: Mesg controls access to your terminal by others. It is typically |
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c index d2db78e1d..7ae4fd520 100644 --- a/util-linux/mkfs_vfat.c +++ b/util-linux/mkfs_vfat.c | |||
| @@ -8,13 +8,13 @@ | |||
| 8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config MKDOSFS | 10 | //config:config MKDOSFS |
| 11 | //config: bool "mkdosfs (7.2 kb)" | 11 | //config: bool "mkdosfs (7.6 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: Utility to create FAT32 filesystems. | 14 | //config: Utility to create FAT32 filesystems. |
| 15 | //config: | 15 | //config: |
| 16 | //config:config MKFS_VFAT | 16 | //config:config MKFS_VFAT |
| 17 | //config: bool "mkfs.vfat (7.2 kb)" | 17 | //config: bool "mkfs.vfat (7.6 kb)" |
| 18 | //config: default y | 18 | //config: default y |
| 19 | //config: help | 19 | //config: help |
| 20 | //config: Alias to "mkdosfs". | 20 | //config: Alias to "mkdosfs". |
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index 8fe5d0293..f80457a31 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config MKSWAP | 9 | //config:config MKSWAP |
| 10 | //config: bool "mkswap (6.3 kb)" | 10 | //config: bool "mkswap (6.6 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: The mkswap utility is used to configure a file or disk partition as | 13 | //config: The mkswap utility is used to configure a file or disk partition as |
diff --git a/util-linux/more.c b/util-linux/more.c index 84ce37bc7..0be8e0b9b 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 14 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 15 | */ | 15 | */ |
| 16 | //config:config MORE | 16 | //config:config MORE |
| 17 | //config: bool "more (7 kb)" | 17 | //config: bool "more (7.2 kb)" |
| 18 | //config: default y | 18 | //config: default y |
| 19 | //config: help | 19 | //config: help |
| 20 | //config: more is a simple utility which allows you to read text one screen | 20 | //config: more is a simple utility which allows you to read text one screen |
| @@ -69,7 +69,7 @@ static void gotsig(int sig UNUSED_PARAM) | |||
| 69 | * therefore it is safe in signal handler */ | 69 | * therefore it is safe in signal handler */ |
| 70 | bb_putchar_stderr('\n'); | 70 | bb_putchar_stderr('\n'); |
| 71 | tcsetattr_tty_TCSANOW(&G.initial_settings); | 71 | tcsetattr_tty_TCSANOW(&G.initial_settings); |
| 72 | _exit(EXIT_FAILURE); | 72 | _exit_FAILURE(); |
| 73 | } | 73 | } |
| 74 | #endif | 74 | #endif |
| 75 | 75 | ||
diff --git a/util-linux/mount.c b/util-linux/mount.c index 4e65b6b46..d0f0ae1ad 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | // | 18 | // |
| 19 | 19 | ||
| 20 | //config:config MOUNT | 20 | //config:config MOUNT |
| 21 | //config: bool "mount (23 kb)" | 21 | //config: bool "mount (24 kb)" |
| 22 | //config: default y | 22 | //config: default y |
| 23 | //config: help | 23 | //config: help |
| 24 | //config: All files and filesystems in Unix are arranged into one big directory | 24 | //config: All files and filesystems in Unix are arranged into one big directory |
diff --git a/util-linux/mountpoint.c b/util-linux/mountpoint.c index 28b1e7a54..87f4cc60d 100644 --- a/util-linux/mountpoint.c +++ b/util-linux/mountpoint.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Based on sysvinit's mountpoint | 9 | * Based on sysvinit's mountpoint |
| 10 | */ | 10 | */ |
| 11 | //config:config MOUNTPOINT | 11 | //config:config MOUNTPOINT |
| 12 | //config: bool "mountpoint (4.9 kb)" | 12 | //config: bool "mountpoint (5.1 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: mountpoint checks if the directory is a mountpoint. | 15 | //config: mountpoint checks if the directory is a mountpoint. |
diff --git a/util-linux/nsenter.c b/util-linux/nsenter.c index 1aa045b35..9a250e43c 100644 --- a/util-linux/nsenter.c +++ b/util-linux/nsenter.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config NSENTER | 9 | //config:config NSENTER |
| 10 | //config: bool "nsenter (6.5 kb)" | 10 | //config: bool "nsenter (6.8 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: Run program with namespaces of other processes. | 13 | //config: Run program with namespaces of other processes. |
diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c index ecc891100..b65e914cf 100644 --- a/util-linux/pivot_root.c +++ b/util-linux/pivot_root.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Licensed under GPLv2, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 10 | */ | 10 | */ |
| 11 | //config:config PIVOT_ROOT | 11 | //config:config PIVOT_ROOT |
| 12 | //config: bool "pivot_root (1.1 kb)" | 12 | //config: bool "pivot_root (1.4 kb)" |
| 13 | //config: default y | 13 | //config: default y |
| 14 | //config: help | 14 | //config: help |
| 15 | //config: The pivot_root utility swaps the mount points for the root filesystem | 15 | //config: The pivot_root utility swaps the mount points for the root filesystem |
diff --git a/util-linux/rdate.c b/util-linux/rdate.c index 9b80141c9..fd45081d8 100644 --- a/util-linux/rdate.c +++ b/util-linux/rdate.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config RDATE | 10 | //config:config RDATE |
| 11 | //config: bool "rdate (5.6 kb)" | 11 | //config: bool "rdate (5.9 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: The rdate utility allows you to synchronize the date and time of your | 14 | //config: The rdate utility allows you to synchronize the date and time of your |
diff --git a/util-linux/rdev.c b/util-linux/rdev.c index d6b515ebc..7e8c8cd8a 100644 --- a/util-linux/rdev.c +++ b/util-linux/rdev.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 9 | */ | 9 | */ |
| 10 | //config:config RDEV | 10 | //config:config RDEV |
| 11 | //config: bool "rdev (1.8 kb)" | 11 | //config: bool "rdev (2.1 kb)" |
| 12 | //config: default y | 12 | //config: default y |
| 13 | //config: help | 13 | //config: help |
| 14 | //config: Print the device node associated with the filesystem mounted at '/'. | 14 | //config: Print the device node associated with the filesystem mounted at '/'. |
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c index f11c62292..a7e4dcb73 100644 --- a/util-linux/readprofile.c +++ b/util-linux/readprofile.c | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | * Paul Mundt <lethal@linux-sh.org>. | 32 | * Paul Mundt <lethal@linux-sh.org>. |
| 33 | */ | 33 | */ |
| 34 | //config:config READPROFILE | 34 | //config:config READPROFILE |
| 35 | //config: bool "readprofile (7.1 kb)" | 35 | //config: bool "readprofile (7.5 kb)" |
| 36 | //config: default y | 36 | //config: default y |
| 37 | //config: help | 37 | //config: help |
| 38 | //config: This allows you to parse /proc/profile for basic profiling. | 38 | //config: This allows you to parse /proc/profile for basic profiling. |
diff --git a/util-linux/renice.c b/util-linux/renice.c index fc72550f4..53f197cce 100644 --- a/util-linux/renice.c +++ b/util-linux/renice.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | * following IDs (if any). Multiple switches are allowed. | 18 | * following IDs (if any). Multiple switches are allowed. |
| 19 | */ | 19 | */ |
| 20 | //config:config RENICE | 20 | //config:config RENICE |
| 21 | //config: bool "renice (4.2 kb)" | 21 | //config: bool "renice (4.4 kb)" |
| 22 | //config: default y | 22 | //config: default y |
| 23 | //config: help | 23 | //config: help |
| 24 | //config: Renice alters the scheduling priority of one or more running | 24 | //config: Renice alters the scheduling priority of one or more running |
diff --git a/util-linux/rev.c b/util-linux/rev.c index 5f8e60cac..36736359b 100644 --- a/util-linux/rev.c +++ b/util-linux/rev.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config REV | 8 | //config:config REV |
| 9 | //config: bool "rev (4.4 kb)" | 9 | //config: bool "rev (4.6 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: Reverse lines of a file or files. | 12 | //config: Reverse lines of a file or files. |
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c index eac16077d..a8dfab064 100644 --- a/util-linux/rtcwake.c +++ b/util-linux/rtcwake.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | * That flag should not be needed on systems with adjtime support. | 23 | * That flag should not be needed on systems with adjtime support. |
| 24 | */ | 24 | */ |
| 25 | //config:config RTCWAKE | 25 | //config:config RTCWAKE |
| 26 | //config: bool "rtcwake (6.8 kb)" | 26 | //config: bool "rtcwake (7.5 kb)" |
| 27 | //config: default y | 27 | //config: default y |
| 28 | //config: help | 28 | //config: help |
| 29 | //config: Enter a system sleep state until specified wakeup time. | 29 | //config: Enter a system sleep state until specified wakeup time. |
diff --git a/util-linux/script.c b/util-linux/script.c index 963435335..58b844e77 100644 --- a/util-linux/script.c +++ b/util-linux/script.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 12 | */ | 12 | */ |
| 13 | //config:config SCRIPT | 13 | //config:config SCRIPT |
| 14 | //config: bool "script (8.6 kb)" | 14 | //config: bool "script (8.8 kb)" |
| 15 | //config: default y | 15 | //config: default y |
| 16 | //config: help | 16 | //config: help |
| 17 | //config: The script makes typescript of terminal session. | 17 | //config: The script makes typescript of terminal session. |
diff --git a/util-linux/scriptreplay.c b/util-linux/scriptreplay.c index 3c032eec5..e3083ab93 100644 --- a/util-linux/scriptreplay.c +++ b/util-linux/scriptreplay.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config SCRIPTREPLAY | 9 | //config:config SCRIPTREPLAY |
| 10 | //config: bool "scriptreplay (2.4 kb)" | 10 | //config: bool "scriptreplay (2.6 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: This program replays a typescript, using timing information | 13 | //config: This program replays a typescript, using timing information |
diff --git a/util-linux/setarch.c b/util-linux/setarch.c index cf8ef0064..68b7c663c 100644 --- a/util-linux/setarch.c +++ b/util-linux/setarch.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config SETARCH | 9 | //config:config SETARCH |
| 10 | //config: bool "setarch (3.6 kb)" | 10 | //config: bool "setarch (3.8 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: The linux32 utility is used to create a 32bit environment for the | 13 | //config: The linux32 utility is used to create a 32bit environment for the |
| @@ -16,13 +16,13 @@ | |||
| 16 | //config: (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...). | 16 | //config: (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...). |
| 17 | //config: | 17 | //config: |
| 18 | //config:config LINUX32 | 18 | //config:config LINUX32 |
| 19 | //config: bool "linux32 (3.3 kb)" | 19 | //config: bool "linux32 (3.6 kb)" |
| 20 | //config: default y | 20 | //config: default y |
| 21 | //config: help | 21 | //config: help |
| 22 | //config: Alias to "setarch linux32". | 22 | //config: Alias to "setarch linux32". |
| 23 | //config: | 23 | //config: |
| 24 | //config:config LINUX64 | 24 | //config:config LINUX64 |
| 25 | //config: bool "linux64 (3.3 kb)" | 25 | //config: bool "linux64 (3.5 kb)" |
| 26 | //config: default y | 26 | //config: default y |
| 27 | //config: help | 27 | //config: help |
| 28 | //config: Alias to "setarch linux64". | 28 | //config: Alias to "setarch linux64". |
diff --git a/util-linux/setpriv.c b/util-linux/setpriv.c index 6904cf019..ee038516d 100644 --- a/util-linux/setpriv.c +++ b/util-linux/setpriv.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config SETPRIV | 9 | //config:config SETPRIV |
| 10 | //config: bool "setpriv (6.6 kb)" | 10 | //config: bool "setpriv (6.9 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: select LONG_OPTS | 12 | //config: select LONG_OPTS |
| 13 | //config: help | 13 | //config: help |
diff --git a/util-linux/setsid.c b/util-linux/setsid.c index cdad8c1d3..24b02a509 100644 --- a/util-linux/setsid.c +++ b/util-linux/setsid.c | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | * - busyboxed | 14 | * - busyboxed |
| 15 | */ | 15 | */ |
| 16 | //config:config SETSID | 16 | //config:config SETSID |
| 17 | //config: bool "setsid (3.6 kb)" | 17 | //config: bool "setsid (3.8 kb)" |
| 18 | //config: default y | 18 | //config: default y |
| 19 | //config: help | 19 | //config: help |
| 20 | //config: setsid runs a program in a new session | 20 | //config: setsid runs a program in a new session |
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index 901c0b8db..14139736e 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config SWITCH_ROOT | 9 | //config:config SWITCH_ROOT |
| 10 | //config: bool "switch_root (5.5 kb)" | 10 | //config: bool "switch_root (5.7 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: help | 12 | //config: help |
| 13 | //config: The switch_root utility is used from initramfs to select a new | 13 | //config: The switch_root utility is used from initramfs to select a new |
diff --git a/util-linux/taskset.c b/util-linux/taskset.c index 8b410f369..55c915e8d 100644 --- a/util-linux/taskset.c +++ b/util-linux/taskset.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config TASKSET | 8 | //config:config TASKSET |
| 9 | //config: bool "taskset (4.2 kb)" | 9 | //config: bool "taskset (5.6 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: help | 11 | //config: help |
| 12 | //config: Retrieve or set a processes's CPU affinity. | 12 | //config: Retrieve or set a processes's CPU affinity. |
diff --git a/util-linux/uevent.c b/util-linux/uevent.c index db11746d0..2193eb0f2 100644 --- a/util-linux/uevent.c +++ b/util-linux/uevent.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Licensed under GPLv2, see file LICENSE in this source tree. | 4 | * Licensed under GPLv2, see file LICENSE in this source tree. |
| 5 | */ | 5 | */ |
| 6 | //config:config UEVENT | 6 | //config:config UEVENT |
| 7 | //config: bool "uevent (3.1 kb)" | 7 | //config: bool "uevent (3.5 kb)" |
| 8 | //config: default y | 8 | //config: default y |
| 9 | //config: help | 9 | //config: help |
| 10 | //config: uevent is a netlink listener for kernel uevent notifications | 10 | //config: uevent is a netlink listener for kernel uevent notifications |
diff --git a/util-linux/unshare.c b/util-linux/unshare.c index 06b938074..a9f56f388 100644 --- a/util-linux/unshare.c +++ b/util-linux/unshare.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | //config:config UNSHARE | 9 | //config:config UNSHARE |
| 10 | //config: bool "unshare (7.2 kb)" | 10 | //config: bool "unshare (7.3 kb)" |
| 11 | //config: default y | 11 | //config: default y |
| 12 | //config: depends on !NOMMU | 12 | //config: depends on !NOMMU |
| 13 | //config: select LONG_OPTS | 13 | //config: select LONG_OPTS |
diff --git a/util-linux/wall.c b/util-linux/wall.c index 23fb87517..72205cbae 100644 --- a/util-linux/wall.c +++ b/util-linux/wall.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 7 | */ | 7 | */ |
| 8 | //config:config WALL | 8 | //config:config WALL |
| 9 | //config: bool "wall (2.6 kb)" | 9 | //config: bool "wall (2.9 kb)" |
| 10 | //config: default y | 10 | //config: default y |
| 11 | //config: depends on FEATURE_UTMP | 11 | //config: depends on FEATURE_UTMP |
| 12 | //config: help | 12 | //config: help |
