Changeset 1770 in MondoRescue for branches/stable/mindi-busybox/include/busybox.h
- Timestamp:
- Nov 6, 2007, 11:01:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi-busybox/include/busybox.h
r821 r1770 8 8 #define _BB_INTERNAL_H_ 1 9 9 10 #include "bb_config.h"11 12 10 #include "libbb.h" 13 11 14 /* order matters: used as index into "install_dir[]" in busybox.c */ 15 enum Location { 12 #if ENABLE_FEATURE_INSTALLER 13 /* order matters: used as index into "install_dir[]" in busybox.c */ 14 typedef enum bb_install_loc_t { 16 15 _BB_DIR_ROOT = 0, 17 16 _BB_DIR_BIN, … … 19 18 _BB_DIR_USR_BIN, 20 19 _BB_DIR_USR_SBIN 21 }; 20 } bb_install_loc_t; 21 #endif 22 22 23 enum SUIDRoot { 23 #if ENABLE_FEATURE_SUID 24 typedef enum bb_suid_t { 24 25 _BB_SUID_NEVER = 0, 25 26 _BB_SUID_MAYBE, 26 27 _BB_SUID_ALWAYS 28 } bb_suid_t; 29 #endif 30 31 struct bb_applet { 32 const char *name; 33 int (*main) (int argc, char **argv); 34 #if ENABLE_FEATURE_INSTALLER 35 __extension__ enum bb_install_loc_t install_loc:8; 36 #endif 37 #if ENABLE_FEATURE_SUID 38 __extension__ enum bb_suid_t need_suid:8; 39 #endif 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(); */ 43 unsigned char noexec; 44 /* Even nicer */ 45 /* true if instead of fork(); exec("applet"); waitpid(); 46 * one can simply call applet_main(argc,argv); */ 47 unsigned char nofork; 48 #endif 27 49 }; 28 50 29 struct BB_applet { 30 const char *name; 31 int (*main) (int argc, char **argv); 32 __extension__ enum Location location:4; 33 __extension__ enum SUIDRoot need_suid:4; 34 }; 51 /* Defined in applet.c */ 52 extern const struct bb_applet applets[]; 53 extern const unsigned short NUM_APPLETS; 35 54 36 /* From busybox.c */ 37 extern const struct BB_applet applets[]; 38 39 /* Automagically pull in all the applet function prototypes and 40 * applet usage strings. These are all of the form: 41 * extern int foo_main(int argc, char **argv); 42 * extern const char foo_usage[]; 43 * These are all autogenerated from the set of currently defined applets. 44 */ 45 #define PROTOTYPES 46 #include "applets.h" 47 #undef PROTOTYPES 48 49 #endif /* _BB_INTERNAL_H_ */ 55 #endif /* _BB_INTERNAL_H_ */
Note:
See TracChangeset
for help on using the changeset viewer.