2 /* Toybox infrastructure.
4 * Copyright 2006 Rob Landley <rob@landley.net>
6 * Licensed under GPL version 2, see file LICENSE in this tarball for details.
21 #include <sys/statvfs.h>
22 #include <sys/types.h>
32 int toybox_main(void);
36 #define TOYFLAG_USR (1<<0)
37 #define TOYFLAG_BIN (1<<1)
38 #define TOYFLAG_SBIN (1<<2)
39 #define TOYMASK_LOCATION ((1<<4)-1)
41 #define TOYFLAG_NOFORK (1<<4)
43 extern struct toy_list {
45 int (*toy_main)(void);
48 struct toy_list *toy_find(char *name);
49 void toy_init(struct toy_list *which, char *argv[]);
50 void toy_exec(char *argv[]);
52 // Global context for this applet.
54 extern struct toy_context {
55 struct toy_list *which; // Which entry in toy_list is this one?
56 int exitval; // Value error_exit feeds to exit()
57 int optflags; // Command line option flags
58 char **argv; // Command line arguments
64 struct toybox_data {;};
65 struct toysh_data {;};
67 struct string_list *fstype;
72 struct exit_data exit;
74 struct toybox_data toybox;
75 struct toysh_data toysh;
79 // Pending the addition of menuconfig...
81 #include "gen_config.h"