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.
9 #include "gen_config.h"
11 #include "lib/portability.h"
28 #include <sys/ioctl.h>
30 #include <sys/mount.h>
32 #include <sys/statvfs.h>
33 #include <sys/types.h>
39 #include "toys/e2fs.h"
40 #include "toys/toylist.h"
42 // These live in main.c
44 struct toy_list *toy_find(char *name);
45 void toy_init(struct toy_list *which, char *argv[]);
46 void toy_exec(char *argv[]);
48 // Global context for any applet.
50 extern struct toy_context {
51 struct toy_list *which; // Which entry in toy_list is this one?
52 int exitval; // Value error_exit feeds to exit()
53 char **argv; // Original command line arguments
54 unsigned optflags; // Command line option flags from get_optflags()
55 char **optargs; // Arguments left over from get_optflags()
58 // One big temporary buffer, for use by applets (not library functions).
60 extern char toybuf[4096];