1/*
2 * applets.h - a listing of all busybox applets.
3 *
4 * If you write a new applet, you need to add an entry to this list to make
5 * busybox aware of it.
6 *
7 * It is CRUCIAL that this listing be kept in ascii order, otherwise the binary
8 * search lookup contributed by Gaute B Strokkenes stops working. If you value
9 * your kneecaps, you'll be sure to *make sure* that any changes made to this
10 * file result in the listing remaining in ascii order. You have been warned.
11 */
12
13#undef APPLET
14#undef APPLET_ODDNAME
15#undef APPLET_NOUSAGE
16
17
18#if defined(PROTOTYPES)
19  #define APPLET(a,b,c) extern int b(int argc, char **argv);
20  #define APPLET_NOUSAGE(a,b,c) extern int b(int argc, char **argv);
21  #define APPLET_ODDNAME(a,b,c,d) extern int b(int argc, char **argv);
22  extern const char usage_messages[];
23#elif defined(MAKE_USAGE)
24  #ifdef BB_FEATURE_VERBOSE_USAGE
25    #define APPLET(a,b,c) a##_trivial_usage "\n\n" a##_full_usage "\0"
26    #define APPLET_NOUSAGE(a,b,c) "\0"
27    #define APPLET_ODDNAME(a,b,c,d) d##_trivial_usage "\n\n" d##_full_usage "\0"
28  #else
29    #define APPLET(a,b,c) a##_trivial_usage "\0"
30    #define APPLET_NOUSAGE(a,b,c) "\0"
31    #define APPLET_ODDNAME(a,b,c,d) d##_trivial_usage "\0"
32  #endif
33#elif defined(MAKE_LINKS)
34#  define APPLET(a,b,c) LINK c a
35#  define APPLET_NOUSAGE(a,b,c) LINK c a
36#  define APPLET_ODDNAME(a,b,c,d) LINK c a
37#else
38  const struct BB_applet applets[] = {
39  #define APPLET(a,b,c) {#a,b,c},
40  #define APPLET_NOUSAGE(a,b,c) {a,b,c},
41  #define APPLET_ODDNAME(a,b,c,d) {a,b,c},
42#endif
43
44
45
46#ifdef BB_TEST
47	APPLET_NOUSAGE("[", test_main, _BB_DIR_USR_BIN)
48#endif
49#ifdef BB_ADJTIMEX
50	APPLET(adjtimex, adjtimex_main, _BB_DIR_SBIN)
51#endif
52#ifdef BB_AR
53	APPLET(ar, ar_main, _BB_DIR_USR_BIN)
54#endif
55#ifdef BB_ASH
56	APPLET_NOUSAGE("ash", ash_main, _BB_DIR_BIN)
57#endif
58#ifdef BB_BASENAME
59	APPLET(basename, basename_main, _BB_DIR_USR_BIN)
60#endif
61	APPLET_NOUSAGE("busybox", busybox_main, _BB_DIR_BIN)
62#ifdef BB_CAT
63	APPLET(cat, cat_main, _BB_DIR_BIN)
64#endif
65#ifdef BB_CHGRP
66	APPLET(chgrp, chgrp_main, _BB_DIR_BIN)
67#endif
68#ifdef BB_CHMOD
69	APPLET(chmod, chmod_main, _BB_DIR_BIN)
70#endif
71#ifdef BB_CHOWN
72	APPLET(chown, chown_main, _BB_DIR_BIN)
73#endif
74#ifdef BB_CHROOT
75	APPLET(chroot, chroot_main, _BB_DIR_USR_SBIN)
76#endif
77#ifdef BB_CHVT
78	APPLET(chvt, chvt_main, _BB_DIR_USR_BIN)
79#endif
80#ifdef BB_CLEAR
81	APPLET(clear, clear_main, _BB_DIR_USR_BIN)
82#endif
83#ifdef BB_CMP
84	APPLET(cmp, cmp_main, _BB_DIR_USR_BIN)
85#endif
86#ifdef BB_CP
87	APPLET(cp, cp_main, _BB_DIR_BIN)
88#endif
89#ifdef BB_CPIO
90	APPLET(cpio, cpio_main, _BB_DIR_BIN)
91#endif
92#ifdef BB_CUT
93	APPLET(cut, cut_main, _BB_DIR_USR_BIN)
94#endif
95#ifdef BB_DATE
96	APPLET(date, date_main, _BB_DIR_BIN)
97#endif
98#ifdef BB_DC
99	APPLET(dc, dc_main, _BB_DIR_USR_BIN)
100#endif
101#ifdef BB_DD
102	APPLET(dd, dd_main, _BB_DIR_BIN)
103#endif
104#ifdef BB_DEALLOCVT
105	APPLET(deallocvt, deallocvt_main, _BB_DIR_USR_BIN)
106#endif
107#ifdef BB_DF
108	APPLET(df, df_main, _BB_DIR_BIN)
109#endif
110#ifdef BB_DIRNAME
111	APPLET(dirname, dirname_main, _BB_DIR_USR_BIN)
112#endif
113#ifdef BB_DMESG
114	APPLET(dmesg, dmesg_main, _BB_DIR_BIN)
115#endif
116#ifdef BB_DOS2UNIX
117	APPLET(dos2unix, dos2unix_main, _BB_DIR_USR_BIN)
118#endif
119#ifdef BB_DPKG
120	APPLET(dpkg, dpkg_main, _BB_DIR_USR_BIN)
121#endif
122#ifdef BB_DPKG_DEB
123	APPLET_ODDNAME("dpkg-deb", dpkg_deb_main, _BB_DIR_USR_BIN, dpkg_deb)
124#endif
125#ifdef BB_DU
126	APPLET(du, du_main, _BB_DIR_USR_BIN)
127#endif
128#ifdef BB_DUMPKMAP
129	APPLET(dumpkmap, dumpkmap_main, _BB_DIR_BIN)
130#endif
131#ifdef BB_DUTMP
132	APPLET(dutmp, dutmp_main, _BB_DIR_USR_SBIN)
133#endif
134#ifdef BB_ECHO
135	APPLET(echo, echo_main, _BB_DIR_BIN)
136#endif
137#if defined(BB_FEATURE_GREP_EGREP_ALIAS) && defined(BB_GREP)
138	APPLET_NOUSAGE("egrep", grep_main, _BB_DIR_BIN)
139#endif
140#ifdef BB_ENV
141	APPLET(env, env_main, _BB_DIR_USR_BIN)
142#endif
143#ifdef BB_EXPR
144	APPLET(expr, expr_main, _BB_DIR_USR_BIN)
145#endif
146#ifdef BB_TRUE_FALSE
147	APPLET(false, false_main, _BB_DIR_BIN)
148#endif
149#ifdef BB_FBSET
150	APPLET(fbset, fbset_main, _BB_DIR_USR_SBIN)
151#endif
152#ifdef BB_FDFLUSH
153	APPLET(fdflush, fdflush_main, _BB_DIR_BIN)
154#endif
155#ifdef BB_FIND
156	APPLET(find, find_main, _BB_DIR_USR_BIN)
157#endif
158#ifdef BB_FREE
159	APPLET(free, free_main, _BB_DIR_USR_BIN)
160#endif
161#ifdef BB_FREERAMDISK
162	APPLET(freeramdisk, freeramdisk_main, _BB_DIR_SBIN)
163#endif
164#ifdef BB_FSCK_MINIX
165	APPLET_ODDNAME("fsck.minix", fsck_minix_main, _BB_DIR_SBIN, fsck_minix)
166#endif
167#ifdef BB_GETOPT
168	APPLET(getopt, getopt_main, _BB_DIR_BIN)
169#endif
170#ifdef BB_GREP
171	APPLET(grep, grep_main, _BB_DIR_BIN)
172#endif
173#ifdef BB_GUNZIP
174	APPLET(gunzip, gunzip_main, _BB_DIR_BIN)
175#endif
176#ifdef BB_GZIP
177	APPLET(gzip, gzip_main, _BB_DIR_BIN)
178#endif
179#ifdef BB_HALT
180	APPLET(halt, halt_main, _BB_DIR_SBIN)
181#endif
182#ifdef BB_HEAD
183	APPLET(head, head_main, _BB_DIR_USR_BIN)
184#endif
185#ifdef BB_HOSTID
186	APPLET(hostid, hostid_main, _BB_DIR_USR_BIN)
187#endif
188#ifdef BB_HOSTNAME
189	APPLET(hostname, hostname_main, _BB_DIR_BIN)
190#endif
191#ifdef BB_HUSH
192	APPLET_NOUSAGE("hush", hush_main, _BB_DIR_BIN)
193#endif
194#ifdef BB_ID
195	APPLET(id, id_main, _BB_DIR_USR_BIN)
196#endif
197#ifdef BB_IFCONFIG
198	APPLET(ifconfig, ifconfig_main, _BB_DIR_SBIN)
199#endif
200#ifdef BB_INIT
201	APPLET(init, init_main, _BB_DIR_SBIN)
202#endif
203#ifdef BB_INSMOD
204	APPLET(insmod, insmod_main, _BB_DIR_SBIN)
205#endif
206#ifdef BB_KILL
207	APPLET(kill, kill_main, _BB_DIR_BIN)
208#endif
209#ifdef BB_KILLALL
210	APPLET(killall, kill_main, _BB_DIR_USR_BIN)
211#endif
212#ifdef BB_KLOGD
213	APPLET(klogd, klogd_main, _BB_DIR_SBIN)
214#endif
215#ifdef BB_KTAB
216	APPLET(ktab, ktab_main, _BB_DIR_USR_BIN)
217#endif
218#ifdef BB_LASH
219	APPLET(lash, lash_main, _BB_DIR_BIN)
220#endif
221#ifdef BB_LENGTH
222	APPLET(length, length_main, _BB_DIR_USR_BIN)
223#endif
224#ifdef BB_FEATURE_LINUXRC
225	APPLET_NOUSAGE("linuxrc", init_main, _BB_DIR_ROOT)
226#endif
227#ifdef BB_LN
228	APPLET(ln, ln_main, _BB_DIR_BIN)
229#endif
230#ifdef BB_LOADACM
231	APPLET(loadacm, loadacm_main, _BB_DIR_USR_BIN)
232#endif
233#ifdef BB_LOADFONT
234	APPLET(loadfont, loadfont_main, _BB_DIR_USR_BIN)
235#endif
236#ifdef BB_LOADKMAP
237	APPLET(loadkmap, loadkmap_main, _BB_DIR_SBIN)
238#endif
239#ifdef BB_LOGGER
240	APPLET(logger, logger_main, _BB_DIR_USR_BIN)
241#endif
242#ifdef BB_LOGNAME
243	APPLET(logname, logname_main, _BB_DIR_USR_BIN)
244#endif
245#ifdef BB_LOGREAD
246	APPLET(logread, logread_main, _BB_DIR_SBIN)
247#endif
248#ifdef BB_LS
249	APPLET(ls, ls_main, _BB_DIR_BIN)
250#endif
251#ifdef BB_LSMOD
252	APPLET(lsmod, lsmod_main, _BB_DIR_SBIN)
253#endif
254#ifdef BB_MAKEDEVS
255	APPLET(makedevs, makedevs_main, _BB_DIR_SBIN)
256#endif
257#ifdef BB_MD5SUM
258	APPLET(md5sum, md5sum_main, _BB_DIR_USR_BIN)
259#endif
260#ifdef BB_MKDIR
261	APPLET(mkdir, mkdir_main, _BB_DIR_BIN)
262#endif
263#ifdef BB_MKFIFO
264	APPLET(mkfifo, mkfifo_main, _BB_DIR_USR_BIN)
265#endif
266#ifdef BB_MKFS_MINIX
267	APPLET_ODDNAME("mkfs.minix", mkfs_minix_main, _BB_DIR_SBIN, mkfs_minix)
268#endif
269#ifdef BB_MKNOD
270	APPLET(mknod, mknod_main, _BB_DIR_BIN)
271#endif
272#ifdef BB_MKSWAP
273	APPLET(mkswap, mkswap_main, _BB_DIR_SBIN)
274#endif
275#ifdef BB_MKTEMP
276	APPLET(mktemp, mktemp_main, _BB_DIR_BIN)
277#endif
278#ifdef BB_MODPROBE
279	APPLET(modprobe, modprobe_main, _BB_DIR_SBIN)
280#endif
281#ifdef BB_MORE
282	APPLET(more, more_main, _BB_DIR_BIN)
283#endif
284#ifdef BB_MOUNT
285	APPLET(mount, mount_main, _BB_DIR_BIN)
286#endif
287#ifdef BB_MSH
288	APPLET_NOUSAGE("msh", msh_main, _BB_DIR_BIN)
289#endif
290#ifdef BB_MT
291	APPLET(mt, mt_main, _BB_DIR_BIN)
292#endif
293#ifdef BB_MV
294	APPLET(mv, mv_main, _BB_DIR_BIN)
295#endif
296#ifdef BB_NC
297	APPLET(nc, nc_main, _BB_DIR_USR_BIN)
298#endif
299#ifdef BB_NSLOOKUP
300	APPLET(nslookup, nslookup_main, _BB_DIR_USR_BIN)
301#endif
302#ifdef BB_PIDOF
303	APPLET(pidof, pidof_main, _BB_DIR_BIN)
304#endif
305#ifdef BB_PING
306	APPLET(ping, ping_main, _BB_DIR_BIN)
307#endif
308#ifdef BB_PIVOT_ROOT
309 	APPLET(pivot_root, pivot_root_main, _BB_DIR_SBIN)
310#endif
311#ifdef BB_POWEROFF
312	APPLET(poweroff, poweroff_main, _BB_DIR_SBIN)
313#endif
314#ifdef BB_PRINTF
315	APPLET(printf, printf_main, _BB_DIR_USR_BIN)
316#endif
317#ifdef BB_PS
318	APPLET(ps, ps_main, _BB_DIR_BIN)
319#endif
320#ifdef BB_PWD
321	APPLET(pwd, pwd_main, _BB_DIR_BIN)
322#endif
323#ifdef BB_RDATE
324	APPLET(rdate, rdate_main, _BB_DIR_USR_BIN)
325#endif
326#ifdef BB_READLINK
327	APPLET(readlink, readlink_main, _BB_DIR_USR_BIN)
328#endif
329#ifdef BB_REBOOT
330	APPLET(reboot, reboot_main, _BB_DIR_SBIN)
331#endif
332#ifdef BB_RENICE
333	APPLET(renice, renice_main, _BB_DIR_USR_BIN)
334#endif
335#ifdef BB_RESET
336	APPLET(reset, reset_main, _BB_DIR_USR_BIN)
337#endif
338#ifdef BB_RM
339	APPLET(rm, rm_main, _BB_DIR_BIN)
340#endif
341#ifdef BB_RMDIR
342	APPLET(rmdir, rmdir_main, _BB_DIR_BIN)
343#endif
344#ifdef BB_RMMOD
345	APPLET(rmmod, rmmod_main, _BB_DIR_SBIN)
346#endif
347#ifdef BB_ROUTE
348 	APPLET(route, route_main, _BB_DIR_USR_BIN)
349#endif
350#ifdef BB_RPM2CPIO
351	APPLET(rpm2cpio, rpm2cpio_main, _BB_DIR_USR_BIN)
352#endif
353#ifdef BB_RPMUNPACK
354	APPLET(rpmunpack, rpmunpack_main, _BB_DIR_USR_BIN)
355#endif
356#ifdef BB_SED
357	APPLET(sed, sed_main, _BB_DIR_BIN)
358#endif
359#ifdef BB_SETKEYCODES
360	APPLET(setkeycodes, setkeycodes_main, _BB_DIR_USR_BIN)
361#endif
362#if defined(BB_FEATURE_SH_IS_ASH) && defined(BB_ASH)
363	APPLET_NOUSAGE("sh", ash_main, _BB_DIR_BIN)
364#elif defined(BB_FEATURE_SH_IS_HUSH) && defined(BB_HUSH)
365	APPLET_NOUSAGE("sh", hush_main, _BB_DIR_BIN)
366#elif defined(BB_FEATURE_SH_IS_LASH) && defined(BB_LASH)
367	APPLET_NOUSAGE("sh", lash_main, _BB_DIR_BIN)
368#elif defined(BB_FEATURE_SH_IS_MSH) && defined(BB_MSH)
369	APPLET_NOUSAGE("sh", msh_main, _BB_DIR_BIN)
370#endif
371#ifdef BB_SLEEP
372	APPLET(sleep, sleep_main, _BB_DIR_BIN)
373#endif
374#ifdef BB_SORT
375	APPLET(sort, sort_main, _BB_DIR_USR_BIN)
376#endif
377#ifdef BB_STTY
378	APPLET(stty, stty_main, _BB_DIR_BIN)
379#endif
380#ifdef BB_SWAPONOFF
381	APPLET(swapoff, swap_on_off_main, _BB_DIR_SBIN)
382#endif
383#ifdef BB_SWAPONOFF
384	APPLET(swapon, swap_on_off_main, _BB_DIR_SBIN)
385#endif
386#ifdef BB_SYNC
387	APPLET(sync, sync_main, _BB_DIR_BIN)
388#endif
389#ifdef BB_SYSLOGD
390	APPLET(syslogd, syslogd_main, _BB_DIR_SBIN)
391#endif
392#ifdef BB_TAIL
393	APPLET(tail, tail_main, _BB_DIR_USR_BIN)
394#endif
395#ifdef BB_TAR
396	APPLET(tar, tar_main, _BB_DIR_BIN)
397#endif
398#ifdef BB_TEE
399	APPLET(tee, tee_main, _BB_DIR_USR_BIN)
400#endif
401#ifdef BB_TELNET
402	APPLET(telnet, telnet_main, _BB_DIR_USR_BIN)
403#endif
404#ifdef BB_TEST
405	APPLET(test, test_main, _BB_DIR_USR_BIN)
406#endif
407#ifdef BB_TFTP
408	APPLET(tftp, tftp_main, _BB_DIR_USR_BIN)
409#endif
410#ifdef BB_TOUCH
411	APPLET(touch, touch_main, _BB_DIR_BIN)
412#endif
413#ifdef BB_TR
414	APPLET(tr, tr_main, _BB_DIR_USR_BIN)
415#endif
416#ifdef BB_TRACEROUTE
417	APPLET(traceroute, traceroute_main, _BB_DIR_USR_BIN)
418#endif
419#ifdef BB_TRUE_FALSE
420	APPLET(true, true_main, _BB_DIR_BIN)
421#endif
422#ifdef BB_TTY
423	APPLET(tty, tty_main, _BB_DIR_USR_BIN)
424#endif
425#ifdef BB_UMOUNT
426	APPLET(umount, umount_main, _BB_DIR_BIN)
427#endif
428#ifdef BB_UNAME
429	APPLET(uname, uname_main, _BB_DIR_BIN)
430#endif
431#ifdef BB_UNIQ
432	APPLET(uniq, uniq_main, _BB_DIR_USR_BIN)
433#endif
434#ifdef BB_UNIX2DOS
435	APPLET(unix2dos, dos2unix_main, _BB_DIR_USR_BIN)
436#endif
437#ifdef BB_UPDATE
438	APPLET(update, update_main, _BB_DIR_SBIN)
439#endif
440#ifdef BB_UPTIME
441	APPLET(uptime, uptime_main, _BB_DIR_USR_BIN)
442#endif
443#ifdef BB_USLEEP
444	APPLET(usleep, usleep_main, _BB_DIR_BIN)
445#endif
446#ifdef BB_UUDECODE
447	APPLET(uudecode, uudecode_main, _BB_DIR_USR_BIN)
448#endif
449#ifdef BB_UUENCODE
450	APPLET(uuencode, uuencode_main, _BB_DIR_USR_BIN)
451#endif
452#ifdef BB_VI
453	APPLET(vi, vi_main, _BB_DIR_BIN)
454#endif
455#ifdef BB_WATCHDOG
456	APPLET(watchdog, watchdog_main, _BB_DIR_SBIN)
457#endif
458#ifdef BB_WC
459	APPLET(wc, wc_main, _BB_DIR_USR_BIN)
460#endif
461#ifdef BB_WGET
462	APPLET(wget, wget_main, _BB_DIR_USR_BIN)
463#endif
464#ifdef BB_WHICH
465	APPLET(which, which_main, _BB_DIR_USR_BIN)
466#endif
467#ifdef BB_WHOAMI
468	APPLET(whoami, whoami_main, _BB_DIR_USR_BIN)
469#endif
470#ifdef BB_XARGS
471	APPLET(xargs, xargs_main, _BB_DIR_USR_BIN)
472#endif
473#ifdef BB_YES
474	APPLET(yes, yes_main, _BB_DIR_USR_BIN)
475#endif
476#ifdef BB_GUNZIP
477	APPLET(zcat, gunzip_main, _BB_DIR_BIN)
478#endif
479
480#if !defined(PROTOTYPES) && !defined(MAKE_USAGE)
481	{ 0,NULL,0 }
482};
483
484#endif
485