• Home
  • Raw
  • Download

Lines Matching refs:toys

29 struct toy_context toys;  variable
75 toys.exitval = 127; in unknown()
76 toys.which = toy_list; in unknown()
83 toys.which = which; in toy_singleinit()
84 toys.argv = argv; 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()
106 toys.optargs = argv+1; in toy_singleinit()
107 for (toys.optc = 0; toys.optargs[toys.optc]; toys.optc++); in toy_singleinit()
109 toys.old_umask = umask(0); in toy_singleinit()
110 if (!(which->flags & TOYFLAG_UMASK)) umask(toys.old_umask); in toy_singleinit()
111 toys.signalfd--; in toy_singleinit()
112 toys.toycount = ARRAY_LEN(toy_list); in toy_singleinit()
118 void *oldwhich = toys.which; in toy_init()
123 if (!toys.which) toys.which = toy_list; in toy_init()
131 toys.wasroot++; in toy_init()
141 if (argv<toys.optargs || argv>toys.optargs+toys.optc) free(toys.optargs); in toy_init()
142 memset(&toys, 0, offsetof(struct toy_context, rebound)); in toy_init()
162 if (!CFG_TOYBOX_NORECURSE && toys.stacktop) 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()
170 if (toys.which) toys.which->toy_main(); in toy_exec_which()
190 if (toys.argv[1]) { in toybox_main()
191 toy_exec(toys.argv+1); in toybox_main()
192 if (0<readlink(toys.argv[1], libbuf, sizeof(libbuf))) { in toybox_main()
195 if (tl == toy_list) unknown(basename(toys.argv[1])); in toybox_main()
196 else toy_exec_which(tl, toys.argv+1); in toybox_main()
201 toys.which = toy_list; in toybox_main()
203 if (toys.argv[1] && toys.argv[1][0] != '-') unknown(toys.argv[1]); in toybox_main()
209 if (toys.argv[1]) { in toybox_main()
231 toys.stacktop = &stack; in main()
247 toys.stacktop = 0; in main()
254 toys.argv = argv-1; in main()