/external/toybox/toys/posix/ |
link.c | 22 if (link(toys.optargs[0], toys.optargs[1])) 23 perror_exit("couldn't link '%s' to '%s'", toys.optargs[1], 24 toys.optargs[0]);
|
unlink.c | 22 if (unlink(*toys.optargs)) 23 perror_exit("Couldn't unlink `%s'", *toys.optargs);
|
dirname.c | 22 puts(dirname(*toys.optargs));
|
basename.c | 23 char *base = basename(*toys.optargs), *suffix = toys.optargs[1];
|
/external/toybox/toys/other/ |
pwdx.c | 20 char **optargs; local 22 for (optargs = toys.optargs; *optargs; optargs++) { 25 sprintf(toybuf, "/proc/%d/cwd", atoi(*optargs)); 31 xprintf("%s: %s\n", *optargs, path);
|
chroot.c | 27 if (chdir(*toys.optargs) || chroot(".")) perror_exit_raw(*toys.optargs); 28 if (toys.optargs[1]) xexec(toys.optargs+1);
|
pivot_root.c | 30 if (syscall(__NR_pivot_root, toys.optargs[0], toys.optargs[1])) 31 perror_exit("'%s' -> '%s'", toys.optargs[0], toys.optargs[1]);
|
swapoff.c | 20 if (swapoff(toys.optargs[0])) perror_exit("failed to remove swaparea");
|
vconfig.c | 40 cmd = toys.optargs[0]; 47 for (i=0; i<j; i++) if (!strcmp(toys.optargs[1], types[i])) break; 50 error_exit("%s: unknown '%s'", cmd, toys.optargs[1]); 60 xstrncpy(request.device1, toys.optargs[1], 16); 64 if (toys.optargs[2]) request.u.VID = atolx_range(toys.optargs[2], 0, 4094); 70 if (toys.optargs[2]) request.u.flag = atolx_range(toys.optargs[2], 0, 1); 71 if (toys.optargs[3]) request.vlan_qos = atolx_range(toys.optargs[3], 0, 7) [all...] |
freeramdisk.c | 24 fd = xopen(toys.optargs[0], O_RDWR); 25 xioctl(fd, BLKFLSBUF, toys.optargs[0]);
|
realpath.c | 20 char **s = toys.optargs; 22 for (s = toys.optargs; *s; s++) {
|
yes.c | 22 for (i=0; toys.optargs[i]; i++) { 24 xprintf("%s", toys.optargs[i]);
|
partprobe.c | 29 loopfiles(toys.optargs, do_partprobe);
|
setsid.c | 27 xexec(toys.optargs);
|
readlink.c | 33 s = xabspath(*toys.optargs, toys.optflags & FLAG_e); 34 else s = xreadlink(*toys.optargs);
|
swapon.c | 33 if (swapon(*toys.optargs, flags)) 34 perror_exit("Couldn't swapon '%s'", *toys.optargs);
|
insmod.c | 28 int fd = xopenro(*toys.optargs); 32 while (toys.optargs[i] && 33 strlen(toybuf) + strlen(toys.optargs[i]) + 2 < sizeof(toybuf)) 35 strcat(toybuf, toys.optargs[i++]); 44 char *path = !strcmp(*toys.optargs, "-") ? "/dev/stdin" : *toys.optargs; 51 if (rc) perror_exit("failed to load %s", toys.optargs[0]);
|
/external/toybox/toys/android/ |
runcon.c | 22 char *context = *toys.optargs; 27 xexec(++toys.optargs);
|
sendevent.c | 24 int fd = xopen(*toys.optargs, O_RDWR); 29 perror_exit("EVIOCGVERSION failed for %s", *toys.optargs); 33 ev.type = atoi(toys.optargs[1]); 34 ev.code = atoi(toys.optargs[2]); 35 ev.value = atoi(toys.optargs[3]);
|
load_policy.c | 22 int fd = xopenro(*toys.optargs); 28 perror_exit("security_load_policy %s", *toys.optargs);
|
log.c | 45 for (i = 0; toys.optargs[i]; i++) { 47 if ((s-toybuf)+strlen(toys.optargs[i])>=1024) { 48 memcpy(s, toys.optargs[i], 1024-(s-toybuf)); 54 s = stpcpy(s, toys.optargs[i]);
|
/external/toybox/toys/lsb/ |
mknod.c | 44 type = stridx("pcub", *toys.optargs[1]); 45 if (type == -1) perror_exit("bad type '%c'", *toys.optargs[1]); 49 major = atoi(toys.optargs[2]); 50 minor = atoi(toys.optargs[3]); 56 if (mknod(*toys.optargs, mode|modes[type], dev_makedev(major, minor))) 57 perror_exit_raw(*toys.optargs);
|
/external/toybox/toys/pending/ |
groupadd.c | 52 entry = xmprintf("%s:%s:%d:", *toys.optargs, "x", TT.gid); 53 update_password(GROUP_PATH, *toys.optargs, entry); 55 entry = xmprintf("%s:%s::", *toys.optargs, "!"); 56 update_password(SECURE_GROUP_PATH, *toys.optargs, entry); 69 //toys.optargs[0]- user, toys.optargs[1] - group 70 xgetpwnam(*toys.optargs); 71 if (!(grp = getgrnam(toys.optargs[1]))) 72 error_exit("group '%s' does not exist", toys.optargs[1]); 73 if (!grp->gr_mem) entry = xmprintf("%s", *toys.optargs); [all...] |
test.c | 49 if (!strcmp("]", toys.optargs[--toys.optc])) error_exit("Missing ']'"); 50 if (!strcmp("!", toys.optargs[0])) { 52 toys.optargs++; 56 else if (toys.optargs[0][0] == '-') { 57 id = stridx("bcdefghLpSsurwxznt", toys.optargs[0][1]); 58 if (id == -1 || toys.optargs[0][2]) error_exit(err_fmt, toys.optargs[0]); 64 if (lstat(toys.optargs[1], &st) == -1) return; 66 if (!nolink && (stat(toys.optargs[1], &st) == -1)) return; 81 toys.exitval = access(toys.optargs[1], 1 << (id - 12)) == -1 [all...] |
/external/toybox/toys/example/ |
test_human_readable.c | 21 human_readable(toybuf, strtoll(*toys.optargs, &c, 0), toys.optflags);
|