Ignore:
Timestamp:
Nov 4, 2007, 3:16:40 AM (17 years ago)
Author:
Bruno Cornec
Message:

Update to busybox 1.7.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi-busybox/include/busybox.h

    r821 r1765  
    88#define _BB_INTERNAL_H_    1
    99
    10 #include "bb_config.h"
    11 
    1210#include "libbb.h"
    1311
    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 */
     14typedef enum bb_install_loc_t {
    1615    _BB_DIR_ROOT = 0,
    1716    _BB_DIR_BIN,
     
    1918    _BB_DIR_USR_BIN,
    2019    _BB_DIR_USR_SBIN
    21 };
     20} bb_install_loc_t;
     21#endif
    2222
    23 enum SUIDRoot {
     23#if ENABLE_FEATURE_SUID
     24typedef enum bb_suid_t {
    2425    _BB_SUID_NEVER = 0,
    2526    _BB_SUID_MAYBE,
    2627    _BB_SUID_ALWAYS
     28} bb_suid_t;
     29#endif
     30
     31struct 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
    2749};
    2850
    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 */
     52extern const struct bb_applet applets[];
     53extern const unsigned short NUM_APPLETS;
    3554
    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.