Lines Matching full:which
33 if (!toys.which && strstart(&name, "toybox")) return toy_list; in toy_find()
66 toys.which = toy_list; in unknown()
71 void toy_singleinit(struct toy_list *which, char *argv[]) in toy_singleinit() argument
73 toys.which = which; in toy_singleinit()
78 if (CFG_TOYBOX_HELP_DASHDASH && !(which->flags & TOYFLAG_NOHELP) && argv[1]) { in toy_singleinit()
80 if (CFG_TOYBOX && toys.which == toy_list && toys.argv[2]) in toy_singleinit()
81 if (!(toys.which = toy_find(toys.argv[2]))) unknown(toys.argv[2]); in toy_singleinit()
92 if (NEED_OPTIONS && which->options) get_optflags(); in toy_singleinit()
98 if (!(CFG_TOYBOX && which == toy_list) && !(which->flags & TOYFLAG_NOFORK)) { in toy_singleinit()
100 if (!(which->flags & TOYFLAG_UMASK)) umask(toys.old_umask); in toy_singleinit()
109 setvbuf(stdout, 0, (which->flags & TOYFLAG_LINEBUF) ? _IOLBF : _IONBF, 0); in toy_singleinit()
114 void toy_init(struct toy_list *which, char *argv[]) in toy_init() argument
116 void *oldwhich = toys.which; in toy_init()
121 if (!toys.which) toys.which = toy_list; in toy_init()
125 if (!(which->flags & TOYFLAG_STAYROOT)) { in toy_init()
131 } else if (CFG_TOYBOX_DEBUG && uid && which != toy_list) in toy_init()
134 if ((which->flags & TOYFLAG_NEEDROOT) && euid) help_exit("Not root"); in toy_init()
144 toy_singleinit(which, argv); in toy_init()
149 static void toy_exec_which(struct toy_list *which, char *argv[]) in toy_exec_which() argument
151 // Return if we can't find it (which includes no multiplexer case), in toy_exec_which()
152 if (!which || (which->flags&TOYFLAG_NOFORK)) return; in toy_exec_which()
161 if (labs((long)toys.stacktop-(long)&which)>6000) return; in toy_exec_which()
164 if (toys.which && (which->flags&TOYFLAG_ROOTONLY) && toys.wasroot) return; in toy_exec_which()
167 toy_init(which, argv); in toy_exec_which()
168 if (toys.which) toys.which->toy_main(); in toy_exec_which()
187 // (Leave toys.which null to disable suid return logic.) in toybox_main()
198 toys.which = toy_list; in toybox_main()