88aec8ad1938b6816a437690aa6821901c49fc80
[oweals/busybox.git] / include / applets.h
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_BASENAME
56         APPLET(basename, basename_main, _BB_DIR_USR_BIN)
57 #endif
58         APPLET_NOUSAGE("busybox", busybox_main, _BB_DIR_BIN)
59 #ifdef BB_CAT
60         APPLET(cat, cat_main, _BB_DIR_BIN)
61 #endif
62 #ifdef BB_CHGRP
63         APPLET(chgrp, chgrp_main, _BB_DIR_BIN)
64 #endif
65 #ifdef BB_CHMOD
66         APPLET(chmod, chmod_main, _BB_DIR_BIN)
67 #endif
68 #ifdef BB_CHOWN
69         APPLET(chown, chown_main, _BB_DIR_BIN)
70 #endif
71 #ifdef BB_CHROOT
72         APPLET(chroot, chroot_main, _BB_DIR_USR_SBIN)
73 #endif
74 #ifdef BB_CHVT
75         APPLET(chvt, chvt_main, _BB_DIR_USR_BIN)
76 #endif
77 #ifdef BB_CLEAR
78         APPLET(clear, clear_main, _BB_DIR_USR_BIN)
79 #endif
80 #ifdef BB_CMP
81         APPLET(cmp, cmp_main, _BB_DIR_USR_BIN)
82 #endif
83 #ifdef BB_CP
84         APPLET(cp, cp_main, _BB_DIR_BIN)
85 #endif
86 #ifdef BB_CPIO
87         APPLET(cpio, cpio_main, _BB_DIR_BIN)
88 #endif
89 #ifdef BB_CUT
90         APPLET(cut, cut_main, _BB_DIR_USR_BIN)
91 #endif
92 #ifdef BB_DATE
93         APPLET(date, date_main, _BB_DIR_BIN)
94 #endif
95 #ifdef BB_DC
96         APPLET(dc, dc_main, _BB_DIR_USR_BIN)
97 #endif
98 #ifdef BB_DD
99         APPLET(dd, dd_main, _BB_DIR_BIN)
100 #endif
101 #ifdef BB_DEALLOCVT
102         APPLET(deallocvt, deallocvt_main, _BB_DIR_USR_BIN)
103 #endif
104 #ifdef BB_DF
105         APPLET(df, df_main, _BB_DIR_BIN)
106 #endif
107 #ifdef BB_DIRNAME
108         APPLET(dirname, dirname_main, _BB_DIR_USR_BIN)
109 #endif
110 #ifdef BB_DMESG
111         APPLET(dmesg, dmesg_main, _BB_DIR_BIN)
112 #endif
113 #ifdef BB_DOS2UNIX
114         APPLET(dos2unix, dos2unix_main, _BB_DIR_USR_BIN)
115 #endif
116 #ifdef BB_DPKG
117         APPLET(dpkg, dpkg_main, _BB_DIR_USR_BIN)
118 #endif
119 #ifdef BB_DPKG_DEB
120         APPLET_ODDNAME("dpkg-deb", dpkg_deb_main, _BB_DIR_USR_BIN, dpkg_deb)
121 #endif
122 #ifdef BB_DU
123         APPLET(du, du_main, _BB_DIR_USR_BIN)
124 #endif
125 #ifdef BB_DUMPKMAP
126         APPLET(dumpkmap, dumpkmap_main, _BB_DIR_BIN)
127 #endif
128 #ifdef BB_DUTMP
129         APPLET(dutmp, dutmp_main, _BB_DIR_USR_SBIN)
130 #endif
131 #ifdef BB_ECHO
132         APPLET(echo, echo_main, _BB_DIR_BIN)
133 #endif
134 #if defined(BB_FEATURE_GREP_EGREP_ALIAS) && defined(BB_GREP)
135         APPLET_NOUSAGE("egrep", grep_main, _BB_DIR_BIN)
136 #endif
137 #ifdef BB_ENV
138         APPLET(env, env_main, _BB_DIR_USR_BIN)
139 #endif
140 #ifdef BB_EXPR
141         APPLET(expr, expr_main, _BB_DIR_USR_BIN)
142 #endif
143 #ifdef BB_TRUE_FALSE
144         APPLET(false, false_main, _BB_DIR_BIN)
145 #endif
146 #ifdef BB_FBSET
147         APPLET(fbset, fbset_main, _BB_DIR_USR_SBIN)
148 #endif
149 #ifdef BB_FDFLUSH
150         APPLET(fdflush, fdflush_main, _BB_DIR_BIN)
151 #endif
152 #ifdef BB_FIND
153         APPLET(find, find_main, _BB_DIR_USR_BIN)
154 #endif
155 #ifdef BB_FREE
156         APPLET(free, free_main, _BB_DIR_USR_BIN)
157 #endif
158 #ifdef BB_FREERAMDISK
159         APPLET(freeramdisk, freeramdisk_main, _BB_DIR_SBIN)
160 #endif
161 #ifdef BB_FSCK_MINIX
162         APPLET_ODDNAME("fsck.minix", fsck_minix_main, _BB_DIR_SBIN, fsck_minix)
163 #endif
164 #ifdef BB_GETOPT
165         APPLET(getopt, getopt_main, _BB_DIR_BIN)
166 #endif
167 #ifdef BB_GREP
168         APPLET(grep, grep_main, _BB_DIR_BIN)
169 #endif
170 #ifdef BB_GUNZIP
171         APPLET(gunzip, gunzip_main, _BB_DIR_BIN)
172 #endif
173 #ifdef BB_GZIP
174         APPLET(gzip, gzip_main, _BB_DIR_BIN)
175 #endif
176 #ifdef BB_HALT
177         APPLET(halt, halt_main, _BB_DIR_SBIN)
178 #endif
179 #ifdef BB_HEAD
180         APPLET(head, head_main, _BB_DIR_USR_BIN)
181 #endif
182 #ifdef BB_HOSTID
183         APPLET(hostid, hostid_main, _BB_DIR_USR_BIN)
184 #endif
185 #ifdef BB_HOSTNAME
186         APPLET(hostname, hostname_main, _BB_DIR_BIN)
187 #endif
188 #ifdef BB_ID
189         APPLET(id, id_main, _BB_DIR_USR_BIN)
190 #endif
191 #ifdef BB_IFCONFIG
192         APPLET(ifconfig, ifconfig_main, _BB_DIR_SBIN)
193 #endif
194 #ifdef BB_INIT
195         APPLET(init, init_main, _BB_DIR_SBIN)
196 #endif
197 #ifdef BB_INSMOD
198         APPLET(insmod, insmod_main, _BB_DIR_SBIN)
199 #endif
200 #ifdef BB_KILL
201         APPLET(kill, kill_main, _BB_DIR_BIN)
202 #endif
203 #ifdef BB_KILLALL
204         APPLET(killall, kill_main, _BB_DIR_USR_BIN)
205 #endif
206 #ifdef BB_KLOGD
207         APPLET(klogd, klogd_main, _BB_DIR_SBIN)
208 #endif
209 #ifdef BB_LENGTH
210         APPLET(length, length_main, _BB_DIR_USR_BIN)
211 #endif
212 #ifdef BB_FEATURE_LINUXRC
213         APPLET_NOUSAGE("linuxrc", init_main, _BB_DIR_ROOT)
214 #endif
215 #ifdef BB_LN
216         APPLET(ln, ln_main, _BB_DIR_BIN)
217 #endif
218 #ifdef BB_LOADACM
219         APPLET(loadacm, loadacm_main, _BB_DIR_USR_BIN)
220 #endif
221 #ifdef BB_LOADFONT
222         APPLET(loadfont, loadfont_main, _BB_DIR_USR_BIN)
223 #endif
224 #ifdef BB_LOADKMAP
225         APPLET(loadkmap, loadkmap_main, _BB_DIR_SBIN)
226 #endif
227 #ifdef BB_LOGGER
228         APPLET(logger, logger_main, _BB_DIR_USR_BIN)
229 #endif
230 #ifdef BB_LOGNAME
231         APPLET(logname, logname_main, _BB_DIR_USR_BIN)
232 #endif
233 #ifdef BB_LOGREAD
234         APPLET(logread, logread_main, _BB_DIR_SBIN)
235 #endif
236 #ifdef BB_LS
237         APPLET(ls, ls_main, _BB_DIR_BIN)
238 #endif
239 #ifdef BB_LSMOD
240         APPLET(lsmod, lsmod_main, _BB_DIR_SBIN)
241 #endif
242 #ifdef BB_MAKEDEVS
243         APPLET(makedevs, makedevs_main, _BB_DIR_SBIN)
244 #endif
245 #ifdef BB_MD5SUM
246         APPLET(md5sum, md5sum_main, _BB_DIR_USR_BIN)
247 #endif
248 #ifdef BB_MKDIR
249         APPLET(mkdir, mkdir_main, _BB_DIR_BIN)
250 #endif
251 #ifdef BB_MKFIFO
252         APPLET(mkfifo, mkfifo_main, _BB_DIR_USR_BIN)
253 #endif
254 #ifdef BB_MKFS_MINIX
255         APPLET_ODDNAME("mkfs.minix", mkfs_minix_main, _BB_DIR_SBIN, mkfs_minix)
256 #endif
257 #ifdef BB_MKNOD
258         APPLET(mknod, mknod_main, _BB_DIR_BIN)
259 #endif
260 #ifdef BB_MKSWAP
261         APPLET(mkswap, mkswap_main, _BB_DIR_SBIN)
262 #endif
263 #ifdef BB_MKTEMP
264         APPLET(mktemp, mktemp_main, _BB_DIR_BIN)
265 #endif
266 #ifdef BB_MORE
267         APPLET(more, more_main, _BB_DIR_BIN)
268 #endif
269 #ifdef BB_MOUNT
270         APPLET(mount, mount_main, _BB_DIR_BIN)
271 #endif
272 #ifdef BB_MT
273         APPLET(mt, mt_main, _BB_DIR_BIN)
274 #endif
275 #ifdef BB_MV
276         APPLET(mv, mv_main, _BB_DIR_BIN)
277 #endif
278 #ifdef BB_NC
279         APPLET(nc, nc_main, _BB_DIR_USR_BIN)
280 #endif
281 #ifdef BB_NSLOOKUP
282         APPLET(nslookup, nslookup_main, _BB_DIR_USR_BIN)
283 #endif
284 #ifdef BB_PING
285         APPLET(ping, ping_main, _BB_DIR_BIN)
286 #endif
287 #ifdef BB_PIVOT_ROOT
288         APPLET(pivot_root, pivot_root_main, _BB_DIR_SBIN)
289 #endif
290 #ifdef BB_POWEROFF
291         APPLET(poweroff, poweroff_main, _BB_DIR_SBIN)
292 #endif
293 #ifdef BB_PRINTF
294         APPLET(printf, printf_main, _BB_DIR_USR_BIN)
295 #endif
296 #ifdef BB_PS
297         APPLET(ps, ps_main, _BB_DIR_BIN)
298 #endif
299 #ifdef BB_PWD
300         APPLET(pwd, pwd_main, _BB_DIR_BIN)
301 #endif
302 #ifdef BB_RDATE
303         APPLET(rdate, rdate_main, _BB_DIR_USR_BIN)
304 #endif
305 #ifdef BB_READLINK
306         APPLET(readlink, readlink_main, _BB_DIR_USR_BIN)
307 #endif
308 #ifdef BB_REBOOT
309         APPLET(reboot, reboot_main, _BB_DIR_SBIN)
310 #endif
311 #ifdef BB_RENICE
312         APPLET(renice, renice_main, _BB_DIR_USR_BIN)
313 #endif
314 #ifdef BB_RESET
315         APPLET(reset, reset_main, _BB_DIR_USR_BIN)
316 #endif
317 #ifdef BB_RM
318         APPLET(rm, rm_main, _BB_DIR_BIN)
319 #endif
320 #ifdef BB_RMDIR
321         APPLET(rmdir, rmdir_main, _BB_DIR_BIN)
322 #endif
323 #ifdef BB_RMMOD
324         APPLET(rmmod, rmmod_main, _BB_DIR_SBIN)
325 #endif
326 #ifdef BB_ROUTE
327         APPLET(route, route_main, _BB_DIR_USR_BIN)
328 #endif
329 #ifdef BB_RPMUNPACK
330         APPLET(rpmunpack, rpmunpack_main, _BB_DIR_USR_BIN)
331 #endif
332 #ifdef BB_SED
333         APPLET(sed, sed_main, _BB_DIR_BIN)
334 #endif
335 #ifdef BB_SETKEYCODES
336         APPLET(setkeycodes, setkeycodes_main, _BB_DIR_USR_BIN)
337 #endif
338 #ifdef BB_SH
339         APPLET(sh, shell_main, _BB_DIR_BIN)
340 #endif
341 #ifdef BB_SLEEP
342         APPLET(sleep, sleep_main, _BB_DIR_BIN)
343 #endif
344 #ifdef BB_SORT
345         APPLET(sort, sort_main, _BB_DIR_USR_BIN)
346 #endif
347 #ifdef BB_STTY
348         APPLET(stty, stty_main, _BB_DIR_BIN)
349 #endif
350 #ifdef BB_SWAPONOFF
351         APPLET(swapoff, swap_on_off_main, _BB_DIR_SBIN)
352 #endif
353 #ifdef BB_SWAPONOFF
354         APPLET(swapon, swap_on_off_main, _BB_DIR_SBIN)
355 #endif
356 #ifdef BB_SYNC
357         APPLET(sync, sync_main, _BB_DIR_BIN)
358 #endif
359 #ifdef BB_SYSLOGD
360         APPLET(syslogd, syslogd_main, _BB_DIR_SBIN)
361 #endif
362 #ifdef BB_TAIL
363         APPLET(tail, tail_main, _BB_DIR_USR_BIN)
364 #endif
365 #ifdef BB_TAR
366         APPLET(tar, tar_main, _BB_DIR_BIN)
367 #endif
368 #ifdef BB_TEE
369         APPLET(tee, tee_main, _BB_DIR_USR_BIN)
370 #endif
371 #ifdef BB_TELNET
372         APPLET(telnet, telnet_main, _BB_DIR_USR_BIN)
373 #endif
374 #ifdef BB_TEST
375         APPLET(test, test_main, _BB_DIR_USR_BIN)
376 #endif
377 #ifdef BB_TFTP
378         APPLET(tftp, tftp_main, _BB_DIR_USR_BIN)
379 #endif
380 #ifdef BB_TOUCH
381         APPLET(touch, touch_main, _BB_DIR_BIN)
382 #endif
383 #ifdef BB_TR
384         APPLET(tr, tr_main, _BB_DIR_USR_BIN)
385 #endif
386 #ifdef BB_TRUE_FALSE
387         APPLET(true, true_main, _BB_DIR_BIN)
388 #endif
389 #ifdef BB_TTY
390         APPLET(tty, tty_main, _BB_DIR_USR_BIN)
391 #endif
392 #ifdef BB_UMOUNT
393         APPLET(umount, umount_main, _BB_DIR_BIN)
394 #endif
395 #ifdef BB_UNAME
396         APPLET(uname, uname_main, _BB_DIR_BIN)
397 #endif
398 #ifdef BB_UNIQ
399         APPLET(uniq, uniq_main, _BB_DIR_USR_BIN)
400 #endif
401 #ifdef BB_UNIX2DOS
402         APPLET(unix2dos, dos2unix_main, _BB_DIR_USR_BIN)
403 #endif
404 #ifdef BB_UPDATE
405         APPLET(update, update_main, _BB_DIR_SBIN)
406 #endif
407 #ifdef BB_UPTIME
408         APPLET(uptime, uptime_main, _BB_DIR_USR_BIN)
409 #endif
410 #ifdef BB_USLEEP
411         APPLET(usleep, usleep_main, _BB_DIR_BIN)
412 #endif
413 #ifdef BB_UUDECODE
414         APPLET(uudecode, uudecode_main, _BB_DIR_USR_BIN)
415 #endif
416 #ifdef BB_UUENCODE
417         APPLET(uuencode, uuencode_main, _BB_DIR_USR_BIN)
418 #endif
419 #ifdef BB_VI
420         APPLET(vi, vi_main, _BB_DIR_BIN)
421 #endif
422 #ifdef BB_WATCHDOG
423         APPLET(watchdog, watchdog_main, _BB_DIR_SBIN)
424 #endif
425 #ifdef BB_WC
426         APPLET(wc, wc_main, _BB_DIR_USR_BIN)
427 #endif
428 #ifdef BB_WGET
429         APPLET(wget, wget_main, _BB_DIR_USR_BIN)
430 #endif
431 #ifdef BB_WHICH
432         APPLET(which, which_main, _BB_DIR_USR_BIN)
433 #endif
434 #ifdef BB_WHOAMI
435         APPLET(whoami, whoami_main, _BB_DIR_USR_BIN)
436 #endif
437 #ifdef BB_XARGS
438         APPLET(xargs, xargs_main, _BB_DIR_USR_BIN)
439 #endif
440 #ifdef BB_YES
441         APPLET(yes, yes_main, _BB_DIR_USR_BIN)
442 #endif
443 #ifdef BB_GUNZIP
444         APPLET(zcat, gunzip_main, _BB_DIR_BIN)
445 #endif
446
447 #if !defined(PROTOTYPES) && !defined(MAKE_USAGE)
448         { 0,NULL,0 }
449 };
450
451 #endif