aboutsummaryrefslogtreecommitdiff
path: root/include/applets.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/applets.h')
-rw-r--r--include/applets.h286
1 files changed, 150 insertions, 136 deletions
diff --git a/include/applets.h b/include/applets.h
index 0b70a6120..cb744567a 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -10,403 +10,417 @@
10 * file result in the listing remaining in ascii order. You have been warned. 10 * file result in the listing remaining in ascii order. You have been warned.
11 */ 11 */
12 12
13#undef APPLET
14#undef APPLET_ODDNAME
15#undef APPLET_NOUSAGE
16
13#if defined(PROTOTYPES) 17#if defined(PROTOTYPES)
14#define APPLET(a,b,c,d) \ 18#define APPLET(a,b,c) \
15 extern int b(int argc, char **argv); \ 19 extern int b(int argc, char **argv);
16 extern const char d[]; 20#define APPLET_ODDNAME(a,b,c,d,e) APPLET(a,b,c)
17#define APPLET_NOUSAGE(a,b,c) \ 21#define APPLET_NOUSAGE(a,b,c) \
18 extern int b(int argc, char **argv); 22 extern int b(int argc, char **argv);
19#elif defined(MAKE_LINKS) 23#elif defined(MAKE_LINKS)
20#define APPLET(a,b,c,d) LINK c a 24#define APPLET(a,b,c) LINK c #a
21#define APPLET_NOUSAGE(a,b,c) LINK c a 25#define APPLET_ODDNAME(a,b,c,d,e) LINK c a
26#define APPLET_NOUSAGE(a,b,c) LINK c #a
27#elif defined(APPLET_ENUM)
28#define APPLET(a,b,c) a##_applet_number,
29#define APPLET_ODDNAME(a,b,c,d,e) e##_applet_number,
30#define APPLET_NOUSAGE(a,b,c) a##applet_number,
22#else 31#else
32#define USAGE_ENUM
33#include "usage.h"
23const struct BB_applet applets[] = { 34const struct BB_applet applets[] = {
24#define APPLET(a,b,c,d) {a,b,c,d}, 35#define APPLET(a,b,c) {#a,b,c,a##_usage_index},
25#define APPLET_NOUSAGE(a,b,c) {a,b,c,NULL}, 36#define APPLET_ODDNAME(a,b,c,d,e) {a,b,c,d},
37#define APPLET_NOUSAGE(a,b,c) {#a,b,c,-1},
38#define zcat_usage_index gunzip_usage_index
39#define sh_usage_index shell_usage_index
26#endif 40#endif
27 41
28#ifdef BB_TEST 42#ifdef BB_TEST
29 APPLET("[", test_main, _BB_DIR_USR_BIN, test_usage) 43 APPLET_ODDNAME("[", test_main, _BB_DIR_USR_BIN, test_usage_index, open_bracket)
30#endif 44#endif
31#ifdef BB_AR 45#ifdef BB_AR
32 APPLET("ar", ar_main, _BB_DIR_USR_BIN, ar_usage) 46 APPLET(ar, ar_main, _BB_DIR_USR_BIN)
33#endif 47#endif
34#ifdef BB_BASENAME 48#ifdef BB_BASENAME
35 APPLET("basename", basename_main, _BB_DIR_USR_BIN, basename_usage) 49 APPLET(basename, basename_main, _BB_DIR_USR_BIN)
36#endif 50#endif
37 APPLET_NOUSAGE("busybox", busybox_main, _BB_DIR_BIN) 51 APPLET_NOUSAGE(busybox, busybox_main, _BB_DIR_BIN)
38#ifdef BB_CAT 52#ifdef BB_CAT
39 APPLET("cat", cat_main, _BB_DIR_BIN, cat_usage) 53 APPLET(cat, cat_main, _BB_DIR_BIN)
40#endif 54#endif
41#ifdef BB_CHMOD_CHOWN_CHGRP 55#ifdef BB_CHMOD_CHOWN_CHGRP
42 APPLET("chgrp", chmod_chown_chgrp_main, _BB_DIR_BIN, chgrp_usage) 56 APPLET(chgrp, chmod_chown_chgrp_main, _BB_DIR_BIN)
43#endif 57#endif
44#ifdef BB_CHMOD_CHOWN_CHGRP 58#ifdef BB_CHMOD_CHOWN_CHGRP
45 APPLET("chmod", chmod_chown_chgrp_main, _BB_DIR_BIN, chmod_usage) 59 APPLET(chmod, chmod_chown_chgrp_main, _BB_DIR_BIN)
46#endif 60#endif
47#ifdef BB_CHMOD_CHOWN_CHGRP 61#ifdef BB_CHMOD_CHOWN_CHGRP
48 APPLET("chown", chmod_chown_chgrp_main, _BB_DIR_BIN, chown_usage) 62 APPLET(chown, chmod_chown_chgrp_main, _BB_DIR_BIN)
49#endif 63#endif
50#ifdef BB_CHROOT 64#ifdef BB_CHROOT
51 APPLET("chroot", chroot_main, _BB_DIR_USR_SBIN, chroot_usage) 65 APPLET(chroot, chroot_main, _BB_DIR_USR_SBIN)
52#endif 66#endif
53#ifdef BB_CHVT 67#ifdef BB_CHVT
54 APPLET("chvt", chvt_main, _BB_DIR_USR_BIN, chvt_usage) 68 APPLET(chvt, chvt_main, _BB_DIR_USR_BIN)
55#endif 69#endif
56#ifdef BB_CLEAR 70#ifdef BB_CLEAR
57 APPLET("clear", clear_main, _BB_DIR_USR_BIN, clear_usage) 71 APPLET(clear, clear_main, _BB_DIR_USR_BIN)
58#endif 72#endif
59#ifdef BB_CMP 73#ifdef BB_CMP
60 APPLET("cmp", cmp_main, _BB_DIR_USR_BIN, cmp_usage) 74 APPLET(cmp, cmp_main, _BB_DIR_USR_BIN)
61#endif 75#endif
62#ifdef BB_CP_MV 76#ifdef BB_CP_MV
63 APPLET("cp", cp_mv_main, _BB_DIR_BIN, cp_usage) 77 APPLET(cp, cp_mv_main, _BB_DIR_BIN)
64#endif 78#endif
65#ifdef BB_CUT 79#ifdef BB_CUT
66 APPLET("cut", cut_main, _BB_DIR_USR_BIN, cut_usage) 80 APPLET(cut, cut_main, _BB_DIR_USR_BIN)
67#endif 81#endif
68#ifdef BB_DATE 82#ifdef BB_DATE
69 APPLET("date", date_main, _BB_DIR_BIN, date_usage) 83 APPLET(date, date_main, _BB_DIR_BIN)
70#endif 84#endif
71#ifdef BB_DC 85#ifdef BB_DC
72 APPLET("dc", dc_main, _BB_DIR_USR_BIN, dc_usage) 86 APPLET(dc, dc_main, _BB_DIR_USR_BIN)
73#endif 87#endif
74#ifdef BB_DD 88#ifdef BB_DD
75 APPLET("dd", dd_main, _BB_DIR_BIN, dd_usage) 89 APPLET(dd, dd_main, _BB_DIR_BIN)
76#endif 90#endif
77#ifdef BB_DEALLOCVT 91#ifdef BB_DEALLOCVT
78 APPLET("deallocvt", deallocvt_main, _BB_DIR_USR_BIN, deallocvt_usage) 92 APPLET(deallocvt, deallocvt_main, _BB_DIR_USR_BIN)
79#endif 93#endif
80#ifdef BB_DF 94#ifdef BB_DF
81 APPLET("df", df_main, _BB_DIR_BIN, df_usage) 95 APPLET(df, df_main, _BB_DIR_BIN)
82#endif 96#endif
83#ifdef BB_DIRNAME 97#ifdef BB_DIRNAME
84 APPLET("dirname", dirname_main, _BB_DIR_USR_BIN, dirname_usage) 98 APPLET(dirname, dirname_main, _BB_DIR_USR_BIN)
85#endif 99#endif
86#ifdef BB_DMESG 100#ifdef BB_DMESG
87 APPLET("dmesg", dmesg_main, _BB_DIR_BIN, dmesg_usage) 101 APPLET(dmesg, dmesg_main, _BB_DIR_BIN)
88#endif 102#endif
89#ifdef BB_DOS2UNIX 103#ifdef BB_DOS2UNIX
90 APPLET("dos2unix", dos2unix_main, _BB_DIR_USR_BIN, dos2unix_usage) 104 APPLET(dos2unix, dos2unix_main, _BB_DIR_USR_BIN)
91#endif 105#endif
92#ifdef BB_DPKG 106#ifdef BB_DPKG
93 APPLET("dpkg", dpkg_main, _BB_DIR_USR_BIN, dpkg_usage) 107 APPLET(dpkg, dpkg_main, _BB_DIR_USR_BIN)
94#endif 108#endif
95#ifdef BB_DPKG_DEB 109#ifdef BB_DPKG_DEB
96 APPLET("dpkg-deb", dpkg_deb_main, _BB_DIR_USR_BIN, dpkg_deb_usage) 110 APPLET_ODDNAME("dpkg-deb", dpkg_deb_main, _BB_DIR_USR_BIN, dpkg_deb_usage_index, dpkg_deb)
97#endif 111#endif
98#ifdef BB_DU 112#ifdef BB_DU
99 APPLET("du", du_main, _BB_DIR_USR_BIN, du_usage) 113 APPLET(du, du_main, _BB_DIR_USR_BIN)
100#endif 114#endif
101#ifdef BB_DUMPKMAP 115#ifdef BB_DUMPKMAP
102 APPLET("dumpkmap", dumpkmap_main, _BB_DIR_BIN, dumpkmap_usage) 116 APPLET(dumpkmap, dumpkmap_main, _BB_DIR_BIN)
103#endif 117#endif
104#ifdef BB_DUTMP 118#ifdef BB_DUTMP
105 APPLET("dutmp", dutmp_main, _BB_DIR_USR_SBIN, dutmp_usage) 119 APPLET(dutmp, dutmp_main, _BB_DIR_USR_SBIN)
106#endif 120#endif
107#ifdef BB_ECHO 121#ifdef BB_ECHO
108 APPLET("echo", echo_main, _BB_DIR_BIN, echo_usage) 122 APPLET(echo, echo_main, _BB_DIR_BIN)
109#endif 123#endif
110#ifdef BB_EXPR 124#ifdef BB_EXPR
111 APPLET("expr", expr_main, _BB_DIR_USR_BIN, expr_usage) 125 APPLET(expr, expr_main, _BB_DIR_USR_BIN)
112#endif 126#endif
113#ifdef BB_TRUE_FALSE 127#ifdef BB_TRUE_FALSE
114 APPLET("false", false_main, _BB_DIR_BIN, false_usage) 128 APPLET(false, false_main, _BB_DIR_BIN)
115#endif 129#endif
116#ifdef BB_FBSET 130#ifdef BB_FBSET
117 APPLET_NOUSAGE("fbset", fbset_main, _BB_DIR_USR_SBIN) 131 APPLET_NOUSAGE(fbset, fbset_main, _BB_DIR_USR_SBIN)
118#endif 132#endif
119#ifdef BB_FDFLUSH 133#ifdef BB_FDFLUSH
120 APPLET("fdflush", fdflush_main, _BB_DIR_BIN, fdflush_usage) 134 APPLET(fdflush, fdflush_main, _BB_DIR_BIN)
121#endif 135#endif
122#ifdef BB_FIND 136#ifdef BB_FIND
123 APPLET("find", find_main, _BB_DIR_USR_BIN, find_usage) 137 APPLET(find, find_main, _BB_DIR_USR_BIN)
124#endif 138#endif
125#ifdef BB_FREE 139#ifdef BB_FREE
126 APPLET("free", free_main, _BB_DIR_USR_BIN, free_usage) 140 APPLET(free, free_main, _BB_DIR_USR_BIN)
127#endif 141#endif
128#ifdef BB_FREERAMDISK 142#ifdef BB_FREERAMDISK
129 APPLET("freeramdisk", freeramdisk_main, _BB_DIR_SBIN, freeramdisk_usage) 143 APPLET(freeramdisk, freeramdisk_main, _BB_DIR_SBIN)
130#endif 144#endif
131#ifdef BB_FSCK_MINIX 145#ifdef BB_FSCK_MINIX
132 APPLET("fsck.minix", fsck_minix_main, _BB_DIR_SBIN, fsck_minix_usage) 146 APPLET_ODDNAME("fsck.minix", fsck_minix_main, _BB_DIR_SBIN, fsck_minix_usage_index, fsck_minix)
133#endif 147#endif
134#ifdef BB_GETOPT 148#ifdef BB_GETOPT
135 APPLET("getopt", getopt_main, _BB_DIR_BIN, getopt_usage) 149 APPLET(getopt, getopt_main, _BB_DIR_BIN)
136#endif 150#endif
137#ifdef BB_GREP 151#ifdef BB_GREP
138 APPLET("grep", grep_main, _BB_DIR_BIN, grep_usage) 152 APPLET(grep, grep_main, _BB_DIR_BIN)
139#endif 153#endif
140#ifdef BB_GUNZIP 154#ifdef BB_GUNZIP
141 APPLET("gunzip", gunzip_main, _BB_DIR_BIN, gunzip_usage) 155 APPLET(gunzip, gunzip_main, _BB_DIR_BIN)
142#endif 156#endif
143#ifdef BB_GZIP 157#ifdef BB_GZIP
144 APPLET("gzip", gzip_main, _BB_DIR_BIN, gzip_usage) 158 APPLET(gzip, gzip_main, _BB_DIR_BIN)
145#endif 159#endif
146#ifdef BB_HALT 160#ifdef BB_HALT
147 APPLET("halt", halt_main, _BB_DIR_SBIN, halt_usage) 161 APPLET(halt, halt_main, _BB_DIR_SBIN)
148#endif 162#endif
149#ifdef BB_HEAD 163#ifdef BB_HEAD
150 APPLET("head", head_main, _BB_DIR_USR_BIN, head_usage) 164 APPLET(head, head_main, _BB_DIR_USR_BIN)
151#endif 165#endif
152#ifdef BB_HOSTID 166#ifdef BB_HOSTID
153 APPLET("hostid", hostid_main, _BB_DIR_USR_BIN, hostid_usage) 167 APPLET(hostid, hostid_main, _BB_DIR_USR_BIN)
154#endif 168#endif
155#ifdef BB_HOSTNAME 169#ifdef BB_HOSTNAME
156 APPLET("hostname", hostname_main, _BB_DIR_BIN, hostname_usage) 170 APPLET(hostname, hostname_main, _BB_DIR_BIN)
157#endif 171#endif
158#ifdef BB_ID 172#ifdef BB_ID
159 APPLET("id", id_main, _BB_DIR_USR_BIN, id_usage) 173 APPLET(id, id_main, _BB_DIR_USR_BIN)
160#endif 174#endif
161#ifdef BB_IFCONFIG 175#ifdef BB_IFCONFIG
162 APPLET("ifconfig", ifconfig_main, _BB_DIR_SBIN, ifconfig_usage) 176 APPLET(ifconfig, ifconfig_main, _BB_DIR_SBIN)
163#endif 177#endif
164#ifdef BB_INIT 178#ifdef BB_INIT
165 APPLET_NOUSAGE("init", init_main, _BB_DIR_SBIN) 179 APPLET(init, init_main, _BB_DIR_SBIN)
166#endif 180#endif
167#ifdef BB_INSMOD 181#ifdef BB_INSMOD
168 APPLET("insmod", insmod_main, _BB_DIR_SBIN, insmod_usage) 182 APPLET(insmod, insmod_main, _BB_DIR_SBIN)
169#endif 183#endif
170#ifdef BB_KILL 184#ifdef BB_KILL
171 APPLET("kill", kill_main, _BB_DIR_BIN, kill_usage) 185 APPLET(kill, kill_main, _BB_DIR_BIN)
172#endif 186#endif
173#ifdef BB_KILLALL 187#ifdef BB_KILLALL
174 APPLET("killall", kill_main, _BB_DIR_USR_BIN, killall_usage) 188 APPLET(killall, kill_main, _BB_DIR_USR_BIN)
175#endif 189#endif
176#ifdef BB_LENGTH 190#ifdef BB_LENGTH
177 APPLET("length", length_main, _BB_DIR_USR_BIN, length_usage) 191 APPLET(length, length_main, _BB_DIR_USR_BIN)
178#endif 192#endif
179#ifdef BB_LINUXRC 193#ifdef BB_LINUXRC
180 APPLET_NOUSAGE("linuxrc", init_main, _BB_DIR_ROOT) 194 APPLET_NOUSAGE(linuxrc, init_main, _BB_DIR_ROOT)
181#endif 195#endif
182#ifdef BB_LN 196#ifdef BB_LN
183 APPLET("ln", ln_main, _BB_DIR_BIN, ln_usage) 197 APPLET(ln, ln_main, _BB_DIR_BIN)
184#endif 198#endif
185#ifdef BB_LOADACM 199#ifdef BB_LOADACM
186 APPLET("loadacm", loadacm_main, _BB_DIR_USR_BIN, loadacm_usage) 200 APPLET(loadacm, loadacm_main, _BB_DIR_USR_BIN)
187#endif 201#endif
188#ifdef BB_LOADFONT 202#ifdef BB_LOADFONT
189 APPLET("loadfont", loadfont_main, _BB_DIR_USR_BIN, loadfont_usage) 203 APPLET(loadfont, loadfont_main, _BB_DIR_USR_BIN)
190#endif 204#endif
191#ifdef BB_LOADKMAP 205#ifdef BB_LOADKMAP
192 APPLET("loadkmap", loadkmap_main, _BB_DIR_SBIN, loadkmap_usage) 206 APPLET(loadkmap, loadkmap_main, _BB_DIR_SBIN)
193#endif 207#endif
194#ifdef BB_LOGGER 208#ifdef BB_LOGGER
195 APPLET("logger", logger_main, _BB_DIR_USR_BIN, logger_usage) 209 APPLET(logger, logger_main, _BB_DIR_USR_BIN)
196#endif 210#endif
197#ifdef BB_LOGNAME 211#ifdef BB_LOGNAME
198 APPLET("logname", logname_main, _BB_DIR_USR_BIN, logname_usage) 212 APPLET(logname, logname_main, _BB_DIR_USR_BIN)
199#endif 213#endif
200#ifdef BB_LS 214#ifdef BB_LS
201 APPLET("ls", ls_main, _BB_DIR_BIN, ls_usage) 215 APPLET(ls, ls_main, _BB_DIR_BIN)
202#endif 216#endif
203#ifdef BB_LSMOD 217#ifdef BB_LSMOD
204 APPLET("lsmod", lsmod_main, _BB_DIR_SBIN, lsmod_usage) 218 APPLET(lsmod, lsmod_main, _BB_DIR_SBIN)
205#endif 219#endif
206#ifdef BB_MAKEDEVS 220#ifdef BB_MAKEDEVS
207 APPLET("makedevs", makedevs_main, _BB_DIR_SBIN, makedevs_usage) 221 APPLET(makedevs, makedevs_main, _BB_DIR_SBIN)
208#endif 222#endif
209#ifdef BB_MD5SUM 223#ifdef BB_MD5SUM
210 APPLET("md5sum", md5sum_main, _BB_DIR_USR_BIN, md5sum_usage) 224 APPLET(md5sum, md5sum_main, _BB_DIR_USR_BIN)
211#endif 225#endif
212#ifdef BB_MKDIR 226#ifdef BB_MKDIR
213 APPLET("mkdir", mkdir_main, _BB_DIR_BIN, mkdir_usage) 227 APPLET(mkdir, mkdir_main, _BB_DIR_BIN)
214#endif 228#endif
215#ifdef BB_MKFIFO 229#ifdef BB_MKFIFO
216 APPLET("mkfifo", mkfifo_main, _BB_DIR_USR_BIN, mkfifo_usage) 230 APPLET(mkfifo, mkfifo_main, _BB_DIR_USR_BIN)
217#endif 231#endif
218#ifdef BB_MKFS_MINIX 232#ifdef BB_MKFS_MINIX
219 APPLET("mkfs.minix", mkfs_minix_main, _BB_DIR_SBIN, mkfs_minix_usage) 233 APPLET_ODDNAME("mkfs.minix", mkfs_minix_main, _BB_DIR_SBIN, mkfs_minix_usage_index, mkfs_minix)
220#endif 234#endif
221#ifdef BB_MKNOD 235#ifdef BB_MKNOD
222 APPLET("mknod", mknod_main, _BB_DIR_BIN, mknod_usage) 236 APPLET(mknod, mknod_main, _BB_DIR_BIN)
223#endif 237#endif
224#ifdef BB_MKSWAP 238#ifdef BB_MKSWAP
225 APPLET("mkswap", mkswap_main, _BB_DIR_SBIN, mkswap_usage) 239 APPLET(mkswap, mkswap_main, _BB_DIR_SBIN)
226#endif 240#endif
227#ifdef BB_MKTEMP 241#ifdef BB_MKTEMP
228 APPLET("mktemp", mktemp_main, _BB_DIR_BIN, mktemp_usage) 242 APPLET(mktemp, mktemp_main, _BB_DIR_BIN)
229#endif 243#endif
230#ifdef BB_MORE 244#ifdef BB_MORE
231 APPLET("more", more_main, _BB_DIR_BIN, more_usage) 245 APPLET(more, more_main, _BB_DIR_BIN)
232#endif 246#endif
233#ifdef BB_MOUNT 247#ifdef BB_MOUNT
234 APPLET("mount", mount_main, _BB_DIR_BIN, mount_usage) 248 APPLET(mount, mount_main, _BB_DIR_BIN)
235#endif 249#endif
236#ifdef BB_MT 250#ifdef BB_MT
237 APPLET("mt", mt_main, _BB_DIR_BIN, mt_usage) 251 APPLET(mt, mt_main, _BB_DIR_BIN)
238#endif 252#endif
239#ifdef BB_CP_MV 253#ifdef BB_CP_MV
240 APPLET("mv", cp_mv_main, _BB_DIR_BIN, mv_usage) 254 APPLET(mv, cp_mv_main, _BB_DIR_BIN)
241#endif 255#endif
242#ifdef BB_NC 256#ifdef BB_NC
243 APPLET("nc", nc_main, _BB_DIR_USR_BIN, nc_usage) 257 APPLET(nc, nc_main, _BB_DIR_USR_BIN)
244#endif 258#endif
245#ifdef BB_NSLOOKUP 259#ifdef BB_NSLOOKUP
246 APPLET("nslookup", nslookup_main, _BB_DIR_USR_BIN, nslookup_usage) 260 APPLET(nslookup, nslookup_main, _BB_DIR_USR_BIN)
247#endif 261#endif
248#ifdef BB_PING 262#ifdef BB_PING
249 APPLET("ping", ping_main, _BB_DIR_BIN, ping_usage) 263 APPLET(ping, ping_main, _BB_DIR_BIN)
250#endif 264#endif
251#ifdef BB_PIVOT_ROOT 265#ifdef BB_PIVOT_ROOT
252 APPLET("pivot_root", pivot_root_main, _BB_DIR_SBIN, pivot_root_usage) 266 APPLET(pivot_root, pivot_root_main, _BB_DIR_SBIN)
253#endif 267#endif
254#ifdef BB_POWEROFF 268#ifdef BB_POWEROFF
255 APPLET("poweroff", poweroff_main, _BB_DIR_SBIN, poweroff_usage) 269 APPLET(poweroff, poweroff_main, _BB_DIR_SBIN)
256#endif 270#endif
257#ifdef BB_PRINTF 271#ifdef BB_PRINTF
258 APPLET("printf", printf_main, _BB_DIR_USR_BIN, printf_usage) 272 APPLET(printf, printf_main, _BB_DIR_USR_BIN)
259#endif 273#endif
260#ifdef BB_PS 274#ifdef BB_PS
261 APPLET("ps", ps_main, _BB_DIR_BIN, ps_usage) 275 APPLET(ps, ps_main, _BB_DIR_BIN)
262#endif 276#endif
263#ifdef BB_PWD 277#ifdef BB_PWD
264 APPLET("pwd", pwd_main, _BB_DIR_BIN, pwd_usage) 278 APPLET(pwd, pwd_main, _BB_DIR_BIN)
265#endif 279#endif
266#ifdef BB_RDATE 280#ifdef BB_RDATE
267 APPLET("rdate", rdate_main, _BB_DIR_USR_BIN, rdate_usage) 281 APPLET(rdate, rdate_main, _BB_DIR_USR_BIN)
268#endif 282#endif
269#ifdef BB_READLINK 283#ifdef BB_READLINK
270 APPLET("readlink", readlink_main, _BB_DIR_USR_BIN, readlink_usage) 284 APPLET(readlink, readlink_main, _BB_DIR_USR_BIN)
271#endif 285#endif
272#ifdef BB_REBOOT 286#ifdef BB_REBOOT
273 APPLET("reboot", reboot_main, _BB_DIR_SBIN, reboot_usage) 287 APPLET(reboot, reboot_main, _BB_DIR_SBIN)
274#endif 288#endif
275#ifdef BB_RENICE 289#ifdef BB_RENICE
276 APPLET("renice", renice_main, _BB_DIR_USR_BIN, renice_usage) 290 APPLET(renice, renice_main, _BB_DIR_USR_BIN)
277#endif 291#endif
278#ifdef BB_RESET 292#ifdef BB_RESET
279 APPLET("reset", reset_main, _BB_DIR_USR_BIN, reset_usage) 293 APPLET(reset, reset_main, _BB_DIR_USR_BIN)
280#endif 294#endif
281#ifdef BB_RM 295#ifdef BB_RM
282 APPLET("rm", rm_main, _BB_DIR_BIN, rm_usage) 296 APPLET(rm, rm_main, _BB_DIR_BIN)
283#endif 297#endif
284#ifdef BB_RMDIR 298#ifdef BB_RMDIR
285 APPLET("rmdir", rmdir_main, _BB_DIR_BIN, rmdir_usage) 299 APPLET(rmdir, rmdir_main, _BB_DIR_BIN)
286#endif 300#endif
287#ifdef BB_RMMOD 301#ifdef BB_RMMOD
288 APPLET("rmmod", rmmod_main, _BB_DIR_SBIN, rmmod_usage) 302 APPLET(rmmod, rmmod_main, _BB_DIR_SBIN)
289#endif 303#endif
290#ifdef BB_ROUTE 304#ifdef BB_ROUTE
291 APPLET("route", route_main, _BB_DIR_USR_BIN, route_usage) 305 APPLET(route, route_main, _BB_DIR_USR_BIN)
292#endif 306#endif
293#ifdef BB_RPMUNPACK 307#ifdef BB_RPMUNPACK
294 APPLET("rpmunpack", rpmunpack_main, _BB_DIR_USR_BIN, rpmunpack_usage) 308 APPLET(rpmunpack, rpmunpack_main, _BB_DIR_USR_BIN)
295#endif 309#endif
296#ifdef BB_SED 310#ifdef BB_SED
297 APPLET("sed", sed_main, _BB_DIR_BIN, sed_usage) 311 APPLET(sed, sed_main, _BB_DIR_BIN)
298#endif 312#endif
299#ifdef BB_SETKEYCODES 313#ifdef BB_SETKEYCODES
300 APPLET("setkeycodes", setkeycodes_main, _BB_DIR_USR_BIN, setkeycodes_usage) 314 APPLET(setkeycodes, setkeycodes_main, _BB_DIR_USR_BIN)
301#endif 315#endif
302#ifdef BB_SH 316#ifdef BB_SH
303 APPLET("sh", shell_main, _BB_DIR_BIN, shell_usage) 317 APPLET(sh, shell_main, _BB_DIR_BIN)
304#endif 318#endif
305#ifdef BB_SLEEP 319#ifdef BB_SLEEP
306 APPLET("sleep", sleep_main, _BB_DIR_BIN, sleep_usage) 320 APPLET(sleep, sleep_main, _BB_DIR_BIN)
307#endif 321#endif
308#ifdef BB_SORT 322#ifdef BB_SORT
309 APPLET("sort", sort_main, _BB_DIR_USR_BIN, sort_usage) 323 APPLET(sort, sort_main, _BB_DIR_USR_BIN)
310#endif 324#endif
311#ifdef BB_STTY 325#ifdef BB_STTY
312 APPLET("stty", stty_main, _BB_DIR_BIN, stty_usage) 326 APPLET(stty, stty_main, _BB_DIR_BIN)
313#endif 327#endif
314#ifdef BB_SWAPONOFF 328#ifdef BB_SWAPONOFF
315 APPLET("swapoff", swap_on_off_main, _BB_DIR_SBIN, swapoff_usage) 329 APPLET(swapoff, swap_on_off_main, _BB_DIR_SBIN)
316#endif 330#endif
317#ifdef BB_SWAPONOFF 331#ifdef BB_SWAPONOFF
318 APPLET("swapon", swap_on_off_main, _BB_DIR_SBIN, swapon_usage) 332 APPLET(swapon, swap_on_off_main, _BB_DIR_SBIN)
319#endif 333#endif
320#ifdef BB_SYNC 334#ifdef BB_SYNC
321 APPLET("sync", sync_main, _BB_DIR_BIN, sync_usage) 335 APPLET(sync, sync_main, _BB_DIR_BIN)
322#endif 336#endif
323#ifdef BB_SYSLOGD 337#ifdef BB_SYSLOGD
324 APPLET("syslogd", syslogd_main, _BB_DIR_SBIN, syslogd_usage) 338 APPLET(syslogd, syslogd_main, _BB_DIR_SBIN)
325#endif 339#endif
326#ifdef BB_TAIL 340#ifdef BB_TAIL
327 APPLET("tail", tail_main, _BB_DIR_USR_BIN, tail_usage) 341 APPLET(tail, tail_main, _BB_DIR_USR_BIN)
328#endif 342#endif
329#ifdef BB_TAR 343#ifdef BB_TAR
330 APPLET("tar", tar_main, _BB_DIR_BIN, tar_usage) 344 APPLET(tar, tar_main, _BB_DIR_BIN)
331#endif 345#endif
332#ifdef BB_TEE 346#ifdef BB_TEE
333 APPLET("tee", tee_main, _BB_DIR_USR_BIN, tee_usage) 347 APPLET(tee, tee_main, _BB_DIR_USR_BIN)
334#endif 348#endif
335#ifdef BB_TELNET 349#ifdef BB_TELNET
336 APPLET("telnet", telnet_main, _BB_DIR_USR_BIN, telnet_usage) 350 APPLET(telnet, telnet_main, _BB_DIR_USR_BIN)
337#endif 351#endif
338#ifdef BB_TEST 352#ifdef BB_TEST
339 APPLET("test", test_main, _BB_DIR_USR_BIN, test_usage) 353 APPLET(test, test_main, _BB_DIR_USR_BIN)
340#endif 354#endif
341#ifdef BB_TOUCH 355#ifdef BB_TOUCH
342 APPLET("touch", touch_main, _BB_DIR_BIN, touch_usage) 356 APPLET(touch, touch_main, _BB_DIR_BIN)
343#endif 357#endif
344#ifdef BB_TR 358#ifdef BB_TR
345 APPLET("tr", tr_main, _BB_DIR_USR_BIN, tr_usage) 359 APPLET(tr, tr_main, _BB_DIR_USR_BIN)
346#endif 360#endif
347#ifdef BB_TRUE_FALSE 361#ifdef BB_TRUE_FALSE
348 APPLET("true", true_main, _BB_DIR_BIN, true_usage) 362 APPLET(true, true_main, _BB_DIR_BIN)
349#endif 363#endif
350#ifdef BB_TTY 364#ifdef BB_TTY
351 APPLET("tty", tty_main, _BB_DIR_USR_BIN, tty_usage) 365 APPLET(tty, tty_main, _BB_DIR_USR_BIN)
352#endif 366#endif
353#ifdef BB_UMOUNT 367#ifdef BB_UMOUNT
354 APPLET("umount", umount_main, _BB_DIR_BIN, umount_usage) 368 APPLET(umount, umount_main, _BB_DIR_BIN)
355#endif 369#endif
356#ifdef BB_UNAME 370#ifdef BB_UNAME
357 APPLET("uname", uname_main, _BB_DIR_BIN, uname_usage) 371 APPLET(uname, uname_main, _BB_DIR_BIN)
358#endif 372#endif
359#ifdef BB_UNIQ 373#ifdef BB_UNIQ
360 APPLET("uniq", uniq_main, _BB_DIR_USR_BIN, uniq_usage) 374 APPLET(uniq, uniq_main, _BB_DIR_USR_BIN)
361#endif 375#endif
362#ifdef BB_UNIX2DOS 376#ifdef BB_UNIX2DOS
363 APPLET("unix2dos", unix2dos_main, _BB_DIR_USR_BIN, unix2dos_usage) 377 APPLET(unix2dos, unix2dos_main, _BB_DIR_USR_BIN)
364#endif 378#endif
365#ifdef BB_UPDATE 379#ifdef BB_UPDATE
366 APPLET("update", update_main, _BB_DIR_SBIN, update_usage) 380 APPLET(update, update_main, _BB_DIR_SBIN)
367#endif 381#endif
368#ifdef BB_UPTIME 382#ifdef BB_UPTIME
369 APPLET("uptime", uptime_main, _BB_DIR_USR_BIN, uptime_usage) 383 APPLET(uptime, uptime_main, _BB_DIR_USR_BIN)
370#endif 384#endif
371#ifdef BB_USLEEP 385#ifdef BB_USLEEP
372 APPLET("usleep", usleep_main, _BB_DIR_BIN, usleep_usage) 386 APPLET(usleep, usleep_main, _BB_DIR_BIN)
373#endif 387#endif
374#ifdef BB_UUDECODE 388#ifdef BB_UUDECODE
375 APPLET("uudecode", uudecode_main, _BB_DIR_USR_BIN, uudecode_usage) 389 APPLET(uudecode, uudecode_main, _BB_DIR_USR_BIN)
376#endif 390#endif
377#ifdef BB_UUENCODE 391#ifdef BB_UUENCODE
378 APPLET("uuencode", uuencode_main, _BB_DIR_USR_BIN, uuencode_usage) 392 APPLET(uuencode, uuencode_main, _BB_DIR_USR_BIN)
379#endif 393#endif
380#ifdef BB_WATCHDOG 394#ifdef BB_WATCHDOG
381 APPLET("watchdog", watchdog_main, _BB_DIR_SBIN, watchdog_usage) 395 APPLET(watchdog, watchdog_main, _BB_DIR_SBIN)
382#endif 396#endif
383#ifdef BB_WC 397#ifdef BB_WC
384 APPLET("wc", wc_main, _BB_DIR_USR_BIN, wc_usage) 398 APPLET(wc, wc_main, _BB_DIR_USR_BIN)
385#endif 399#endif
386#ifdef BB_WGET 400#ifdef BB_WGET
387 APPLET("wget", wget_main, _BB_DIR_USR_BIN, wget_usage) 401 APPLET(wget, wget_main, _BB_DIR_USR_BIN)
388#endif 402#endif
389#ifdef BB_WHICH 403#ifdef BB_WHICH
390 APPLET("which", which_main, _BB_DIR_USR_BIN, which_usage) 404 APPLET(which, which_main, _BB_DIR_USR_BIN)
391#endif 405#endif
392#ifdef BB_WHOAMI 406#ifdef BB_WHOAMI
393 APPLET("whoami", whoami_main, _BB_DIR_USR_BIN, whoami_usage) 407 APPLET(whoami, whoami_main, _BB_DIR_USR_BIN)
394#endif 408#endif
395#ifdef BB_XARGS 409#ifdef BB_XARGS
396 APPLET("xargs", xargs_main, _BB_DIR_USR_BIN, xargs_usage) 410 APPLET(xargs, xargs_main, _BB_DIR_USR_BIN)
397#endif 411#endif
398#ifdef BB_YES 412#ifdef BB_YES
399 APPLET("yes", yes_main, _BB_DIR_USR_BIN, yes_usage) 413 APPLET(yes, yes_main, _BB_DIR_USR_BIN)
400#endif 414#endif
401#ifdef BB_GUNZIP 415#ifdef BB_GUNZIP
402 APPLET("zcat", gunzip_main, _BB_DIR_BIN, gunzip_usage) 416 APPLET(zcat, gunzip_main, _BB_DIR_BIN)
403#endif 417#endif
404 418
405#if !defined(PROTOTYPES) && !defined(MAKE_LINKS) 419#if !defined(PROTOTYPES) && !defined(MAKE_LINKS) && !defined(APPLET_ENUM)
406 { 0,NULL,0,NULL} 420 { 0,NULL,0,-1}
407}; 421};
408 422
409/* The -1 arises because of the {0,NULL,0,NULL} entry above. */ 423/* The -1 arises because of the {0,NULL,0,-1} entry above. */
410size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1); 424size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1);
411 425
412#endif 426#endif