diff options
author | Rob Landley <rob@landley.net> | 2007-06-01 13:41:24 -0400 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2007-06-01 13:41:24 -0400 |
commit | b841cd2f8c1b378c1e8d73f5915662b8e79aac80 (patch) | |
tree | aac4b1a71e3aa7614ce5b9e4c94bf415fbf91053 /main.c | |
parent | 9fdf465b913ee35a17cf8d9758292afb0cac8a9f (diff) | |
download | toybox-b841cd2f8c1b378c1e8d73f5915662b8e79aac80.tar.gz |
Allow applets with optarg string NULL to use toy.optargs[].
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -58,18 +58,19 @@ void toy_init(struct toy_list *which, char *argv[]) toys.argv = argv; toys.exitval = 1; if (which->options) get_optflags(); + else toys.optargs = argv+1; } // Run a toy. void toy_exec(char *argv[]) { struct toy_list *which; - + which = toy_find(argv[0]); if (!which) return; toy_init(which, argv); - + exit(toys.which->toy_main()); } |