diff options
author | Mark Whitley <markw@lineo.com> | 2000-10-09 18:56:47 +0000 |
---|---|---|
committer | Mark Whitley <markw@lineo.com> | 2000-10-09 18:56:47 +0000 |
commit | 872138de50b1c5bbf105b0243f5778fcb02b310b (patch) | |
tree | bae88fc4587a4d0aa9ec228c1006f4b364d0633e | |
parent | 7a86e61a54f75c6c457be177fb20f6dde27c06d3 (diff) | |
download | busybox-w32-872138de50b1c5bbf105b0243f5778fcb02b310b.tar.gz busybox-w32-872138de50b1c5bbf105b0243f5778fcb02b310b.tar.bz2 busybox-w32-872138de50b1c5bbf105b0243f5778fcb02b310b.zip |
Added cmp and readlink applets from Matt Kraai.
-rw-r--r-- | Config.h | 2 | ||||
-rw-r--r-- | applets/busybox.c | 6 | ||||
-rw-r--r-- | applets/usage.c | 19 | ||||
-rw-r--r-- | busybox.c | 6 | ||||
-rw-r--r-- | busybox.h | 4 | ||||
-rw-r--r-- | cmp.c | 65 | ||||
-rw-r--r-- | coreutils/cmp.c | 65 | ||||
-rw-r--r-- | include/busybox.h | 4 | ||||
-rw-r--r-- | miscutils/readlink.c | 49 | ||||
-rw-r--r-- | readlink.c | 49 | ||||
-rw-r--r-- | usage.c | 19 |
11 files changed, 286 insertions, 2 deletions
@@ -14,6 +14,7 @@ | |||
14 | #define BB_CHROOT | 14 | #define BB_CHROOT |
15 | #define BB_CHVT | 15 | #define BB_CHVT |
16 | #define BB_CLEAR | 16 | #define BB_CLEAR |
17 | #define BB_CMP | ||
17 | #define BB_CP_MV | 18 | #define BB_CP_MV |
18 | #define BB_CUT | 19 | #define BB_CUT |
19 | #define BB_DATE | 20 | #define BB_DATE |
@@ -76,6 +77,7 @@ | |||
76 | #define BB_PS | 77 | #define BB_PS |
77 | #define BB_PWD | 78 | #define BB_PWD |
78 | #define BB_RDATE | 79 | #define BB_RDATE |
80 | #define BB_READLINK | ||
79 | #define BB_REBOOT | 81 | #define BB_REBOOT |
80 | #define BB_RENICE | 82 | #define BB_RENICE |
81 | #define BB_RESET | 83 | #define BB_RESET |
diff --git a/applets/busybox.c b/applets/busybox.c index 825f40e7c..d25ddc185 100644 --- a/applets/busybox.c +++ b/applets/busybox.c | |||
@@ -40,6 +40,9 @@ const struct BB_applet applets[] = { | |||
40 | #ifdef BB_CHVT | 40 | #ifdef BB_CHVT |
41 | {"chvt", chvt_main, _BB_DIR_USR_BIN, chvt_usage}, | 41 | {"chvt", chvt_main, _BB_DIR_USR_BIN, chvt_usage}, |
42 | #endif | 42 | #endif |
43 | #ifdef BB_CMP | ||
44 | {"cmp", cmp_main, _BB_DIR_USR_BIN, cmp_usage}, | ||
45 | #endif | ||
43 | #ifdef BB_CP_MV | 46 | #ifdef BB_CP_MV |
44 | {"cp", cp_mv_main, _BB_DIR_BIN, cp_usage}, | 47 | {"cp", cp_mv_main, _BB_DIR_BIN, cp_usage}, |
45 | #endif | 48 | #endif |
@@ -235,6 +238,9 @@ const struct BB_applet applets[] = { | |||
235 | #ifdef BB_RDATE | 238 | #ifdef BB_RDATE |
236 | {"rdate", rdate_main, _BB_DIR_USR_BIN, rdate_usage}, | 239 | {"rdate", rdate_main, _BB_DIR_USR_BIN, rdate_usage}, |
237 | #endif | 240 | #endif |
241 | #ifdef BB_READLINK | ||
242 | {"readlink", readlink_main, _BB_DIR_USR_BIN, readlink_usage}, | ||
243 | #endif | ||
238 | #ifdef BB_REBOOT | 244 | #ifdef BB_REBOOT |
239 | {"reboot", reboot_main, _BB_DIR_SBIN, reboot_usage}, | 245 | {"reboot", reboot_main, _BB_DIR_SBIN, reboot_usage}, |
240 | #endif | 246 | #endif |
diff --git a/applets/usage.c b/applets/usage.c index ae6cbaa7c..81f4cfc0e 100644 --- a/applets/usage.c +++ b/applets/usage.c | |||
@@ -93,6 +93,15 @@ const char clear_usage[] = | |||
93 | ; | 93 | ; |
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | #if defined BB_CMP | ||
97 | const char cmp_usage[] = | ||
98 | "cmp FILE1 [FILE2]\n" | ||
99 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
100 | "\nCompare files.\n" | ||
101 | #endif | ||
102 | ; | ||
103 | #endif | ||
104 | |||
96 | #if defined BB_CP_MV | 105 | #if defined BB_CP_MV |
97 | const char cp_usage[] = | 106 | const char cp_usage[] = |
98 | "cp [OPTION]... SOURCE DEST\n" | 107 | "cp [OPTION]... SOURCE DEST\n" |
@@ -959,6 +968,15 @@ const char rdate_usage[] = | |||
959 | ; | 968 | ; |
960 | #endif | 969 | #endif |
961 | 970 | ||
971 | #if defined BB_READLINK | ||
972 | const char readlink_usage[] = | ||
973 | "readlink\n" | ||
974 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
975 | "\nRead a symbolic link.\n" | ||
976 | #endif | ||
977 | ; | ||
978 | #endif | ||
979 | |||
962 | #if defined BB_REBOOT | 980 | #if defined BB_REBOOT |
963 | const char reboot_usage[] = | 981 | const char reboot_usage[] = |
964 | "reboot\n" | 982 | "reboot\n" |
@@ -967,7 +985,6 @@ const char reboot_usage[] = | |||
967 | #endif | 985 | #endif |
968 | ; | 986 | ; |
969 | #endif | 987 | #endif |
970 | |||
971 | 988 | ||
972 | #if defined BB_RENICE | 989 | #if defined BB_RENICE |
973 | const char renice_usage[] = | 990 | const char renice_usage[] = |
@@ -40,6 +40,9 @@ const struct BB_applet applets[] = { | |||
40 | #ifdef BB_CHVT | 40 | #ifdef BB_CHVT |
41 | {"chvt", chvt_main, _BB_DIR_USR_BIN, chvt_usage}, | 41 | {"chvt", chvt_main, _BB_DIR_USR_BIN, chvt_usage}, |
42 | #endif | 42 | #endif |
43 | #ifdef BB_CMP | ||
44 | {"cmp", cmp_main, _BB_DIR_USR_BIN, cmp_usage}, | ||
45 | #endif | ||
43 | #ifdef BB_CP_MV | 46 | #ifdef BB_CP_MV |
44 | {"cp", cp_mv_main, _BB_DIR_BIN, cp_usage}, | 47 | {"cp", cp_mv_main, _BB_DIR_BIN, cp_usage}, |
45 | #endif | 48 | #endif |
@@ -235,6 +238,9 @@ const struct BB_applet applets[] = { | |||
235 | #ifdef BB_RDATE | 238 | #ifdef BB_RDATE |
236 | {"rdate", rdate_main, _BB_DIR_USR_BIN, rdate_usage}, | 239 | {"rdate", rdate_main, _BB_DIR_USR_BIN, rdate_usage}, |
237 | #endif | 240 | #endif |
241 | #ifdef BB_READLINK | ||
242 | {"readlink", readlink_main, _BB_DIR_USR_BIN, readlink_usage}, | ||
243 | #endif | ||
238 | #ifdef BB_REBOOT | 244 | #ifdef BB_REBOOT |
239 | {"reboot", reboot_main, _BB_DIR_SBIN, reboot_usage}, | 245 | {"reboot", reboot_main, _BB_DIR_SBIN, reboot_usage}, |
240 | #endif | 246 | #endif |
@@ -117,6 +117,7 @@ extern int chmod_chown_chgrp_main(int argc, char** argv); | |||
117 | extern int chroot_main(int argc, char** argv); | 117 | extern int chroot_main(int argc, char** argv); |
118 | extern int chvt_main(int argc, char** argv); | 118 | extern int chvt_main(int argc, char** argv); |
119 | extern int clear_main(int argc, char** argv); | 119 | extern int clear_main(int argc, char** argv); |
120 | extern int cmp_main(int argc, char** argv); | ||
120 | extern int cp_mv_main(int argc, char** argv); | 121 | extern int cp_mv_main(int argc, char** argv); |
121 | extern int cut_main(int argc, char** argv); | 122 | extern int cut_main(int argc, char** argv); |
122 | extern int date_main(int argc, char** argv); | 123 | extern int date_main(int argc, char** argv); |
@@ -181,6 +182,7 @@ extern int printf_main(int argc, char** argv); | |||
181 | extern int ps_main(int argc, char** argv); | 182 | extern int ps_main(int argc, char** argv); |
182 | extern int pwd_main(int argc, char** argv); | 183 | extern int pwd_main(int argc, char** argv); |
183 | extern int rdate_main(int argc, char** argv); | 184 | extern int rdate_main(int argc, char** argv); |
185 | extern int readlink_main(int argc, char** argv); | ||
184 | extern int reboot_main(int argc, char** argv); | 186 | extern int reboot_main(int argc, char** argv); |
185 | extern int renice_main(int argc, char** argv); | 187 | extern int renice_main(int argc, char** argv); |
186 | extern int reset_main(int argc, char** argv); | 188 | extern int reset_main(int argc, char** argv); |
@@ -233,6 +235,7 @@ extern const char chown_usage[]; | |||
233 | extern const char chroot_usage[]; | 235 | extern const char chroot_usage[]; |
234 | extern const char chvt_usage[]; | 236 | extern const char chvt_usage[]; |
235 | extern const char clear_usage[]; | 237 | extern const char clear_usage[]; |
238 | extern const char cmp_usage[]; | ||
236 | extern const char cp_usage[]; | 239 | extern const char cp_usage[]; |
237 | extern const char cut_usage[]; | 240 | extern const char cut_usage[]; |
238 | extern const char date_usage[]; | 241 | extern const char date_usage[]; |
@@ -294,6 +297,7 @@ extern const char printf_usage[]; | |||
294 | extern const char ps_usage[]; | 297 | extern const char ps_usage[]; |
295 | extern const char pwd_usage[]; | 298 | extern const char pwd_usage[]; |
296 | extern const char rdate_usage[]; | 299 | extern const char rdate_usage[]; |
300 | extern const char readlink_usage[]; | ||
297 | extern const char reboot_usage[]; | 301 | extern const char reboot_usage[]; |
298 | extern const char renice_usage[]; | 302 | extern const char renice_usage[]; |
299 | extern const char reset_usage[]; | 303 | extern const char reset_usage[]; |
@@ -0,0 +1,65 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | * Mini cmp implementation for busybox | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2000 by Lineo, inc. | ||
7 | * Written by Matt Kraai <kraai@alumni.carnegiemellon.edu> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #include "busybox.h" | ||
26 | #include <stdio.h> | ||
27 | #include <string.h> | ||
28 | #include <errno.h> | ||
29 | |||
30 | int cmp_main(int argc, char **argv) | ||
31 | { | ||
32 | FILE *fp1 = NULL, *fp2 = stdin; | ||
33 | char *filename1 = argv[1], *filename2 = "-"; | ||
34 | int c1, c2, char_pos = 1, line_pos = 1; | ||
35 | |||
36 | /* parse argv[] */ | ||
37 | if (argc < 2 || 3 < argc) | ||
38 | usage(cmp_usage); | ||
39 | |||
40 | fp1 = xfopen(argv[1], "r"); | ||
41 | if (argv[2] != NULL) { | ||
42 | fp2 = xfopen(argv[2], "r"); | ||
43 | filename2 = argv[2]; | ||
44 | } | ||
45 | |||
46 | do { | ||
47 | c1 = fgetc(fp1); | ||
48 | c2 = fgetc(fp2); | ||
49 | if (c1 != c2) { | ||
50 | if (c1 == EOF) | ||
51 | printf("EOF on %s\n", filename1); | ||
52 | else if (c2 == EOF) | ||
53 | printf("EOF on %s\n", filename2); | ||
54 | else | ||
55 | printf("%s %s differ: char %d, line %d\n", filename1, filename2, | ||
56 | char_pos, line_pos); | ||
57 | return 1; | ||
58 | } | ||
59 | char_pos++; | ||
60 | if (c1 == '\n') | ||
61 | line_pos++; | ||
62 | } while (c1 != EOF); | ||
63 | |||
64 | return EXIT_SUCCESS; | ||
65 | } | ||
diff --git a/coreutils/cmp.c b/coreutils/cmp.c new file mode 100644 index 000000000..98b747eed --- /dev/null +++ b/coreutils/cmp.c | |||
@@ -0,0 +1,65 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | * Mini cmp implementation for busybox | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2000 by Lineo, inc. | ||
7 | * Written by Matt Kraai <kraai@alumni.carnegiemellon.edu> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #include "busybox.h" | ||
26 | #include <stdio.h> | ||
27 | #include <string.h> | ||
28 | #include <errno.h> | ||
29 | |||
30 | int cmp_main(int argc, char **argv) | ||
31 | { | ||
32 | FILE *fp1 = NULL, *fp2 = stdin; | ||
33 | char *filename1 = argv[1], *filename2 = "-"; | ||
34 | int c1, c2, char_pos = 1, line_pos = 1; | ||
35 | |||
36 | /* parse argv[] */ | ||
37 | if (argc < 2 || 3 < argc) | ||
38 | usage(cmp_usage); | ||
39 | |||
40 | fp1 = xfopen(argv[1], "r"); | ||
41 | if (argv[2] != NULL) { | ||
42 | fp2 = xfopen(argv[2], "r"); | ||
43 | filename2 = argv[2]; | ||
44 | } | ||
45 | |||
46 | do { | ||
47 | c1 = fgetc(fp1); | ||
48 | c2 = fgetc(fp2); | ||
49 | if (c1 != c2) { | ||
50 | if (c1 == EOF) | ||
51 | printf("EOF on %s\n", filename1); | ||
52 | else if (c2 == EOF) | ||
53 | printf("EOF on %s\n", filename2); | ||
54 | else | ||
55 | printf("%s %s differ: char %d, line %d\n", filename1, filename2, | ||
56 | char_pos, line_pos); | ||
57 | return 1; | ||
58 | } | ||
59 | char_pos++; | ||
60 | if (c1 == '\n') | ||
61 | line_pos++; | ||
62 | } while (c1 != EOF); | ||
63 | |||
64 | return EXIT_SUCCESS; | ||
65 | } | ||
diff --git a/include/busybox.h b/include/busybox.h index da17b8ab3..84d0ddad8 100644 --- a/include/busybox.h +++ b/include/busybox.h | |||
@@ -117,6 +117,7 @@ extern int chmod_chown_chgrp_main(int argc, char** argv); | |||
117 | extern int chroot_main(int argc, char** argv); | 117 | extern int chroot_main(int argc, char** argv); |
118 | extern int chvt_main(int argc, char** argv); | 118 | extern int chvt_main(int argc, char** argv); |
119 | extern int clear_main(int argc, char** argv); | 119 | extern int clear_main(int argc, char** argv); |
120 | extern int cmp_main(int argc, char** argv); | ||
120 | extern int cp_mv_main(int argc, char** argv); | 121 | extern int cp_mv_main(int argc, char** argv); |
121 | extern int cut_main(int argc, char** argv); | 122 | extern int cut_main(int argc, char** argv); |
122 | extern int date_main(int argc, char** argv); | 123 | extern int date_main(int argc, char** argv); |
@@ -181,6 +182,7 @@ extern int printf_main(int argc, char** argv); | |||
181 | extern int ps_main(int argc, char** argv); | 182 | extern int ps_main(int argc, char** argv); |
182 | extern int pwd_main(int argc, char** argv); | 183 | extern int pwd_main(int argc, char** argv); |
183 | extern int rdate_main(int argc, char** argv); | 184 | extern int rdate_main(int argc, char** argv); |
185 | extern int readlink_main(int argc, char** argv); | ||
184 | extern int reboot_main(int argc, char** argv); | 186 | extern int reboot_main(int argc, char** argv); |
185 | extern int renice_main(int argc, char** argv); | 187 | extern int renice_main(int argc, char** argv); |
186 | extern int reset_main(int argc, char** argv); | 188 | extern int reset_main(int argc, char** argv); |
@@ -233,6 +235,7 @@ extern const char chown_usage[]; | |||
233 | extern const char chroot_usage[]; | 235 | extern const char chroot_usage[]; |
234 | extern const char chvt_usage[]; | 236 | extern const char chvt_usage[]; |
235 | extern const char clear_usage[]; | 237 | extern const char clear_usage[]; |
238 | extern const char cmp_usage[]; | ||
236 | extern const char cp_usage[]; | 239 | extern const char cp_usage[]; |
237 | extern const char cut_usage[]; | 240 | extern const char cut_usage[]; |
238 | extern const char date_usage[]; | 241 | extern const char date_usage[]; |
@@ -294,6 +297,7 @@ extern const char printf_usage[]; | |||
294 | extern const char ps_usage[]; | 297 | extern const char ps_usage[]; |
295 | extern const char pwd_usage[]; | 298 | extern const char pwd_usage[]; |
296 | extern const char rdate_usage[]; | 299 | extern const char rdate_usage[]; |
300 | extern const char readlink_usage[]; | ||
297 | extern const char reboot_usage[]; | 301 | extern const char reboot_usage[]; |
298 | extern const char renice_usage[]; | 302 | extern const char renice_usage[]; |
299 | extern const char reset_usage[]; | 303 | extern const char reset_usage[]; |
diff --git a/miscutils/readlink.c b/miscutils/readlink.c new file mode 100644 index 000000000..5a798c0ea --- /dev/null +++ b/miscutils/readlink.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | * Mini readlink implementation for busybox | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2000 by Lineo, inc. | ||
7 | * Written by Matt Kraai <kraai@alumni.carnegiemellon.edu> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #include "busybox.h" | ||
26 | #include <errno.h> | ||
27 | #include <unistd.h> | ||
28 | |||
29 | int readlink_main(int argc, char **argv) | ||
30 | { | ||
31 | char *buf = NULL; | ||
32 | int bufsize = 128, size = 128; | ||
33 | |||
34 | if (argc != 2) | ||
35 | usage(readlink_usage); | ||
36 | |||
37 | while (bufsize < size + 1) { | ||
38 | bufsize *= 2; | ||
39 | buf = xrealloc(buf, bufsize); | ||
40 | size = readlink(argv[1], buf, bufsize); | ||
41 | if (size == -1) | ||
42 | fatalError("%s: %s\n", argv[1], strerror(errno)); | ||
43 | } | ||
44 | |||
45 | buf[size] = '\0'; | ||
46 | puts(buf); | ||
47 | |||
48 | return EXIT_SUCCESS; | ||
49 | } | ||
diff --git a/readlink.c b/readlink.c new file mode 100644 index 000000000..5a798c0ea --- /dev/null +++ b/readlink.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | * Mini readlink implementation for busybox | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2000 by Lineo, inc. | ||
7 | * Written by Matt Kraai <kraai@alumni.carnegiemellon.edu> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #include "busybox.h" | ||
26 | #include <errno.h> | ||
27 | #include <unistd.h> | ||
28 | |||
29 | int readlink_main(int argc, char **argv) | ||
30 | { | ||
31 | char *buf = NULL; | ||
32 | int bufsize = 128, size = 128; | ||
33 | |||
34 | if (argc != 2) | ||
35 | usage(readlink_usage); | ||
36 | |||
37 | while (bufsize < size + 1) { | ||
38 | bufsize *= 2; | ||
39 | buf = xrealloc(buf, bufsize); | ||
40 | size = readlink(argv[1], buf, bufsize); | ||
41 | if (size == -1) | ||
42 | fatalError("%s: %s\n", argv[1], strerror(errno)); | ||
43 | } | ||
44 | |||
45 | buf[size] = '\0'; | ||
46 | puts(buf); | ||
47 | |||
48 | return EXIT_SUCCESS; | ||
49 | } | ||
@@ -93,6 +93,15 @@ const char clear_usage[] = | |||
93 | ; | 93 | ; |
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | #if defined BB_CMP | ||
97 | const char cmp_usage[] = | ||
98 | "cmp FILE1 [FILE2]\n" | ||
99 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
100 | "\nCompare files.\n" | ||
101 | #endif | ||
102 | ; | ||
103 | #endif | ||
104 | |||
96 | #if defined BB_CP_MV | 105 | #if defined BB_CP_MV |
97 | const char cp_usage[] = | 106 | const char cp_usage[] = |
98 | "cp [OPTION]... SOURCE DEST\n" | 107 | "cp [OPTION]... SOURCE DEST\n" |
@@ -959,6 +968,15 @@ const char rdate_usage[] = | |||
959 | ; | 968 | ; |
960 | #endif | 969 | #endif |
961 | 970 | ||
971 | #if defined BB_READLINK | ||
972 | const char readlink_usage[] = | ||
973 | "readlink\n" | ||
974 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
975 | "\nRead a symbolic link.\n" | ||
976 | #endif | ||
977 | ; | ||
978 | #endif | ||
979 | |||
962 | #if defined BB_REBOOT | 980 | #if defined BB_REBOOT |
963 | const char reboot_usage[] = | 981 | const char reboot_usage[] = |
964 | "reboot\n" | 982 | "reboot\n" |
@@ -967,7 +985,6 @@ const char reboot_usage[] = | |||
967 | #endif | 985 | #endif |
968 | ; | 986 | ; |
969 | #endif | 987 | #endif |
970 | |||
971 | 988 | ||
972 | #if defined BB_RENICE | 989 | #if defined BB_RENICE |
973 | const char renice_usage[] = | 990 | const char renice_usage[] = |