Home
last modified time | relevance | path

Searched refs:optflags (Results 1 – 25 of 142) sorted by relevance

123456

/external/toybox/toys/posix/
Dgrep.c67 int lcount = 0, mcount = 0, which = toys.optflags & FLAG_w ? 2 : 0;
68 char indelim = '\n' * !(toys.optflags&FLAG_z),
69 outdelim = '\n' * !(toys.optflags&FLAG_Z);
95 if (toys.optflags & FLAG_F) {
100 if (toys.optflags & FLAG_x) {
101 int i = (toys.optflags & FLAG_i);
109 if (toys.optflags & FLAG_i) {
129 if (toys.optflags & FLAG_x)
132 if (toys.optflags & FLAG_v) {
133 if (toys.optflags & FLAG_o) {
[all …]
Ddu.c57 if (toys.optflags & FLAG_h) { in print()
63 if (toys.optflags & FLAG_K) bits = 9; in print()
64 else if (toys.optflags & FLAG_m) bits = 20; in print()
111 if ((toys.optflags & FLAG_x) && (TT.st_dev != node->st.st_dev)) in do_du()
115 if (toys.optflags & FLAG_L) { in do_du()
124 if (!(toys.optflags & FLAG_l) && !node->again) in do_du()
131 return DIRTREE_COMEAGAIN|(DIRTREE_SYMFOLLOW*!!(toys.optflags&FLAG_L)); in do_du()
139 if ((toys.optflags & FLAG_a) || !node->parent in do_du()
140 || (S_ISDIR(node->st.st_mode) && !(toys.optflags & FLAG_s))) in do_du()
154 dirtree_handle_callback(dirtree_start(*args, toys.optflags&(FLAG_H|FLAG_L)), in du_main()
[all …]
Dcomm.c30 if (col == 0 && toys.optflags & FLAG_1) return; in writeline()
32 if (toys.optflags & FLAG_2) return; in writeline()
33 if (!(toys.optflags & FLAG_1)) putchar('\t'); in writeline()
35 if (toys.optflags & FLAG_3) return; in writeline()
36 if (!(toys.optflags & FLAG_1)) putchar('\t'); in writeline()
37 if (!(toys.optflags & FLAG_2)) putchar('\t'); in writeline()
48 if (toys.optflags == 7) return; in comm_main()
Dcat.c56 int i, len, size=(toys.optflags & FLAG_u) ? 1 : sizeof(toybuf); in do_cat()
62 if ((CFG_CAT_V || CFG_CATV) && (toys.optflags&~FLAG_u)) { in do_cat()
66 if (c > 126 && (toys.optflags & FLAG_v)) { in do_cat()
78 if (toys.optflags & FLAG_e) xputc('$'); in do_cat()
79 } else if (toys.optflags & (c==9 ? FLAG_t : FLAG_v)) { in do_cat()
97 toys.optflags ^= FLAG_v; in catv_main()
Dcksum.c44 unsigned crc = (toys.optflags & FLAG_P) ? 0xffffffff : 0; in do_cksum()
48 cksum = (toys.optflags & FLAG_L) ? cksum_le : cksum_be; in do_cksum()
65 if (!(toys.optflags & FLAG_N)) { in do_cksum()
72 printf((toys.optflags & FLAG_H) ? "%x" : "%u", in do_cksum()
73 (toys.optflags & FLAG_I) ? crc : ~crc); in do_cksum()
81 crc_init(TT.crc_table, toys.optflags & FLAG_L); in cksum_main()
Dcut.c143 if (!(toys.optflags & FLAG_s)) xputs(buff); in do_fcut()
236 if (toys.optflags & FLAG_f) { in cut_main()
239 } else if (toys.optflags & FLAG_c) { in cut_main()
247 if (toys.optflags & FLAG_d) { in cut_main()
254 if(!(toys.optflags & FLAG_d) && (toys.optflags & FLAG_f)) { in cut_main()
260 if (!(toys.optflags & FLAG_f)) { in cut_main()
261 if (toys.optflags & FLAG_s) in cut_main()
269 if (!(toys.optflags & FLAG_d) && (toys.optflags & FLAG_f)) { in cut_main()
Dls.c82 if (toys.optflags & FLAG_q) for (; *s; s++) if (!isprint(*s)) *s = '?';
87 if (toys.optflags & FLAG_q) *s = '?';
101 if ((toys.optflags&(FLAG_F|FLAG_p)) && S_ISDIR(mode)) return '/'; in endtype()
102 if (toys.optflags & FLAG_F) { in endtype()
175 unsigned flags = toys.optflags; in entrylen()
202 int ret = 0, reverse = (toys.optflags & FLAG_r) ? -1 : 1; in compare()
204 if (toys.optflags & FLAG_S) { in compare()
208 if (toys.optflags & FLAG_t) { in compare()
220 int flags = toys.optflags; in filter()
248 if (!(toys.optflags & FLAG_C)) { in next_column()
[all …]
Dln.c40 if (((toys.optflags&FLAG_n) ? lstat : stat)(dest, &buf) in ln_main()
58 if (toys.optflags & FLAG_f) { in ln_main()
67 rc = (toys.optflags & FLAG_s) ? symlink(try, new) : link(try, new); in ln_main()
68 if (toys.optflags & FLAG_f) { in ln_main()
82 (toys.optflags & FLAG_s) ? "symbolic" : "hard", try, new); in ln_main()
84 if (toys.optflags & FLAG_v) fprintf(stderr, "'%s' -> '%s'\n", new, try); in ln_main()
/external/toybox/toys/pending/
Dnetstat.c180 if ( (toys.optflags & FLAG_W) && (toys.optflags & FLAG_p)) in display_data()
182 else if (toys.optflags & FLAG_W) in display_data()
184 else if (toys.optflags & FLAG_p) in display_data()
193 if (toys.optflags & FLAG_l) { in show_data()
195 } else if (toys.optflags & FLAG_a) display_data(rport, label, rxq, txq, lip, rip, state, inode); in show_data()
227 if (!(toys.optflags & FLAG_n)) { in addr2str()
336 if (toys.optflags & FLAG_l) { in show_unix_sockets()
338 } else if (!(toys.optflags & FLAG_a)) { in show_unix_sockets()
365 if (toys.optflags & FLAG_p) xprintf("%-20s", get_pid_name(inode)); in show_unix_sockets()
486 if ((toys.optflags & FLAG_W) && (toys.optflags & FLAG_p)) in show_header()
[all …]
Darping.c91 if (!(toys.optflags & FLAG_q)) { in done()
96 if (toys.optflags & FLAG_D) exit(!!TT.rcvd_nr); in done()
98 if (toys.optflags & FLAG_U) exit(EXIT_SUCCESS); in done()
114 arp_h->ar_op = (toys.optflags & FLAG_A) ? htons(ARPOP_REPLY) in send_packet()
120 (toys.optflags & FLAG_A) ? &src_pk.sll_addr : &dst_pk.sll_addr, in send_packet()
158 if (toys.optflags & FLAG_D) { in recv_from()
163 if (!(toys.optflags & FLAG_q)) { in recv_from()
181 if (toys.optflags & FLAG_f) done(0); in recv_from()
182 if (!(toys.optflags & FLAG_b)) { in recv_from()
197 if (toys.optflags & FLAG_c) { in send_signal()
[all …]
Dfold.c36 if (toys.optflags & FLAG_w) maxlen = TT.width;
37 else if (toys.optflags & FLAG_u) maxlen = 0;
48 if ((toys.optflags & FLAG_u) && buf[pos-1] != '\n'
60 if (toys.optflags & FLAG_b) len++;
65 if (toys.optflags & FLAG_b) len++;
71 if (!(toys.optflags & FLAG_b)) len = (len & ~7) + 7;
80 if (!(toys.optflags & FLAG_s) || split < 0) split = pos;
Duseradd.c49 if (toys.optflags) {
84 if (toys.optflags & FLAG_u) {
88 if (toys.optflags & FLAG_S) TT.uid = CFG_TOYBOX_UID_SYS;
95 if (toys.optflags & FLAG_G) TT.gid = xgetgrnam(TT.u_grp)->gr_gid;
98 if (toys.optflags & FLAG_S) TT.gid = CFG_TOYBOX_UID_SYS;
107 if (!(toys.optflags & FLAG_G)) {
127 if (toys.optflags & FLAG_S)
136 if (!(toys.optflags & (FLAG_S|FLAG_H))) {
152 if (!(toys.optflags & FLAG_D))
155 if (toys.optflags & FLAG_G) {
Dtraceroute.c117 if (toys.optflags & FLAG_U) { in send_probe4()
164 if ((toys.optflags & FLAG_d) && (setsockopt(sock,SOL_SOCKET, SO_DEBUG, in set_flag_dr()
167 if ((toys.optflags & FLAG_r) && (setsockopt(sock, SOL_SOCKET, SO_DONTROUTE, in set_flag_dr()
221 if (probe && (toys.optflags & FLAG_z)) usleep(TT.pause_time * 1000); in do_trace()
270 if (toys.optflags & FLAG_U) { in do_trace()
298 if (!(toys.optflags & FLAG_n)) { in do_trace()
308 if (!(toys.optflags & FLAG_n)) xprintf(")"); in do_trace()
312 if (toys.optflags & FLAG_l) xprintf(" (%d)", rcv_pkt->ip_ttl); in do_trace()
313 if (toys.optflags & FLAG_v) { in do_trace()
413 if (!(toys.optflags & FLAG_n)) { in do_trace()
[all …]
Darp.c164 if (!(toys.optflags & FLAG_D)) get_hw_add(toys.optargs[1], (char*)&req.arp_ha.sa_data); in set_entry()
170 if ((toys.optflags & FLAG_H) && (ifre.ifr_hwaddr.sa_family != ARPHRD_ETHER)) in set_entry()
181 if (toys.optflags & FLAG_v) xprintf("Entry set for %s\n", toys.optargs[0]); in set_entry()
210 if (toys.optflags & FLAG_v) xprintf("Delete entry for %s\n", toys.optargs[0]); in delete_entry()
225 if ((toys.optflags & FLAG_A) || (toys.optflags & FLAG_p)) { in arp_main()
232 if (toys.optflags & FLAG_H) { in arp_main()
238 if (((toys.optflags & FLAG_s) || toys.optflags & FLAG_d)) { in arp_main()
244 if ((toys.optflags & FLAG_s) && !set_entry()) return; in arp_main()
245 if ((toys.optflags & FLAG_d) && !delete_entry()) return; in arp_main()
264 if (((toys.optflags & FLAG_H) && (get_index(hwtype, TT.hw_type) != h_type)) in arp_main()
[all …]
Dhwclock.c66 if (toys.optflags & FLAG_u) TT.utc = 1; in hwclock_main()
77 if (!(toys.optflags&FLAG_t)) { in hwclock_main()
78 int w = toys.optflags & FLAG_w, flag = O_WRONLY*w; in hwclock_main()
101 if (toys.optflags & (FLAG_w|FLAG_t)) in hwclock_main()
105 if (toys.optflags & FLAG_w) { in hwclock_main()
111 } else if (toys.optflags & FLAG_s) { in hwclock_main()
115 } else if (toys.optflags & FLAG_t) { in hwclock_main()
128 if (toys.optflags & (FLAG_t|FLAG_s)) { in hwclock_main()
Ddd.c164 in.buff = out.buff = xmalloc(in.sz + ((toys.optflags & C_BS)? 0: out.sz)); in setup_inout()
188 if (toys.optflags & C_NOERROR) { //warn message and summary in setup_inout()
233 if (toys.optflags & (C_OF | C_SEEK) && !(toys.optflags & C_NOTRUNC)) in do_dd()
236 while (!(toys.optflags & C_COUNT) || (st.in_full + st.in_part) < c_count) { in do_dd()
242 if (toys.optflags & C_SYNC) memset(in.bp, 0, in.sz); in do_dd()
248 if (!(toys.optflags & C_NOERROR)) exit(1); in do_dd()
251 if (!(toys.optflags & C_SYNC)) continue; in do_dd()
260 if (toys.optflags & C_SYNC) in.count += in.sz; in do_dd()
265 if (toys.optflags & C_BS) { in do_dd()
277 if (toys.optflags & C_FSYNC && fsync(out.fd) < 0) in do_dd()
[all …]
/external/toybox/toys/example/
Dskeleton.c73 if (toys.optflags) printf("flags=%x\n", toys.optflags);
74 if (toys.optflags & FLAG_a) printf("Saw a\n");
75 if (toys.optflags & FLAG_b) printf("b=%s\n", TT.s.b_string);
76 if (toys.optflags & FLAG_c) printf("c=%ld\n", TT.s.c_number);
84 if (toys.optflags & FLAG_walrus) printf("Saw --walrus\n");
98 printf("flags=%x\n", toys.optflags); in skeleton_alias_main()
102 if (toys.optflags & FLAG_b) printf("b=%ld", TT.a.b_number); in skeleton_alias_main()
/external/toybox/toys/lsb/
Dumount.c79 if (toys.optflags & FLAG_v) xprintf("%s unmounted\n", dir);
83 if (dev && !(toys.optflags & FLAG_D)) {
88 if (!ioctl(lfd, 0x4C01) && (toys.optflags & FLAG_v))
97 if (toys.optflags & FLAG_r) {
99 if (toys.optflags & FLAG_v) xprintf("%s remounted ro\n", dir);
113 if (!toys.optc && !(toys.optflags & FLAG_a)) in umount_main()
116 if (toys.optflags & FLAG_f) flags |= MNT_FORCE; in umount_main()
117 if (toys.optflags & FLAG_l) flags |= MNT_DETACH; in umount_main()
121 if (!(toys.optflags & FLAG_n) && !access(pm, R_OK)) in umount_main()
125 if (toys.optflags & FLAG_a) { in umount_main()
Dkillall.c42 if (toys.optflags & FLAG_i) {
56 if (!(toys.optflags & FLAG_q)) perror_msg("pid %d", (int)pid);
57 } else if (toys.optflags & FLAG_v)
70 if (toys.optflags & FLAG_l) { in killall_main()
77 if (toys.optflags & FLAG_q) exit(1); in killall_main()
86 if (!(toys.optflags & FLAG_l) && !toys.optc) { in killall_main()
/external/toybox/toys/other/
Dhelp.c36 if (toys.optflags & FLAG_h) in do_help()
42 if (toys.optflags & FLAG_h) xprintf("</blockquote></pre>\n"); in do_help()
52 if (!(toys.optflags & FLAG_a)) { in help_main()
61 if (toys.optflags & FLAG_h) { in help_main()
70 if (toys.optflags & FLAG_h) xprintf("<hr>\n<pre>\n"); in help_main()
72 if (toys.optflags & FLAG_h) xprintf("</pre>\n"); in help_main()
75 if (toys.optflags & FLAG_h) xprintf("</html>"); in help_main()
Dacpi.c65 if ((toys.optflags & FLAG_b) || (!toys.optflags)) { in acpi_callback()
77 } else if (toys.optflags & FLAG_a) { in acpi_callback()
140 if (toys.optflags & FLAG_V) toys.optflags = FLAG_a|FLAG_b|FLAG_c|FLAG_t; in acpi_main()
141 if (!toys.optflags) toys.optflags = FLAG_b; in acpi_main()
142 if (toys.optflags & (FLAG_a|FLAG_b)) in acpi_main()
144 if (toys.optflags & FLAG_t) dirtree_read("/sys/class", temp_callback); in acpi_main()
145 if (toys.optflags & FLAG_c) dirtree_read("/sys/class/thermal", cool_callback); in acpi_main()
Dsysctl.c47 if (!(toys.optflags & FLAG_e)) error_msg("unknown key '%s'", key); in key_error()
80 if (!(toys.optflags & FLAG_n)) xprintf("%s", key); in do_show_keys()
81 if (!(toys.optflags & (FLAG_N|FLAG_n))) xprintf(" = "); in do_show_keys()
83 if (!(toys.optflags & FLAG_N)) xprintf("%s", data); in do_show_keys()
84 if ((toys.optflags & (FLAG_N|FLAG_n)) != (FLAG_N|FLAG_n)) xputc('\n'); in do_show_keys()
99 if ((toys.optflags & FLAG_w) && !value) { in process_key()
108 if (!(value && (!write_key(path, key, value) || (toys.optflags & FLAG_q)))) { in process_key()
120 if (toys.optflags & FLAG_a) dirtree_read("/proc/sys", do_show_keys); in sysctl_main()
123 else if (toys.optflags & FLAG_p) { in sysctl_main()
Dnsenter.c102 return toys.optflags & FLAG_r; in test_r()
122 if (test_r()) toys.optflags |= FLAG_U; in unshare_main()
125 if (toys.optflags & (1<<i)) f |= flags[i]; in unshare_main()
137 if (toys.optflags & (1<<i)) { in unshare_main()
139 if (!(toys.optflags & FLAG_t)) error_exit("need -t or =filename"); in unshare_main()
151 if ((toys.optflags & FLAG_p) && !(toys.optflags & FLAG_F)) { in unshare_main()
Dpmap.c33 *k = (toys.optflags & FLAG_x) ? "" : "K"; in pmap_main()
48 (toys.optflags & FLAG_x) ? "s" : ""); in pmap_main()
54 if ((toys.optflags & (FLAG_q|FLAG_x)) == FLAG_x) in pmap_main()
72 6+!!(toys.optflags & FLAG_x), end, k); in pmap_main()
73 if (toys.optflags & FLAG_x) { in pmap_main()
99 if (!(toys.optflags & FLAG_q)) { in pmap_main()
100 int x = !!(toys.optflags & FLAG_x); in pmap_main()
/external/toybox/toys/android/
Drestorecon.c36 if (toys.optflags & FLAG_D) flags |= SELINUX_ANDROID_RESTORECON_DATADATA; in restorecon_main()
37 if (toys.optflags & FLAG_F) flags |= SELINUX_ANDROID_RESTORECON_FORCE; in restorecon_main()
38 if (toys.optflags & (FLAG_R|FLAG_r)) in restorecon_main()
40 if (toys.optflags & FLAG_n) flags |= SELINUX_ANDROID_RESTORECON_NOCHANGE; in restorecon_main()
41 if (toys.optflags & FLAG_v) flags |= SELINUX_ANDROID_RESTORECON_VERBOSE; in restorecon_main()

123456