1 /* vi: set sw=4 ts=4: */
3 * Busybox main internal header file
5 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
7 #ifndef _BB_INTERNAL_H_
8 #define _BB_INTERNAL_H_ 1
12 #if ENABLE_FEATURE_INSTALLER
13 /* order matters: used as index into "install_dir[]" in busybox.c */
14 typedef enum bb_install_loc_t {
23 #if ENABLE_FEATURE_SUID
24 typedef enum bb_suid_t {
33 int (*main) (int argc, char **argv);
34 #if ENABLE_FEATURE_INSTALLER
35 __extension__ enum bb_install_loc_t install_loc:8;
37 #if ENABLE_FEATURE_SUID
38 __extension__ enum bb_suid_t need_suid:8;
40 #if ENABLE_FEATURE_PREFER_APPLETS
41 /* true if instead of fork(); exec("applet"); waitpid();
42 * one can do fork(); exit(applet_main(argc,argv)); waitpid(); */
45 /* true if instead of fork(); exec("applet"); waitpid();
46 * one can simply call applet_main(argc,argv); */
52 /* Defined in appletlib.c */
53 extern const struct bb_applet applets[];
54 extern const unsigned short NUM_APPLETS;
56 /* Length of these names has effect on size of libbusybox
57 * and "individual" binaries. Keep them short.
59 void lbb_prepare(char **argv) MAIN_EXTERNALLY_VISIBLE;
60 #if ENABLE_BUILD_LIBBUSYBOX
61 #if ENABLE_FEATURE_SHARED_BUSYBOX
62 int lbb_main(int argc, char **argv) EXTERNALLY_VISIBLE;
64 int lbb_main(int argc, char **argv);
69 #endif /* _BB_INTERNAL_H_ */