HomeSort by relevance Sort by last modified time
    Searched refs:toys (Results 26 - 50 of 220) sorted by null

12 3 4 5 6 7 8 9

  /external/toybox/toys/lsb/
mknod.c 31 #include "toys.h"
44 type = stridx("pcub", *toys.optargs[1]);
45 if (type == -1) perror_exit("bad type '%c'", *toys.optargs[1]);
47 if (toys.optc != 4) perror_exit("need major/minor");
49 major = atoi(toys.optargs[2]);
50 minor = atoi(toys.optargs[3]);
53 if (toys.optflags & FLAG_Z)
56 if (mknod(*toys.optargs, mode|modes[type], makedev(major, minor)))
57 perror_exit_raw(*toys.optargs);
mktemp.c 28 #include "toys.h"
36 int d_flag = toys.optflags & FLAG_d;
37 char *template = *toys.optargs;
48 if (toys.optflags & FLAG_q) toys.exitval = 1;
52 if (toys.optflags & FLAG_u) unlink(template);
killall.c 25 #include "toys.h"
42 if (toys.optflags & FLAG_i) {
56 if (!(toys.optflags & FLAG_q)) perror_msg("pid %d", (int)pid);
57 } else if (toys.optflags & FLAG_v)
67 TT.names = toys.optargs;
70 if (toys.optflags & FLAG_l) {
77 if (toys.optflags & FLAG_q) exit(1);
82 toys.optc--;
86 if (!(toys.optflags & FLAG_l) && !toys.optc) help_exit("no name")
    [all...]
su.c 26 #include "toys.h"
48 if (*toys.optargs && !strcmp("-", *toys.optargs)) {
49 toys.optflags |= FLAG_l;
50 toys.optargs++;
53 if (*toys.optargs) name = *(toys.optargs++);
68 argv = argu = xmalloc(sizeof(char *)*(toys.optc + 4));
71 if (toys.optflags & FLAG_l) {
82 if (!(toys.optflags & (FLAG_m|FLAG_p)))
    [all...]
  /external/toybox/toys/other/
freeramdisk.c 18 #include "toys.h"
24 fd = xopen(toys.optargs[0], O_RDWR);
25 xioctl(fd, BLKFLSBUF, toys.optargs[0]);
realpath.c 16 #include "toys.h"
20 char **s = toys.optargs;
22 for (s = toys.optargs; *s; s++) {
usleep.c 16 #include "toys.h"
21 long delay = atol(*toys.optargs);
25 toys.exitval = !!nanosleep(&tv, NULL);
yes.c 16 #include "toys.h"
22 for (i=0; toys.optargs[i]; i++) {
24 xprintf("%s", toys.optargs[i]);
chcon.c 22 #include "toys.h"
26 char *path, *con = *toys.optargs;
31 if (toys.optflags & FLAG_v) printf("chcon '%s' to %s\n", path, con);
32 if (-1 == ((toys.optflags & FLAG_h) ? lsetfilecon : setfilecon)(path, con))
36 return (toys.optflags & FLAG_R)*DIRTREE_RECURSE;
43 for (file = toys.optargs+1; *file; file++) dirtree_read(*file, do_chcon);
nsenter.c 65 #include "toys.h"
103 return toys.optflags & FLAG_r;
108 return toys.optflags & FLAG_f;
123 if (CFG_UNSHARE && *toys.which->name=='u') {
128 if (test_r()) toys.optflags |= FLAG_U;
131 if (toys.optflags & (1<<i)) f |= flags[i];
137 toys.exitval = xrun(toys.optargs);
148 if (toys.optflags & (1<<i)) {
150 if (!(toys.optflags & FLAG_t)) error_exit("need -t or =filename")
    [all...]
ionice.c 39 #include "toys.h"
62 if (!TT.pid && !toys.optc) error_exit("Need -p or COMMAND");
63 if (toys.optflags == FLAG_p) {
69 if (-1 == ioprio_set() && !(toys.optflags&FLAG_t)) perror_exit("set");
70 if (!TT.pid) xexec(toys.optargs);
78 TT.pid = atolx(*toys.optargs);
79 if (toys.optc == 1) {
91 if (!strcmp(toys.optargs[toys.optc-1], classes[TT.class])) break;
92 if (toys.optc == 3 || TT.class == 4) TT.level = atolx(toys.optargs[1])
    [all...]
mountpoint.c 20 #include "toys.h"
24 if (!(toys.optflags & FLAG_q)) printf("%s: not a %s\n", *toys.optargs, gripe);
26 toys.exitval++;
33 char *arg = *toys.optargs;
34 int quiet = toys.optflags & FLAG_q;
38 if (toys.optflags & FLAG_x) {
58 toys.exitval = !(st1.st_dev != st2.st_dev || st1.st_ino == st2.st_ino);
59 if (toys.optflags & FLAG_d)
62 printf("%s is %sa mountpoint\n", *toys.optargs, toys.exitval ? "not " : "")
    [all...]
oneit.c 31 #include "toys.h"
53 toys.signal = signal;
70 if (toys.optflags & FLAG_3) {
79 while (!toys.signal) {
89 while (pid != wait(&i)) if (toys.optflags & FLAG_3) i = write(4, &pid, 4);
90 if (toys.optflags & FLAG_n) continue;
92 oneit_signaled((toys.optflags & FLAG_p) ? SIGUSR2 : SIGTERM);
103 toy_exec(toys.optargs);
104 execvp(*toys.optargs, toys.optargs)
    [all...]
printenv.c 18 #include "toys.h"
24 char **env, **var = toys.optargs;
27 if (toys.optflags) delim = 0;
41 if (*var && !catch) toys.exitval = 1;
partprobe.c 20 #include "toys.h"
29 loopfiles(toys.optargs, do_partprobe);
which.c 17 #include "toys.h"
51 if (!toys.optflags) {
66 for (i=0; toys.optargs[i]; i++)
67 toys.exitval |= which_in_path(toys.optargs[i]);
  /external/toybox/toys/posix/
nice.c 24 #include "toys.h"
32 if (!toys.optflags) TT.priority = 10;
37 xexec(toys.optargs);
sleep.c 28 #include "toys.h"
34 tv.tv_sec = xparsetime(*toys.optargs, 1000000000, &tv.tv_nsec);
35 toys.exitval = !!nanosleep(&tv, NULL);
mkdir.c 32 #include "toys.h"
42 mode_t mode = (0777&~toys.old_umask);
44 if (CFG_MKDIR_Z && (toys.optflags&FLAG_Z))
51 for (s=toys.optargs; *s; s++) {
52 if (mkpathat(AT_FDCWD, *s, mode, toys.optflags|1))
ulimit.c 44 #include "toys.h"
68 if (!(toys.optflags&(FLAG_H-1))) toys.optflags |= FLAG_f;
69 if ((toys.optflags&(FLAG_a|FLAG_p)) && toys.optc) error_exit("can't set -ap");
72 if (!(toys.optflags&FLAG_P)) TT.pid = getppid();
77 int get = toys.optflags&(FLAG_a|(1<<i));
80 if (!toys.optc) {
81 if (toys.optflags&FLAG_a) printf("-%c: ", flags[i]);
84 if (toys.optflags&FLAG_H
    [all...]
wc.c 28 #include "toys.h"
38 if (!toys.optflags || (toys.optflags&(1<<i))) {
44 if (*toys.optargs) xprintf(" %s", name);
53 if (toys.optflags == FLAG_c) {
67 if (toys.optflags == FLAG_c) {
74 if (CFG_TOYBOX_I18N && (toys.optflags&FLAG_m)) {
101 toys.optflags |= (toys.optflags&8)>>1;
102 loopfiles(toys.optargs, do_wc)
    [all...]
mkfifo.c 28 #include "toys.h"
42 if (toys.optflags & FLAG_m) TT.mode = string_to_mode(TT.m_string, 0);
44 if (CFG_MKFIFO_Z && (toys.optflags&FLAG_Z))
48 for (s = toys.optargs; *s; s++)
chmod.c 36 #include "toys.h"
49 if (toys.optflags & FLAG_v) {
56 return (toys.optflags & FLAG_R) ? DIRTREE_RECURSE : 0;
61 TT.mode = *toys.optargs;
64 for (file = toys.optargs+1; *file; file++) dirtree_read(*file, do_chmod);
  /external/toybox/toys/example/
skeleton.c 39 #include "toys.h"
69 printf("Ran %s\n", toys.which->name);
73 if (toys.optflags) printf("flags=%x\n", toys.optflags);
74 if (toys.optflags & FLAG_a) printf("Saw a\n");
75 if (toys.optflags & FLAG_b) printf("b=%s\n", TT.s.b_string);
76 if (toys.optflags & FLAG_c) printf("c=%ld\n", TT.s.c_number);
82 for (optargs = toys.optargs; *optargs; optargs++)
84 if (toys.optflags & FLAG_walrus) printf("Saw --walrus\n");
97 printf("Ran %s\n", toys.which->name)
    [all...]
  /external/toybox/
main.c 6 #include "toys.h"
26 struct toy_context toys; variable in typeref:struct:toy_context
73 toys.which = which;
74 toys.argv = argv;
79 if (CFG_TOYBOX && toys.which == toy_list && toys.argv[2])
80 if (!(toys.which = toy_find(toys.argv[2]))) return;
87 toys.optargs = argv+1;
88 for (toys.optc = 0; toys.optargs[toys.optc]; toys.optc++)
    [all...]

Completed in 448 milliseconds

12 3 4 5 6 7 8 9