/external/toybox/toys/other/ |
nbd_client.c | 37 #include "toys.h" 44 char *host=toys.optargs[0], *port=toys.optargs[1], *device=toys.optargs[2]; 79 if (toys.optflags & FLAG_s) mlockall(MCL_CURRENT|MCL_FUTURE); 82 if ((toys.optflags & FLAG_n) || !xfork()) { 97 if (!(toys.optflags & FLAG_n)) exit(0);
|
hwclock.c | 25 #include "toys.h" 66 if (toys.optflags & FLAG_u) TT.utc = 1; 77 if (!(toys.optflags&FLAG_t)) { 78 int w = toys.optflags & FLAG_w, flag = O_WRONLY*w; 101 if (toys.optflags & (FLAG_w|FLAG_t)) { 107 if (toys.optflags & FLAG_w) { 113 } else if (toys.optflags & FLAG_s) { 117 } else if (toys.optflags & FLAG_t) { 130 if (toys.optflags & (FLAG_t|FLAG_s)) {
|
base64.c | 23 #include "toys.h" 36 if (!(toys.optflags & FLAG_d)) { 48 if (toys.optflags & FLAG_d) { 62 if (buf[i] == '\n' || (toys.optflags & FLAG_i)) continue; 86 loopfiles(toys.optargs, do_base64);
|
chvt.c | 20 #include "toys.h" 27 vtnum=atoi(*toys.optargs);
|
mix.c | 23 #include "toys.h" 46 } else if (toys.optflags & FLAG_l) break; 51 if (!(toys.optflags & (FLAG_c|FLAG_l))) return; 54 if (!(toys.optflags & FLAG_l)) { 62 if (!(toys.optflags & FLAG_r)) level = TT.right | (level<<8);
|
readahead.c | 18 #include "toys.h" 36 loopfiles(toys.optargs, do_readahead);
|
modinfo.c | 20 #include "toys.h" 35 xputc((toys.optflags & FLAG_0) ? 0 : '\n'); 80 for (s = toys.optargs[TT.mod]; *s; s++) { 103 for(TT.mod = 0; TT.mod<toys.optc; TT.mod++) { 104 char *s = strstr(toys.optargs[TT.mod], ".ko"); 106 if (s && !s[3]) modinfo_file(toys.optargs[TT.mod]); 112 (toys.optflags & FLAG_b) ? TT.base : "", 113 (toys.optflags & FLAG_k) ? TT.knam : uts.release) >= sizeof(toybuf))
|
xxd.c | 30 #include "toys.h" 44 if (!(toys.optflags&FLAG_p)) printf("%08llx: ", pos); 56 if (!(toys.optflags&FLAG_p)) { 83 if (!(toys.optflags&FLAG_p)) { 97 while (toys.optflags&FLAG_p || col < TT.c) { 128 if (toys.optflags&FLAG_p) TT.c = TT.g = 30; 130 loopfiles(toys.optargs, toys.optflags&FLAG_r ? do_xxd_reverse : do_xxd);
|
acpi.c | 25 #include "toys.h" 62 if ((toys.optflags & FLAG_b) || (!toys.optflags)) { 74 } else if (toys.optflags & FLAG_a) { 137 if (toys.optflags & FLAG_V) toys.optflags = FLAG_a|FLAG_b|FLAG_c|FLAG_t; 138 if (!toys.optflags) toys.optflags = FLAG_b; 139 if (toys.optflags & (FLAG_a|FLAG_b)) 141 if (toys.optflags & FLAG_t) dirtree_read("/sys/class", temp_callback) [all...] |
lspci.c | 31 #include "toys.h" 55 if (toys.optflags & FLAG_k) 59 int fd, size = 6 + 2*((toys.optflags & FLAG_e) && p == toybuf); 99 printf((toys.optflags & FLAG_m) 109 printf((toys.optflags & FLAG_m) ? "%s \"%s\" \"%s\" \"%s\"" 115 printf((toys.optflags & FLAG_m) ? " \"%s\"" : " %s", basename(driver));
|
lsattr.c | 55 #include "toys.h" 101 if (toys.optflags & FLAG_v) { 110 if (toys.optflags & FLAG_l) { 152 if ((root->name[0] != '.') || (toys.optflags & FLAG_a)) { 154 if (S_ISDIR(root->st.st_mode) && (toys.optflags & FLAG_R) 167 if (!*toys.optargs) dirtree_read(".", retell_dir); 169 for (; *toys.optargs; toys.optargs++) { 172 if (lstat(*toys.optargs, &sb)) perror_msg("stat '%s'", *toys.optargs) [all...] |
/external/toybox/toys/posix/ |
cal.c | 21 #include "toys.h" 75 if (toys.optc) { 81 tm->tm_year = atolx_range(toys.optargs[--toys.optc], 1, 9999); 85 if (toys.optc) { 86 tm->tm_mon = atolx_range(toys.optargs[--toys.optc], 1, 12);
|
env.c | 22 #include "toys.h" 34 if (toys.optflags & FLAG_i) clearenv(); 40 for (ev = toys.optargs; *ev; ev++) {
|
cp.c | 109 #include "toys.h" 147 unsigned flags = toys.optflags; 189 fprintf(stderr, "%s: overwrite '%s'", toys.which->name, 198 printf("%s '%s'\n", toys.which->name, s); 229 | (DIRTREE_SYMFOLLOW*!!(toys.optflags&FLAG_L)); 360 if (CFG_MV && toys.which->name[0] == 'm') 371 char *destname = toys.optargs[--toys.optc]; 374 if (toys.optc>1 && !destdir) error_exit("'%s' not directory", destname); 376 if (toys.optflags & (FLAG_a|FLAG_p)) [all...] |
nohup.c | 20 #include "toys.h" 41 xexec(toys.optargs);
|
paste.c | 23 #include "toys.h" 31 char *p, *buf = toybuf, **args = toys.optargs; 37 if (!(toys.optflags & FLAG_d)) TT.delim = "\t"; 48 if (toys.optflags & FLAG_s) { // Sequential 79 for (i = 0; i < toys.optc; i++) { 95 if (anyopen) putchar((i + 1 == toys.optc) ? toybuf[i % ndelim] : '\n');
|
touch.c | 29 #include "toys.h" 45 if (toys.optflags & (FLAG_t|FLAG_d)) { 54 if (toys.optflags & FLAG_d) { 112 i = toys.optflags & (FLAG_a|FLAG_m); 116 for (ss = toys.optargs; *ss;) { 120 (toys.optflags & FLAG_h)*AT_SYMLINK_NOFOLLOW)) ss++; 121 else if (toys.optflags & FLAG_c) ss++;
|
/external/toybox/toys/pending/ |
netstat.c | 31 #include "toys.h" 143 if (!(toys.optflags & FLAG_n) && (pw = getpwuid(uid))) { 148 xprintf((toys.optflags & FLAG_W) ? "%-51.51s %-51.51s " : "%-23.23s %-23.23s " 151 if ((toys.optflags & FLAG_e)) xprintf("%-10s %-11ld ", user, inode); 152 if ((toys.optflags & FLAG_p)) xprintf("%s", get_pid_name(inode)); 163 if (toys.optflags & FLAG_l) { 166 } else if (toys.optflags & FLAG_a) 202 if (!(toys.optflags & FLAG_n)) { 328 if (toys.optflags & FLAG_l) { 331 } else if (!(toys.optflags & FLAG_a)) [all...] |
openvt.c | 34 #include "toys.h" 81 if (!(toys.optflags & FLAG_c)) { 103 if (toys.optflags & FLAG_s) { 119 xexec(toys.optargs); 122 if (toys.optflags & FLAG_w) { 125 if (toys.optflags & FLAG_s) { 139 if (*toys.optargs) vt_num = atolx_range(*toys.optargs, 1, 63);
|
tcpsvd.c | 38 #include "toys.h" 179 if (toys.optflags & FLAG_v) { 181 xprintf("%s: end %d exit %d\n",toys.which->name, pid_n, WEXITSTATUS(status)); 183 xprintf("%s: end %d signaled %d\n",toys.which->name, pid_n, WTERMSIG(status)); 184 if (TT.cn > 1) xprintf("%s: status %d/%d\n",toys.which->name, TT.count_all, TT.cn); 227 port = strtoul(toys.optargs[1], &ptr, 10); 230 if (*ptr) ptr = toys.optargs[1]; 258 if (toys.optflags & FLAG_v) xprintf("got signal %d, exit\n", sig); 274 TT.udp = (*toys.which->name == 'u'); 275 if (TT.udp) toys.optflags &= ~FLAG_C [all...] |
dd.c | 35 #include "toys.h" 164 in.buff = out.buff = xmalloc(in.sz + ((toys.optflags & C_BS)? 0: out.sz)); 188 if (toys.optflags & C_NOERROR) { //warn message and summary 233 if (toys.optflags & (C_OF | C_SEEK) && !(toys.optflags & C_NOTRUNC)) 236 while (!(toys.optflags & C_COUNT) || (st.in_full + st.in_part) < c_count) { 242 if (toys.optflags & C_SYNC) memset(in.bp, 0, in.sz); 248 if (!(toys.optflags & C_NOERROR)) exit(1); 251 if (!(toys.optflags & C_SYNC)) continue; 260 if (toys.optflags & C_SYNC) in.count += in.sz [all...] |
getty.c | 29 #include "toys.h" 109 if (isdigit(**toys.optargs)) { 110 get_speed(*toys.optargs); 111 if (*++toys.optargs) TT.tty_name = xmprintf("%s", *toys.optargs); 113 TT.tty_name = xmprintf("%s", *toys.optargs); 114 if (*++toys.optargs) get_speed(*toys.optargs); 116 if (*++toys.optargs) setenv("TERM", *toys.optargs, 1) [all...] |
traceroute.c | 45 #include "toys.h" 117 if (toys.optflags & FLAG_U) { 164 if ((toys.optflags & FLAG_d) && (setsockopt(sock,SOL_SOCKET, SO_DEBUG, 167 if ((toys.optflags & FLAG_r) && (setsockopt(sock, SOL_SOCKET, SO_DONTROUTE, 221 if (probe && (toys.optflags & FLAG_z)) usleep(TT.pause_time * 1000); 270 if (toys.optflags & FLAG_U) { 298 if (!(toys.optflags & FLAG_n)) { 308 if (!(toys.optflags & FLAG_n)) xprintf(")"); 312 if (toys.optflags & FLAG_l) xprintf(" (%d)", rcv_pkt->ip_ttl); 313 if (toys.optflags & FLAG_v) [all...] |
/external/toybox/toys/android/ |
load_policy.c | 18 #include "toys.h" 22 char *path = *toys.optargs;
|
/external/toybox/toys/lsb/ |
dmesg.c | 26 #include "toys.h" 37 if (toys.optflags & FLAG_n) { 47 size = klogctl(3 + (toys.optflags & FLAG_c), data, size); 52 if (!(toys.optflags & FLAG_r)) while ((from - data) < size) { 57 if ((toys.optflags&FLAG_t) && *from == '[' && (to = strchr(from, ']')))
|