Home
last modified time | relevance | path

Searched refs:optflags (Results 1 - 25 of 141) sorted by relevance

123456

/third_party/toybox/toys/posix/
H A Did.c72 if (toys.optflags&FLAG_n) printf("%s", s); in s_or_u()
93 flags = toys.optflags; in do_id()
105 if (toys.optflags&FLAG_u) s_or_u(pw->pw_name, pw->pw_uid, 1); in do_id()
110 if (!(toys.optflags&(FLAG_G|FLAG_g|FLAG_Z))) { in do_id()
128 if (!(toys.optflags&FLAG_Z)) { in do_id()
135 int show_separator = !(toys.optflags&FLAG_G); in do_id()
137 if (show_separator) xputc((toys.optflags&FLAG_G) ? ' ' : ','); in do_id()
140 else if (toys.optflags&FLAG_G) s_or_u(grp->gr_name, grp->gr_gid, 0); in do_id()
144 if (toys.optflags&FLAG_G) { in do_id()
154 printf(" context=%s"+!!(toys.optflags in do_id()
[all...]
H A Dcut.c97 if (toys.optflags&FLAG_b) s += start; in cut_line()
98 else if (toys.optflags&FLAG_C) { in cut_line()
111 } else if (toys.optflags&FLAG_c) { in cut_line()
140 if (toys.optflags&FLAG_f) { in cut_line()
157 if (toys.optflags&FLAG_D) break; in cut_line()
158 if (toys.optflags&FLAG_s) return; in cut_line()
215 if ((toys.optflags&(FLAG_s|FLAG_f|FLAG_F))==FLAG_s) in cut_main()
217 if ((toys.optflags&(FLAG_d|FLAG_f|FLAG_F))==FLAG_d) in cut_main()
219 if (!TT.d) TT.d = (toys.optflags&FLAG_F) ? "[[:space:]][[:space:]]*" : "\t"; in cut_main()
220 if (toys.optflags in cut_main()
[all...]
H A Dcksum.c54 unsigned crc = (toys.optflags & FLAG_P) ? 0xffffffff : 0; in do_cksum()
59 cksum = (toys.optflags & FLAG_L) ? cksum_le : cksum_be; in do_cksum()
74 if (!(toys.optflags & FLAG_N)) { in do_cksum()
81 printf((toys.optflags & FLAG_H) ? "%08x" : "%u", in do_cksum()
82 (toys.optflags & FLAG_I) ? crc : ~crc); in do_cksum()
83 if (!(toys.optflags&FLAG_N)) printf(" %"PRIu64, llen2); in do_cksum()
90 crc_init(TT.crc_table, toys.optflags & FLAG_L); in cksum_main()
96 toys.optflags |= FLAG_H|FLAG_N|FLAG_P|FLAG_L; in crc32_main()
H A 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()
H A Ddf.c62 if ((toys.optflags & (FLAG_H|FLAG_h))) { in show_header()
63 xprintf((toys.optflags&FLAG_i) ? in show_header()
70 if (toys.optflags & FLAG_i) { in show_header()
79 use_label = toys.optflags & FLAG_P ? "Capacity" : "Use%"; in show_header()
117 if (!(toys.optflags & FLAG_a) && !mt->statvfs.f_blocks) return; in show_mt()
121 if (toys.optflags & FLAG_i) { in show_mt()
148 if (toys.optflags & (FLAG_H|FLAG_h)) { in show_mt()
150 int hr_flags = (toys.optflags & FLAG_H) ? HR_1000 : 0; in show_mt()
151 int w = 4 + !!(toys.optflags & FLAG_i); in show_mt()
176 if (toys.optflags in df_main()
[all...]
H A Dwc.c45 if (!(!toys.optc && !(toys.optflags & (toys.optflags-1))) && toys.optc!=1) in show_lengths()
49 if (toys.optflags&(1<<i)) { in show_lengths()
65 if (toys.optflags == FLAG_c) { in do_wc()
116 if (!toys.optflags) toys.optflags = FLAG_l|FLAG_w|FLAG_c; in wc_main()
/third_party/toybox/toys/net/
H A Dnetstat.c63 if (!(toys.optflags & FLAG_n)) { in addr2str()
148 if (!((toys.optflags & FLAG_l) && (!rport && (state & 0xA))) in show_ip()
149 && !(toys.optflags & FLAG_a) && !(rport & (0x10 | 0x20 | 0x40))) in show_ip()
166 if (!(toys.optflags & FLAG_n) && (pw = bufgetpwuid(uid))) in show_ip()
173 if ((toys.optflags & FLAG_e)) printf(" %-10s %-11ld", toybuf, inode); in show_ip()
174 if ((toys.optflags & FLAG_p)) { in show_ip()
207 if (state==1 && flags && !(toys.optflags&FLAG_a)) continue; in show_unix_sockets()
216 if (toys.optflags & FLAG_p) { in show_unix_sockets()
288 !(toys.optflags&FLAG_e) ? " MSS Window irtt" : "Metric Ref Use"); in display_routes()
304 } else destip = (toys.optflags in display_routes()
[all...]
H A Dftpget.c88 if (toys.optflags & FLAG_v) fprintf(stderr, "%s\n", toybuf); in xread2line()
99 if (toys.optflags & FLAG_v) fprintf(stderr, s, cmd, arg); in ftp_line()
133 if (!(toys.optflags&(FLAG_v-1))) in ftpget_main()
134 toys.optflags |= (toys.which->name[3]=='g') ? FLAG_g : FLAG_s; in ftpget_main()
159 if (toys.optflags & FLAG_m) { in ftpget_main()
161 error_msg("ftpget_main line %d, toys.optflags 0x%x toys.optc %d toybox buf %s\r\n", in ftpget_main()
162 __LINE__, toys.optflags, toys.optc, toybuf); in ftpget_main()
170 } else if (toys.optflags & FLAG_M) ftp_line("MKD", toys.optargs[1], 257); in ftpget_main()
171 else if (toys.optflags & FLAG_d) ftp_line("DELE", toys.optargs[1], 250); in ftpget_main()
172 else if (toys.optflags in ftpget_main()
[all...]
/third_party/toybox/toys/pending/
H A Darping.c85 if (!(toys.optflags & FLAG_q)) { in done()
90 if (toys.optflags & FLAG_D) exit(!!TT.rcvd_nr); in done()
92 if (toys.optflags & FLAG_U) exit(EXIT_SUCCESS); in done()
108 arp_h->ar_op = (toys.optflags & FLAG_A) ? htons(ARPOP_REPLY) in send_packet()
114 (toys.optflags & FLAG_A) ? &src_pk.sll_addr : &dst_pk.sll_addr, in send_packet()
152 if (toys.optflags & FLAG_D) { in recv_from()
157 if (!(toys.optflags & FLAG_q)) { in recv_from()
174 if (toys.optflags & FLAG_f) done(0); in recv_from()
175 if (!(toys.optflags & FLAG_b)) { in recv_from()
190 if (toys.optflags in send_signal()
[all...]
H A 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)) msleep(TT.pause_time); 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 in do_trace()
[all...]
H A Dfold.c36 if (toys.optflags & FLAG_w) maxlen = TT.width; in do_fold()
37 else if (toys.optflags & FLAG_u) maxlen = 0; in do_fold()
48 if ((toys.optflags & FLAG_u) && buf[pos-1] != '\n' in do_fold()
60 if (toys.optflags & FLAG_b) len++; in do_fold()
65 if (toys.optflags & FLAG_b) len++; in do_fold()
71 if (!(toys.optflags & FLAG_b)) len = (len & ~7) + 7; in do_fold()
80 if (!(toys.optflags & FLAG_s) || split < 0) split = pos; in do_fold()
H A Duseradd.c49 if (toys.optflags) help_exit("options with USER GROUP"); in useradd_main()
81 if (toys.optflags & FLAG_u) { in useradd_main()
85 if (toys.optflags & FLAG_S) TT.uid = CFG_TOYBOX_UID_SYS; in useradd_main()
92 if (toys.optflags & FLAG_G) TT.gid = xgetgrnam(TT.u_grp)->gr_gid; in useradd_main()
95 if (toys.optflags & FLAG_S) TT.gid = CFG_TOYBOX_UID_SYS; in useradd_main()
104 if (!(toys.optflags & FLAG_G)) { in useradd_main()
125 if (toys.optflags & FLAG_S) in useradd_main()
134 if (!(toys.optflags & (FLAG_S|FLAG_H))) { in useradd_main()
150 if (!(toys.optflags & FLAG_D)) in useradd_main()
153 if (toys.optflags in useradd_main()
[all...]
H A Dsyslogd.c164 if (toys.optflags & FLAG_K) { in parse_config_file()
176 if (toys.optflags & FLAG_R) { in parse_config_file()
180 if (!(toys.optflags & FLAG_L)) return 0; in parse_config_file()
186 if (!(fp = fopen(TT.config_file, "r")) && (toys.optflags & FLAG_f)) in parse_config_file()
227 file->filename = xstrdup((toys.optflags & FLAG_O) ? in parse_config_file()
285 if ((toys.optflags & FLAG_s) || (toys.optflags & FLAG_b)) { in write_rotate()
345 if (toys.optflags & FLAG_K) len = sprintf(toybuf, "<%d> %s", pri, msg); in logmsg()
354 if (toys.optflags & FLAG_S) len = sprintf(toybuf, "%s %s", ts, msg); in logmsg()
413 if ((toys.optflags in syslogd_main()
[all...]
/third_party/toybox/porting/liteos_a/toys/posix/
H A Ddu.c49 if (toys.optflags & FLAG_h) { in print()
55 if (toys.optflags & FLAG_K) bits = 9; in print()
56 else if (toys.optflags & FLAG_m) bits = 20; in print()
103 if ((toys.optflags & FLAG_x) && (TT.st_dev != node->st.st_dev)) in do_du()
107 if (toys.optflags & FLAG_L) { in do_du()
116 if (!(toys.optflags & FLAG_l) && !node->again) in do_du()
123 return DIRTREE_COMEAGAIN|(DIRTREE_SYMFOLLOW*!!(toys.optflags&FLAG_L)); in do_du()
130 if ((toys.optflags & FLAG_a) || !node->parent in do_du()
131 || (S_ISDIR(node->st.st_mode) && !(toys.optflags & FLAG_s))) { in do_du()
148 dirtree_flagread(*args, DIRTREE_SYMFOLLOW*!!(toys.optflags in du_main()
[all...]
/third_party/toybox/porting/liteos_a/toys/lsb/
H A Dumount.c48 if (toys.optflags & FLAG_v) xprintf("%s unmounted\n", dir); in do_umount()
52 if (dev && !(toys.optflags & FLAG_D)) { in do_umount()
57 if (!ioctl(lfd, 0x4C01) && (toys.optflags & FLAG_v)) in do_umount()
66 if (toys.optflags & FLAG_r) { in do_umount()
68 if (toys.optflags & FLAG_v) xprintf("%s remounted ro\n", dir); in do_umount()
82 if (!toys.optc && !(toys.optflags & FLAG_a)) in umount_main()
85 if (toys.optflags & FLAG_f) flags |= MNT_FORCE; in umount_main()
86 if (toys.optflags & FLAG_l) flags |= MNT_DETACH; in umount_main()
90 if (!(toys.optflags & FLAG_n) && !access(pm, R_OK)) in umount_main()
94 if (toys.optflags in umount_main()
[all...]
/third_party/toybox/toys/lsb/
H A Dumount.c79 if (toys.optflags & FLAG_v) xprintf("%s unmounted\n", dir); in do_umount()
83 if (dev && !(toys.optflags & FLAG_D)) { in do_umount()
88 if (!ioctl(lfd, 0x4C01) && (toys.optflags & FLAG_v)) in do_umount()
97 if (toys.optflags & FLAG_r) { in do_umount()
99 if (toys.optflags & FLAG_v) xprintf("%s remounted ro\n", dir); in do_umount()
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 in umount_main()
[all...]
/third_party/toybox/toys/other/
H A Dacpi.c62 if ((toys.optflags & FLAG_b) || (!toys.optflags)) { in acpi_callback()
74 } else if (toys.optflags & FLAG_a) { in acpi_callback()
137 if (toys.optflags & FLAG_V) toys.optflags = FLAG_a|FLAG_b|FLAG_c|FLAG_t; in acpi_main()
138 if (!toys.optflags) toys.optflags = FLAG_b; in acpi_main()
139 if (toys.optflags & (FLAG_a|FLAG_b)) in acpi_main()
141 if (toys.optflags & FLAG_t) dirtree_read("/sys/class", temp_callback); in acpi_main()
142 if (toys.optflags in acpi_main()
[all...]
H A Dxxd.c47 if (toys.optflags&FLAG_s) { in do_xxd()
55 if (!(toys.optflags&FLAG_p)) printf("%08llx: ", TT.o + pos); in do_xxd()
67 if (!(toys.optflags&FLAG_p)) { in do_xxd()
111 if (toys.optflags&FLAG_i) { in do_xxd_reverse()
122 if (!(toys.optflags&FLAG_p)) { in do_xxd_reverse()
136 while (toys.optflags&FLAG_p || col < TT.c) { in do_xxd_reverse()
168 if (TT.c == 0) TT.c = (toys.optflags&FLAG_i)?12:16; in xxd_main()
171 if (toys.optflags&FLAG_p) TT.c = TT.g = 30; in xxd_main()
174 toys.optflags&FLAG_r ? do_xxd_reverse in xxd_main()
175 : (toys.optflags in xxd_main()
[all...]
H A 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()
77 if (toys.optflags & FLAG_h) xprintf("</pre>\n"); in help_main()
80 if (toys.optflags & FLAG_h) xprintf("</html>"); in help_main()
H A 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()
H A Dhwclock.c68 if (toys.optflags & FLAG_u) TT.utc = 1; in hwclock_main()
79 if (!(toys.optflags&FLAG_t)) { in hwclock_main()
80 int w = toys.optflags & FLAG_w, flag = O_WRONLY*w; in hwclock_main()
103 if (toys.optflags & (FLAG_w|FLAG_t)) { in hwclock_main()
109 if (toys.optflags & FLAG_w) { in hwclock_main()
115 } else if (toys.optflags & FLAG_s) { in hwclock_main()
119 } else if (toys.optflags & FLAG_t) { in hwclock_main()
132 if (toys.optflags & (FLAG_t|FLAG_s)) { in hwclock_main()
H A Dnsenter.c106 return toys.optflags & FLAG_r; in test_r()
111 return toys.optflags & FLAG_f; in test_f()
131 if (test_r()) toys.optflags |= FLAG_U; in unshare_main()
134 if (toys.optflags & (1<<i)) f |= flags[i]; in unshare_main()
151 if (toys.optflags & (1<<i)) { in unshare_main()
153 if (!(toys.optflags & FLAG_t)) error_exit("need -t or =filename"); in unshare_main()
164 if ((toys.optflags & FLAG_p) && !(toys.optflags & FLAG_F)) { in unshare_main()
H A 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()
/third_party/toybox/toys/android/
H A 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()
/third_party/toybox/porting/liteos_a/toys/net/
H A Dping.c57 if (!(toys.optflags&FLAG_q) && TT.sent && TT.sa) { in summary()
103 if (!(toys.optflags&FLAG_i)) TT.i = (toys.optflags&FLAG_f) ? 200 : 1000; in ping_main()
105 if (!(toys.optflags&FLAG_s)) TT.s = 56; // 64-PHDR_LEN in ping_main()
106 if ((toys.optflags&(FLAG_f|FLAG_c)) == FLAG_f) TT.c = 15; in ping_main()
116 if (!(toys.optflags&FLAG_6) && inet_pton(AF_INET, TT.I, in ping_main()
119 else if (!(toys.optflags&FLAG_4) && inet_pton(AF_INET6, TT.I, in ping_main()
165 if (toys.optflags&FLAG_m) { in ping_main()
179 if (!(toys.optflags&FLAG_q)) { in ping_main()
224 if ((toys.optflags in ping_main()
[all...]

Completed in 9 milliseconds

123456