Lines Matching refs:which
71 static void toy_singleinit(struct toy_list *which, char *argv[]) in toy_singleinit() argument
73 toys.which = which; in toy_singleinit()
76 if (CFG_TOYBOX_I18N) setlocale(LC_ALL, "C"+!!(which->flags & TOYFLAG_LOCALE)); in toy_singleinit()
79 if (CFG_TOYBOX && toys.which == toy_list && toys.argv[2]) in toy_singleinit()
80 if (!(toys.which = toy_find(toys.argv[2]))) return; in toy_singleinit()
85 if (NEED_OPTIONS && which->options) get_optflags(); in toy_singleinit()
91 if (!(which->flags & TOYFLAG_UMASK)) umask(toys.old_umask); in toy_singleinit()
97 void toy_init(struct toy_list *which, char *argv[]) in toy_init() argument
99 void *oldwhich = toys.which; in toy_init()
104 if (!toys.which) toys.which = toy_list; in toy_init()
108 if (!(which->flags & TOYFLAG_STAYROOT)) { in toy_init()
114 } else if (CFG_TOYBOX_DEBUG && uid && which != toy_list) in toy_init()
117 if ((which->flags & TOYFLAG_NEEDROOT) && euid) help_exit("Not root"); in toy_init()
127 toy_singleinit(which, argv); in toy_init()
134 struct toy_list *which; in toy_exec() local
137 if (!(which = toy_find(*argv))) return; in toy_exec()
140 if (toys.stacktop && labs((char *)toys.stacktop-(char *)&which)>6000) in toy_exec()
144 if (toys.which && (which->flags&TOYFLAG_ROOTONLY) && toys.wasroot) return; in toy_exec()
147 toy_init(which, argv); in toy_exec()
148 if (toys.which) toys.which->toy_main(); in toy_exec()
164 toys.which = toy_list; in toybox_main()