applets.h 11 KB

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