diff options
author | Ron Yorston <rmy@pobox.com> | 2015-05-18 09:36:27 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2015-05-18 09:36:27 +0100 |
commit | 60063627a6d540871061854a362047e6517f821c (patch) | |
tree | 0de228630450c64e085f2e3f5141b5ba17eccab3 /coreutils | |
parent | ec39cb770ddd5c0e085d5c4ee10be65bab5e7a44 (diff) | |
parent | 9a595bb36ded308e6d4336aef2c1cd3ac738a398 (diff) | |
download | busybox-w32-60063627a6d540871061854a362047e6517f821c.tar.gz busybox-w32-60063627a6d540871061854a362047e6517f821c.tar.bz2 busybox-w32-60063627a6d540871061854a362047e6517f821c.zip |
Merge branch 'busybox' into mergeFRP
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/false.c | 8 | ||||
-rw-r--r-- | coreutils/test.c | 11 | ||||
-rw-r--r-- | coreutils/true.c | 8 | ||||
-rw-r--r-- | coreutils/who.c | 8 |
4 files changed, 13 insertions, 22 deletions
diff --git a/coreutils/false.c b/coreutils/false.c index 59c2f321a..0591a6cdc 100644 --- a/coreutils/false.c +++ b/coreutils/false.c | |||
@@ -10,11 +10,9 @@ | |||
10 | /* BB_AUDIT SUSv3 compliant */ | 10 | /* BB_AUDIT SUSv3 compliant */ |
11 | /* http://www.opengroup.org/onlinepubs/000095399/utilities/false.html */ | 11 | /* http://www.opengroup.org/onlinepubs/000095399/utilities/false.html */ |
12 | 12 | ||
13 | //usage:#define false_trivial_usage | 13 | /* "false --help" is special-cased to ignore --help */ |
14 | //usage: "" | 14 | //usage:#define false_trivial_usage NOUSAGE_STR |
15 | //usage:#define false_full_usage "\n\n" | 15 | //usage:#define false_full_usage "" |
16 | //usage: "Return an exit code of FALSE (1)" | ||
17 | //usage: | ||
18 | //usage:#define false_example_usage | 16 | //usage:#define false_example_usage |
19 | //usage: "$ false\n" | 17 | //usage: "$ false\n" |
20 | //usage: "$ echo $?\n" | 18 | //usage: "$ echo $?\n" |
diff --git a/coreutils/test.c b/coreutils/test.c index 9e709a709..422d24c54 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -39,14 +39,9 @@ | |||
39 | //config: help | 39 | //config: help |
40 | //config: Enable 64-bit support in test. | 40 | //config: Enable 64-bit support in test. |
41 | 41 | ||
42 | /* "test --help" does not print help (POSIX compat), only "[ --help" does. | 42 | /* "test --help" is special-cased to ignore --help */ |
43 | * We display "<applet> EXPRESSION ]" here (not "<applet> EXPRESSION") | 43 | //usage:#define test_trivial_usage NOUSAGE_STR |
44 | * Unfortunately, it screws up generated BusyBox.html. TODO. */ | 44 | //usage:#define test_full_usage "" |
45 | //usage:#define test_trivial_usage | ||
46 | //usage: "EXPRESSION ]" | ||
47 | //usage:#define test_full_usage "\n\n" | ||
48 | //usage: "Check file types, compare values etc. Return a 0/1 exit code\n" | ||
49 | //usage: "depending on logical value of EXPRESSION" | ||
50 | //usage: | 45 | //usage: |
51 | //usage:#define test_example_usage | 46 | //usage:#define test_example_usage |
52 | //usage: "$ test 1 -eq 2\n" | 47 | //usage: "$ test 1 -eq 2\n" |
diff --git a/coreutils/true.c b/coreutils/true.c index 382e476a8..89f892961 100644 --- a/coreutils/true.c +++ b/coreutils/true.c | |||
@@ -10,11 +10,9 @@ | |||
10 | /* BB_AUDIT SUSv3 compliant */ | 10 | /* BB_AUDIT SUSv3 compliant */ |
11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/true.html */ | 11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/true.html */ |
12 | 12 | ||
13 | //usage:#define true_trivial_usage | 13 | /* "true --help" is special-cased to ignore --help */ |
14 | //usage: "" | 14 | //usage:#define true_trivial_usage NOUSAGE_STR |
15 | //usage:#define true_full_usage "\n\n" | 15 | //usage:#define true_full_usage "" |
16 | //usage: "Return an exit code of TRUE (0)" | ||
17 | //usage: | ||
18 | //usage:#define true_example_usage | 16 | //usage:#define true_example_usage |
19 | //usage: "$ true\n" | 17 | //usage: "$ true\n" |
20 | //usage: "$ echo $?\n" | 18 | //usage: "$ echo $?\n" |
diff --git a/coreutils/who.c b/coreutils/who.c index f955ce6d3..8337212c9 100644 --- a/coreutils/who.c +++ b/coreutils/who.c | |||
@@ -73,7 +73,7 @@ static void idle_string(char *str6, time_t t) | |||
73 | int who_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 73 | int who_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
74 | int who_main(int argc UNUSED_PARAM, char **argv) | 74 | int who_main(int argc UNUSED_PARAM, char **argv) |
75 | { | 75 | { |
76 | struct utmp *ut; | 76 | struct utmpx *ut; |
77 | unsigned opt; | 77 | unsigned opt; |
78 | int do_users = (ENABLE_USERS && (!ENABLE_WHO || applet_name[0] == 'u')); | 78 | int do_users = (ENABLE_USERS && (!ENABLE_WHO || applet_name[0] == 'u')); |
79 | const char *fmt = "%s"; | 79 | const char *fmt = "%s"; |
@@ -83,8 +83,8 @@ int who_main(int argc UNUSED_PARAM, char **argv) | |||
83 | if (opt & 2) // -H | 83 | if (opt & 2) // -H |
84 | printf("USER\t\tTTY\t\tIDLE\tTIME\t\t HOST\n"); | 84 | printf("USER\t\tTTY\t\tIDLE\tTIME\t\t HOST\n"); |
85 | 85 | ||
86 | setutent(); | 86 | setutxent(); |
87 | while ((ut = getutent()) != NULL) { | 87 | while ((ut = getutxent()) != NULL) { |
88 | if (ut->ut_user[0] | 88 | if (ut->ut_user[0] |
89 | && ((opt & 1) || ut->ut_type == USER_PROCESS) | 89 | && ((opt & 1) || ut->ut_type == USER_PROCESS) |
90 | ) { | 90 | ) { |
@@ -126,6 +126,6 @@ int who_main(int argc UNUSED_PARAM, char **argv) | |||
126 | if (do_users) | 126 | if (do_users) |
127 | bb_putchar('\n'); | 127 | bb_putchar('\n'); |
128 | if (ENABLE_FEATURE_CLEAN_UP) | 128 | if (ENABLE_FEATURE_CLEAN_UP) |
129 | endutent(); | 129 | endutxent(); |
130 | return EXIT_SUCCESS; | 130 | return EXIT_SUCCESS; |
131 | } | 131 | } |