HomeSort by relevance Sort by last modified time
    Searched refs:toys (Results 1 - 25 of 235) sorted by null

1 2 3 4 5 6 7 8 910

  /external/toybox/toys/posix/
false.c 16 #include "toys.h"
20 toys.exitval = 1;
link.c 18 #include "toys.h"
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 18 #include "toys.h"
22 if (unlink(*toys.optargs))
23 perror_exit("Couldn't unlink `%s'", *toys.optargs);
nice.c 24 #include "toys.h"
32 if (!toys.optflags) TT.n = 10;
36 toys.exitval = 125;
39 xexec(toys.optargs);
tty.c 23 #include "toys.h"
29 if (!toys.optflags) puts(tty ? tty : "not a tty");
31 toys.exitval = !tty;
basename.c 23 #include "toys.h"
33 if (toys.optflags&FLAG_s) toys.optflags |= FLAG_a;
35 if (!(toys.optflags&FLAG_a)) {
36 if (toys.optc > 2) error_exit("too many args");
37 TT.s = toys.optargs[1];
38 toys.optargs[1] = NULL;
41 for (arg = toys.optargs; *arg; ++arg) {
cat.c 52 #include "toys.h"
56 int i, len, size=(toys.optflags & FLAG_u) ? 1 : sizeof(toybuf);
61 toys.exitval = EXIT_FAILURE;
65 if ((CFG_CAT_V || CFG_CATV) && (toys.optflags&~FLAG_u)) {
69 if (c > 126 && (toys.optflags & FLAG_v)) {
81 if (toys.optflags & FLAG_e) xputc('$');
82 } else if (toys.optflags & (c==9 ? FLAG_t : FLAG_v)) {
95 loopfiles(toys.optargs, do_cat);
100 toys.optflags ^= FLAG_v;
101 loopfiles(toys.optargs, do_cat)
    [all...]
ln.c 25 #include "toys.h"
29 char *dest = toys.optargs[--toys.optc], *new;
34 if (!toys.optc) {
35 toys.optc++;
40 if (((toys.optflags&FLAG_n) ? lstat : stat)(dest, &buf)
43 if (toys.optc>1) error_exit("'%s' not a directory", dest);
47 for (i=0; i<toys.optc; i++) {
49 char *oldnew, *try = toys.optargs[i];
58 if (toys.optflags & FLAG_f)
    [all...]
  /external/toybox/toys/other/
chroot.c 21 #include "toys.h"
27 if (chdir(*toys.optargs) || chroot(".")) {
28 toys.exitval = 125;
29 perror_exit_raw(*toys.optargs);
31 if (toys.optargs[1]) xexec(toys.optargs+1);
pivot_root.c 23 #include "toys.h"
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 16 #include "toys.h"
20 if (swapoff(toys.optargs[0])) perror_exit("failed to remove swaparea");
readlink.c 25 #include "toys.h"
33 if (toys.optflags & (FLAG_f|FLAG_e|FLAG_m))
34 s = xabspath(*toys.optargs, (toys.optflags&(FLAG_f|FLAG_e))-1);
35 else s = xreadlink(*toys.optargs);
38 if (!(toys.optflags & FLAG_q))
39 xprintf((toys.optflags & FLAG_n) ? "%s" : "%s\n", s);
41 } else toys.exitval = 1;
setsid.c 18 #include "toys.h"
23 if (toys.optflags) {
27 xexec(toys.optargs);
swapon.c 20 #include "toys.h"
29 int flags = (toys.optflags&FLAG_d)*0x70000;
31 if (toys.optflags)
34 if (swapon(*toys.optargs, flags))
35 perror_exit("Couldn't swapon '%s'", *toys.optargs);
flock.c 22 #include "toys.h"
28 int fd = xstrtol(*toys.optargs, NULL, 10), op;
30 if (toys.optflags & FLAG_u) op = LOCK_UN;
31 else op = (toys.optflags & FLAG_s) ? LOCK_SH : LOCK_EX;
33 if (toys.optflags & FLAG_n) op |= LOCK_NB;
36 if ((op & LOCK_NB) && errno == EAGAIN) toys.exitval = 1;
reboot.c 22 #include "toys.h"
30 if (!(toys.optflags & FLAG_n)) sync();
32 idx = stridx("hp", *toys.which->name)+1;
33 if (toys.optflags & FLAG_f) toys.exitval = reboot(types[idx]);
34 else toys.exitval = kill(1, sigs[idx]);
vconfig.c 26 #include "toys.h"
33 char *cmd = *toys.optargs;
43 for (i=0; i<j; i++) if (!strcmp(toys.optargs[1], types[i])) break;
46 error_exit("%s: unknown '%s'", cmd, toys.optargs[1]);
57 xstrncpy(request.device1, toys.optargs[1], sizeof(request.device1));
61 if (toys.optargs[2]) request.u.VID = atolx_range(toys.optargs[2], 0, 4094);
67 if (toys.optargs[2]) request.u.flag = atolx_range(toys.optargs[2], 0, 1);
68 if (toys.optargs[3]) request.vlan_qos = atolx_range(toys.optargs[3], 0, 7)
    [all...]
help.c 32 #include "toys.h"
36 if (toys.optflags & FLAG_h)
39 toys.which = t;
42 if (toys.optflags & FLAG_h) xprintf("</blockquote></pre>\n");
45 // The simple help is just toys.which = toy_find("name"); show_help(stdout);
52 if (!(toys.optflags & FLAG_a)) {
53 struct toy_list *t = toys.which;
55 if (*toys.optargs && !(t = toy_find(*toys.optargs)))
56 error_exit("Unknown command '%s'", *toys.optargs)
    [all...]
freeramdisk.c 18 #include "toys.h"
24 fd = xopen(toys.optargs[0], O_RDWR);
25 xioctl(fd, BLKFLSBUF, toys.optargs[0]);
  /external/toybox/toys/android/
runcon.c 18 #include "toys.h"
22 char *context = *toys.optargs;
26 toys.stacktop = 0;
27 xexec(++toys.optargs);
restorecon.c 24 #include "toys.h"
36 if (toys.optflags & FLAG_D) flags |= SELINUX_ANDROID_RESTORECON_DATADATA;
37 if (toys.optflags & FLAG_F) flags |= SELINUX_ANDROID_RESTORECON_FORCE;
38 if (toys.optflags & (FLAG_R|FLAG_r))
40 if (toys.optflags & FLAG_n) flags |= SELINUX_ANDROID_RESTORECON_NOCHANGE;
41 if (toys.optflags & FLAG_v) flags |= SELINUX_ANDROID_RESTORECON_VERBOSE;
43 for (s = toys.optargs; *s; s++)
  /external/toybox/toys/example/
demo_many_options.c 17 #include "toys.h"
21 xprintf("optflags=%llx\n", toys.optflags);
  /external/toybox/toys/lsb/
pidof.c 23 #include "toys.h"
33 xprintf(" %s"+!!toys.exitval, toybuf);
34 toys.exitval = 0;
36 return toys.optflags & FLAG_s;
41 toys.exitval = 1;
42 names_to_pid(toys.optargs, print_pid);
43 if (!toys.exitval) xputc('\n');
mknod.c 31 #include "toys.h"
43 type = stridx("pcub", *toys.optargs[1]);
44 if (type == -1) perror_exit("bad type '%c'", *toys.optargs[1]);
46 if (toys.optc != 4) perror_exit("need major/minor");
48 major = atoi(toys.optargs[2]);
49 minor = atoi(toys.optargs[3]);
52 if (toys.optflags & FLAG_Z)
55 if (mknod(*toys.optargs, mode|modes[type], dev_makedev(major, minor)))
56 perror_exit_raw(*toys.optargs);
  /external/toybox/toys/pending/
groupadd.c 24 #include "toys.h"
42 if (toys.optflags & FLAG_g) {
46 if (toys.optflags & FLAG_S) TT.gid = CFG_TOYBOX_UID_SYS;
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);
65 if (toys.optflags && toys.optc == 2)
68 if (toys.optc == 2) { //add user to grou
    [all...]

Completed in 118 milliseconds

1 2 3 4 5 6 7 8 910