Searched refs:optargs (Results 1 - 25 of 181) sorted by relevance

12345678

/external/toybox/toys/posix/
H A Dlink.c22 if (link(toys.optargs[0], toys.optargs[1]))
23 perror_exit("couldn't link '%s' to '%s'", toys.optargs[1],
24 toys.optargs[0]);
H A Dunlink.c22 if (unlink(*toys.optargs))
23 perror_exit("Couldn't unlink `%s'", *toys.optargs);
H A Ddirname.c22 puts(dirname(*toys.optargs));
H A Dbasename.c23 char *base = basename(*toys.optargs), *suffix = toys.optargs[1];
/external/toybox/toys/other/
H A Dpwdx.c20 char **optargs; local
22 for (optargs = toys.optargs; *optargs; optargs++) {
26 path = xmprintf("/proc/%s/cwd", *optargs);
37 xprintf("%s: %s\n", *optargs, path);
H A Dchroot.c27 if (chdir(*toys.optargs) || chroot(".")) perror_exit_raw(*toys.optargs);
28 if (toys.optargs[1]) xexec(toys.optargs+1);
H A Dpivot_root.c30 if (syscall(__NR_pivot_root, toys.optargs[0], toys.optargs[1]))
31 perror_exit("'%s' -> '%s'", toys.optargs[0], toys.optargs[1]);
H A Dswapoff.c20 if (swapoff(toys.optargs[0])) perror_exit("failed to remove swaparea");
H A Dvconfig.c40 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[
[all...]
H A Dfreeramdisk.c24 fd = xopen(toys.optargs[0], O_RDWR);
25 xioctl(fd, BLKFLSBUF, toys.optargs[0]);
H A Drealpath.c20 char **s = toys.optargs;
22 for (s = toys.optargs; *s; s++) {
H A Dyes.c22 for (i=0; toys.optargs[i]; i++) {
24 xprintf("%s", toys.optargs[i]);
H A Dpartprobe.c29 loopfiles(toys.optargs, do_partprobe);
H A Dsetsid.c27 xexec(toys.optargs);
H A Dinsmod.c24 int fd = !strcmp(*toys.optargs, "-") ? 0 : xopen(*toys.optargs, O_RDONLY);
28 while (toys.optargs[i] &&
29 strlen(toybuf) + strlen(toys.optargs[i]) + 2 < sizeof(toybuf))
31 strcat(toybuf, toys.optargs[i++]);
40 char *path = !strcmp(*toys.optargs, "-") ? "/dev/stdin" : *toys.optargs;
47 if (rc) perror_exit("failed to load %s", toys.optargs[0]);
H A Dreadlink.c33 s = xabspath(*toys.optargs, toys.optflags & FLAG_e);
34 else s = xreadlink(*toys.optargs);
H A Dswapon.c33 if (swapon(*toys.optargs, flags))
34 perror_exit("Couldn't swapon '%s'", *toys.optargs);
H A Dfallocate.c28 int fd = xcreate(*toys.optargs, O_RDWR | O_CREAT, 0644);
H A Dusleep.c21 long delay = atol(*toys.optargs);
/external/toybox/toys/android/
H A Druncon.c22 char *context = *toys.optargs;
27 xexec(++toys.optargs);
/external/toybox/toys/lsb/
H A Dmknod.c44 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], makedev(major, minor)))
57 perror_exit_raw(*toys.optargs);
H A Dhostname.c23 const char *hostname = toys.optargs[0];
/external/toybox/toys/pending/
H A Dgroupadd.c52 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...]
H A Dtest.c49 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[
[all...]
/external/toybox/toys/example/
H A Dtest_human_readable.c21 human_readable(toybuf, strtoll(*toys.optargs, &c, 0), toys.optflags);

Completed in 1375 milliseconds

12345678