Lines Matching full:which
33 if (!toys.which && strstart(&name, toy_list->name)) return toy_list; in toy_find()
81 int i = toys.which-toy_list; in show_help()
110 toys.which = toy_list; in unknown()
118 if (!CFG_TOYBOX || toys.which != toy_list) in check_help()
119 if (toys.which->flags&TOYFLAG_NOHELP) return; in check_help()
122 if (CFG_TOYBOX && toys.which == toy_list && arg[1]) in check_help()
123 if (!(toys.which = toy_find(arg[1]))) unknown(arg[1]); in check_help()
135 void toy_singleinit(struct toy_list *which, char *argv[]) in toy_singleinit() argument
137 toys.which = which; in toy_singleinit()
141 if (NEED_OPTIONS && which->options) get_optflags(); in toy_singleinit()
147 if (!(CFG_TOYBOX && which == toy_list) && !(which->flags & TOYFLAG_NOFORK)) { in toy_singleinit()
149 if (!(which->flags & TOYFLAG_UMASK)) umask(toys.old_umask); in toy_singleinit()
158 setvbuf(stdout, 0, (which->flags & TOYFLAG_LINEBUF) ? _IOLBF : _IONBF, 0); in toy_singleinit()
163 void toy_init(struct toy_list *which, char *argv[]) in toy_init() argument
165 void *oldwhich = toys.which; in toy_init()
169 if (!toys.which) toys.which = toy_list; in toy_init()
173 if (!(which->flags & TOYFLAG_STAYROOT)) { in toy_init()
179 } else if (CFG_TOYBOX_DEBUG && uid && which != toy_list) in toy_init()
182 if ((which->flags & TOYFLAG_NEEDROOT) && euid) { in toy_init()
183 toys.which = which; in toy_init()
196 toy_singleinit(which, argv); in toy_init()
201 static void toy_exec_which(struct toy_list *which, char *argv[]) in toy_exec_which() argument
203 // Return if we can't find it (which includes no multiplexer case), in toy_exec_which()
204 if (!which || (which->flags&TOYFLAG_NOFORK)) return; in toy_exec_which()
213 if (labs((long)toys.stacktop-(long)&which)>6000) return; in toy_exec_which()
216 if (toys.which && (which->flags&TOYFLAG_ROOTONLY) && toys.wasroot) return; in toy_exec_which()
219 toy_init(which, argv); in toy_exec_which()
220 if (toys.which) toys.which->toy_main(); in toy_exec_which()
239 // (Leave toys.which null to disable suid return logic.) in toybox_main()
251 toys.which = toy_list; in toybox_main()