/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);
|
dirname.c | 18 #include "toys.h" 22 puts(dirname(*toys.optargs));
|
tty.c | 23 #include "toys.h" 29 if (!toys.optflags) puts(tty ? tty : "not a tty"); 31 toys.exitval = !tty;
|
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/ |
readlink.c | 24 #include "toys.h" 32 if (toys.optflags & (FLAG_f|FLAG_e)) 33 s = xabspath(*toys.optargs, toys.optflags & FLAG_e); 34 else s = xreadlink(*toys.optargs); 37 if (!(toys.optflags & FLAG_q)) 38 xprintf((toys.optflags & FLAG_n) ? "%s" : "%s\n", s); 40 } else toys.exitval = 1;
|
chroot.c | 21 #include "toys.h" 27 if (chdir(*toys.optargs) || chroot(".")) perror_exit_raw(*toys.optargs); 28 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");
|
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...] |
setsid.c | 18 #include "toys.h" 23 if (toys.optflags) { 27 xexec(toys.optargs);
|
swapon.c | 19 #include "toys.h" 28 int flags = (toys.optflags&FLAG_d)*0x70000; 30 if (toys.optflags) 33 if (swapon(*toys.optargs, flags)) 34 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 | 28 #include "toys.h" 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...] |
/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/ |
test_many_options.c | 17 #include "toys.h" 21 xprintf("optflags=%llx\n", toys.optflags);
|
test_human_readable.c | 15 #include "toys.h" 21 human_readable(toybuf, strtoll(*toys.optargs, &c, 0), toys.optflags);
|
/external/toybox/toys/pending/ |
test.c | 40 #include "toys.h" 47 toys.exitval = 2; 48 if (!strcmp("[", toys.which->name)) 49 if (!strcmp("]", toys.optargs[--toys.optc])) error_exit("Missing ']'"); 50 if (!strcmp("!", toys.optargs[0])) { 52 toys.optargs++; 53 toys.optc--; 55 if (!toys.optc) toys.exitval = 0 [all...] |
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...] |
/external/toybox/ |
Android.mk | 63 toys/android/getenforce.c \ 64 toys/android/getprop.c \ 65 toys/android/load_policy.c \ 66 toys/android/restorecon.c \ 67 toys/android/runcon.c \ 68 toys/android/setenforce.c \ 69 toys/android/setprop.c \ 70 toys/lsb/dmesg.c \ 71 toys/lsb/hostname.c \ 72 toys/lsb/killall.c [all...] |
/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');
|