• Home
  • Raw
  • Download

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()
98 else fprintf(out, "%s see %s\n", toys.which->name, s); in show_help()
116 toys.which = toy_list; in unknown()
124 if (!CFG_TOYBOX || toys.which != toy_list) in check_help()
125 if (toys.which->flags&TOYFLAG_NOHELP) return; in check_help()
128 if (CFG_TOYBOX && toys.which == toy_list && arg[1]) { in check_help()
129 toys.which = 0; in check_help()
130 if (!(toys.which = toy_find(arg[1]))) unknown(arg[1]); in check_help()
143 void toy_singleinit(struct toy_list *which, char *argv[]) in toy_singleinit() argument
145 toys.which = which; in toy_singleinit()
149 if (NEED_OPTIONS && which->options) get_optflags(); in toy_singleinit()
156 if (!(CFG_TOYBOX && which == toy_list) && !(which->flags & TOYFLAG_NOFORK)) { in toy_singleinit()
158 if (!(which->flags & TOYFLAG_UMASK)) umask(toys.old_umask); in toy_singleinit()
167 setvbuf(stdout, 0, (which->flags & TOYFLAG_LINEBUF) ? _IOLBF : _IONBF, 0); in toy_singleinit()
172 void toy_init(struct toy_list *which, char *argv[]) in toy_init() argument
174 void *oldwhich = toys.which; in toy_init()
178 if (!toys.which) toys.which = toy_list; in toy_init()
182 if (!(which->flags & TOYFLAG_STAYROOT)) { in toy_init()
188 } else if (CFG_TOYBOX_DEBUG && uid && which != toy_list) in toy_init()
191 if ((which->flags & TOYFLAG_NEEDROOT) && euid) { in toy_init()
192 toys.which = which; in toy_init()
205 toy_singleinit(which, argv); in toy_init()
210 static void toy_exec_which(struct toy_list *which, char *argv[]) in toy_exec_which() argument
212 // Return if we can't find it (which includes no multiplexer case), in toy_exec_which()
213 if (!which || (which->flags&TOYFLAG_NOFORK)) return; in toy_exec_which()
222 if (labs((long)toys.stacktop-(long)&which)>6000) return; in toy_exec_which()
225 if (toys.which && (which->flags&TOYFLAG_ROOTONLY) && toys.wasroot) return; in toy_exec_which()
228 toy_init(which, argv); in toy_exec_which()
229 if (toys.which) toys.which->toy_main(); in toy_exec_which()
248 // (Leave toys.which null to disable suid return logic.) in toybox_main()
260 toys.which = toy_list; in toybox_main()