diff options
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/Kbuild.src | 6 | ||||
-rw-r--r-- | coreutils/echo.c | 5 | ||||
-rw-r--r-- | coreutils/printf.c | 5 | ||||
-rw-r--r-- | coreutils/test.c | 17 |
4 files changed, 16 insertions, 17 deletions
diff --git a/coreutils/Kbuild.src b/coreutils/Kbuild.src index d0b3f629b..a805b64fe 100644 --- a/coreutils/Kbuild.src +++ b/coreutils/Kbuild.src | |||
@@ -16,9 +16,3 @@ lib-$(CONFIG_CRONTAB) += cat.o # crontab -l | |||
16 | lib-$(CONFIG_ADDUSER) += chown.o # used by adduser | 16 | lib-$(CONFIG_ADDUSER) += chown.o # used by adduser |
17 | lib-$(CONFIG_ADDGROUP) += chown.o # used by addgroup | 17 | lib-$(CONFIG_ADDGROUP) += chown.o # used by addgroup |
18 | lib-$(CONFIG_FTPD) += ls.o # used by ftpd | 18 | lib-$(CONFIG_FTPD) += ls.o # used by ftpd |
19 | |||
20 | lib-$(CONFIG_ASH_BUILTIN_ECHO) += echo.o | ||
21 | lib-$(CONFIG_HUSH_ECHO) += echo.o | ||
22 | |||
23 | lib-$(CONFIG_ASH_BUILTIN_PRINTF) += printf.o | ||
24 | lib-$(CONFIG_HUSH_PRINTF) += printf.o | ||
diff --git a/coreutils/echo.c b/coreutils/echo.c index d0dba650d..a7e4ca9ac 100644 --- a/coreutils/echo.c +++ b/coreutils/echo.c | |||
@@ -28,12 +28,15 @@ | |||
28 | //config:config FEATURE_FANCY_ECHO | 28 | //config:config FEATURE_FANCY_ECHO |
29 | //config: bool "Enable -n and -e options" | 29 | //config: bool "Enable -n and -e options" |
30 | //config: default y | 30 | //config: default y |
31 | //config: depends on ECHO || ASH_BUILTIN_ECHO || HUSH_ECHO | 31 | //config: depends on ECHO || ASH_ECHO || HUSH_ECHO |
32 | 32 | ||
33 | //applet:IF_ECHO(APPLET_NOFORK(echo, echo, BB_DIR_BIN, BB_SUID_DROP, echo)) | 33 | //applet:IF_ECHO(APPLET_NOFORK(echo, echo, BB_DIR_BIN, BB_SUID_DROP, echo)) |
34 | 34 | ||
35 | //kbuild:lib-$(CONFIG_ECHO) += echo.o | 35 | //kbuild:lib-$(CONFIG_ECHO) += echo.o |
36 | 36 | ||
37 | //kbuild:lib-$(CONFIG_ASH_ECHO) += echo.o | ||
38 | //kbuild:lib-$(CONFIG_HUSH_ECHO) += echo.o | ||
39 | |||
37 | /* BB_AUDIT SUSv3 compliant -- unless configured as fancy echo. */ | 40 | /* BB_AUDIT SUSv3 compliant -- unless configured as fancy echo. */ |
38 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/echo.html */ | 41 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/echo.html */ |
39 | 42 | ||
diff --git a/coreutils/printf.c b/coreutils/printf.c index 6c8e115d8..bc22e0ee7 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c | |||
@@ -49,6 +49,9 @@ | |||
49 | 49 | ||
50 | //kbuild:lib-$(CONFIG_PRINTF) += printf.o | 50 | //kbuild:lib-$(CONFIG_PRINTF) += printf.o |
51 | 51 | ||
52 | //kbuild:lib-$(CONFIG_ASH_PRINTF) += printf.o | ||
53 | //kbuild:lib-$(CONFIG_HUSH_PRINTF) += printf.o | ||
54 | |||
52 | //usage:#define printf_trivial_usage | 55 | //usage:#define printf_trivial_usage |
53 | //usage: "FORMAT [ARG]..." | 56 | //usage: "FORMAT [ARG]..." |
54 | //usage:#define printf_full_usage "\n\n" | 57 | //usage:#define printf_full_usage "\n\n" |
@@ -417,7 +420,7 @@ int printf_main(int argc UNUSED_PARAM, char **argv) | |||
417 | if (argv[1] && argv[1][0] == '-' && argv[1][1] == '-' && !argv[1][2]) | 420 | if (argv[1] && argv[1][0] == '-' && argv[1][1] == '-' && !argv[1][2]) |
418 | argv++; | 421 | argv++; |
419 | if (!argv[1]) { | 422 | if (!argv[1]) { |
420 | if (ENABLE_ASH_BUILTIN_PRINTF | 423 | if (ENABLE_ASH_PRINTF |
421 | && applet_name[0] != 'p' | 424 | && applet_name[0] != 'p' |
422 | ) { | 425 | ) { |
423 | bb_error_msg("usage: printf FORMAT [ARGUMENT...]"); | 426 | bb_error_msg("usage: printf FORMAT [ARGUMENT...]"); |
diff --git a/coreutils/test.c b/coreutils/test.c index 288f66508..edc625f57 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -42,21 +42,20 @@ | |||
42 | //config:config FEATURE_TEST_64 | 42 | //config:config FEATURE_TEST_64 |
43 | //config: bool "Extend test to 64 bit" | 43 | //config: bool "Extend test to 64 bit" |
44 | //config: default y | 44 | //config: default y |
45 | //config: depends on TEST || TEST1 || TEST2 || ASH_BUILTIN_TEST || HUSH | 45 | //config: depends on TEST || TEST1 || TEST2 || ASH_TEST || HUSH_TEST |
46 | //config: help | 46 | //config: help |
47 | //config: Enable 64-bit support in test. | 47 | //config: Enable 64-bit support in test. |
48 | 48 | ||
49 | //applet:IF_TEST(APPLET_NOFORK(test, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) | 49 | //applet:IF_TEST(APPLET_NOFORK(test, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) |
50 | //applet:IF_TEST1(APPLET_NOFORK([, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) | 50 | //applet:IF_TEST1(APPLET_NOFORK([, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) |
51 | //applet:IF_TEST2(APPLET_NOFORK([[, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) | 51 | //applet:IF_TEST2(APPLET_NOFORK([[, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) |
52 | 52 | ||
53 | //kbuild:lib-$(CONFIG_TEST) += test.o test_ptr_hack.o | 53 | //kbuild:lib-$(CONFIG_TEST) += test.o test_ptr_hack.o |
54 | //kbuild:lib-$(CONFIG_TEST1) += test.o test_ptr_hack.o | 54 | //kbuild:lib-$(CONFIG_TEST1) += test.o test_ptr_hack.o |
55 | //kbuild:lib-$(CONFIG_TEST2) += test.o test_ptr_hack.o | 55 | //kbuild:lib-$(CONFIG_TEST2) += test.o test_ptr_hack.o |
56 | //kbuild:lib-$(CONFIG_ASH_BUILTIN_TEST) += test.o test_ptr_hack.o | 56 | |
57 | //kbuild:lib-$(CONFIG_HUSH) += test.o test_ptr_hack.o | 57 | //kbuild:lib-$(CONFIG_ASH_TEST) += test.o test_ptr_hack.o |
58 | //kbuild:lib-$(CONFIG_SH_IS_HUSH) += test.o test_ptr_hack.o | 58 | //kbuild:lib-$(CONFIG_HUSH_TEST) += test.o test_ptr_hack.o |
59 | //kbuild:lib-$(CONFIG_BASH_IS_HUSH) += test.o test_ptr_hack.o | ||
60 | 59 | ||
61 | /* "test --help" is special-cased to ignore --help */ | 60 | /* "test --help" is special-cased to ignore --help */ |
62 | //usage:#define test_trivial_usage NOUSAGE_STR | 61 | //usage:#define test_trivial_usage NOUSAGE_STR |
@@ -843,7 +842,7 @@ int test_main(int argc, char **argv) | |||
843 | const char *arg0; | 842 | const char *arg0; |
844 | 843 | ||
845 | arg0 = bb_basename(argv[0]); | 844 | arg0 = bb_basename(argv[0]); |
846 | if ((ENABLE_TEST1 || ENABLE_TEST2 || ENABLE_ASH_BUILTIN_TEST || ENABLE_HUSH) | 845 | if ((ENABLE_TEST1 || ENABLE_TEST2 || ENABLE_ASH_TEST || ENABLE_HUSH_TEST) |
847 | && (arg0[0] == '[') | 846 | && (arg0[0] == '[') |
848 | ) { | 847 | ) { |
849 | --argc; | 848 | --argc; |