aboutsummaryrefslogtreecommitdiff
path: root/toys.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-05-05 21:20:11 -0500
committerRob Landley <rob@landley.net>2014-05-05 21:20:11 -0500
commit4c2bd6277d5966ea7ef7d59a34838066b5c130eb (patch)
tree0524dbc4c1bc710f1633e6218e1e8b60daf203cf /toys.h
parent26b21882bfd8a3712614e94dde41a5194dda7aee (diff)
downloadtoybox-4c2bd6277d5966ea7ef7d59a34838066b5c130eb.tar.gz
Fix bug reported by Ashwini Sharma: rebound has to be at the end or toy_init() doesn't zero the rest of the struct.
Diffstat (limited to 'toys.h')
-rw-r--r--toys.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/toys.h b/toys.h
index 31193a4d..c59c3c51 100644
--- a/toys.h
+++ b/toys.h
@@ -119,13 +119,15 @@ extern struct toy_context {
struct toy_list *which; // Which entry in toy_list is this one?
char **argv; // Original command line arguments
char **optargs; // Arguments left over from get_optflags()
- jmp_buf *rebound; // longjmp here instead of exit when do_rebound set
unsigned optflags; // Command line option flags from get_optflags()
int exitval; // Value error_exit feeds to exit()
int optc; // Count of optargs
int exithelp; // Should error_exit print a usage message first?
int old_umask; // Old umask preserved by TOYFLAG_UMASK
int toycount; // Total number of commands in this build
+
+ // This is at the end so toy_init() doesn't zero it.
+ jmp_buf *rebound; // longjmp here instead of exit when do_rebound set
} toys;
// Two big temporary buffers: one for use by commands, one for library functions