Lines Matching full:which
40 // skip the first entry, which is out of order. in toy_find()
76 toys.which = toy_list; in unknown()
81 static void toy_singleinit(struct toy_list *which, char *argv[]) in toy_singleinit() argument
83 toys.which = which; in toy_singleinit()
90 if (CFG_TOYBOX_HELP_DASHDASH && !(which->flags & TOYFLAG_NOHELP) && argv[1]) { in toy_singleinit()
92 if (CFG_TOYBOX && toys.which == toy_list && toys.argv[2]) in toy_singleinit()
93 if (!(toys.which = toy_find(toys.argv[2]))) unknown(toys.argv[2]); in toy_singleinit()
104 if (NEED_OPTIONS && which->options) get_optflags(); in toy_singleinit()
110 if (!(which->flags & TOYFLAG_UMASK)) umask(toys.old_umask); in toy_singleinit()
116 void toy_init(struct toy_list *which, char *argv[]) in toy_init() argument
118 void *oldwhich = toys.which; in toy_init()
123 if (!toys.which) toys.which = toy_list; in toy_init()
127 if (!(which->flags & TOYFLAG_STAYROOT)) { in toy_init()
133 } else if (CFG_TOYBOX_DEBUG && uid && which != toy_list) in toy_init()
136 if ((which->flags & TOYFLAG_NEEDROOT) && euid != KERNEL_PROCESS_GROUP) help_exit("Not root"); in toy_init()
146 toy_singleinit(which, argv); in toy_init()
151 void toy_exec_which(struct toy_list *which, char *argv[]) in toy_exec_which() argument
153 // Return if we can't find it (which includes no multiplexer case), in toy_exec_which()
154 if (!which) return; in toy_exec_which()
163 if (labs((long)toys.stacktop-(long)&which)>6000) return; in toy_exec_which()
166 if (toys.which && (which->flags&TOYFLAG_ROOTONLY) && toys.wasroot) return; in toy_exec_which()
169 toy_init(which, argv); in toy_exec_which()
170 if (toys.which) toys.which->toy_main(); in toy_exec_which()
188 // (Leave toys.which null to disable suid return logic.) in toybox_main()
201 toys.which = toy_list; in toybox_main()