Home
last modified time | relevance | path

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

1234567

/external/toybox/toys/net/
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&FLAG_n) ? "0.0.0.0" : "default"; in display_routes()
[all …]
Dftpget.c68 if (toys.optflags & FLAG_v) fprintf(stderr, "%s\n", toybuf); in xread2line()
79 if (toys.optflags & FLAG_v) fprintf(stderr, s, cmd, arg); in ftp_line()
99 if (!(toys.optflags&(FLAG_v-1))) in ftpget_main()
100 toys.optflags |= (toys.which->name[3]=='g') ? FLAG_g : FLAG_s; in ftpget_main()
118 if (toys.optflags & FLAG_m) { in ftpget_main()
122 } else if (toys.optflags & FLAG_M) ftp_line("MKD", toys.optargs[1], 257); in ftpget_main()
123 else if (toys.optflags & FLAG_d) ftp_line("DELE", toys.optargs[1], 250); in ftpget_main()
124 else if (toys.optflags & FLAG_D) ftp_line("RMD", toys.optargs[1], 250); in ftpget_main()
126 int get = !(toys.optflags&FLAG_s), cnt = toys.optflags&FLAG_c; in ftpget_main()
155 if (toys.optflags&(FLAG_s|FLAG_g)) { in ftpget_main()
[all …]
Dnetcat.c87 if ((toys.optflags&FLAG_f) ? toys.optc : in netcat_main()
88 (!(toys.optflags&(FLAG_l|FLAG_L)) && toys.optc!=2)) in netcat_main()
91 if (toys.optflags&FLAG_4) family = AF_INET; in netcat_main()
92 else if (toys.optflags&FLAG_6) family = AF_INET6; in netcat_main()
94 if (toys.optflags&FLAG_u) type = SOCK_DGRAM; in netcat_main()
99 if (!(toys.optflags&(FLAG_L|FLAG_l))) { in netcat_main()
155 if (toys.optflags&FLAG_L) NOEXIT(child = XVFORK()); in netcat_main()
162 if (toys.optflags&FLAG_L) dup2(in1, 2); in netcat_main()
169 } while (!(toys.optflags&FLAG_l)); in netcat_main()
/external/toybox/toys/posix/
Did.c72 if (toys.optflags&FLAG_n) printf("%s", s);
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&FLAG_Z), context); in do_id()
[all …]
Dls.c72 if (toys.optflags&FLAG_q) *buf = '?'; in crunch_qb()
77 if (toys.optflags&FLAG_b) { in crunch_qb()
108 if ((toys.optflags&(FLAG_F|FLAG_p)) && S_ISDIR(mode)) return '/'; in endtype()
109 if (toys.optflags & FLAG_F) { in endtype()
125 if (toys.optflags&FLAG_h) return human_readable(s, value*units, 0); in print_with_h()
134 unsigned flags = toys.optflags; in entrylen()
163 int ret = 0, reverse = (toys.optflags & FLAG_r) ? -1 : 1; in compare()
165 if (toys.optflags & FLAG_S) { in compare()
169 if (toys.optflags & FLAG_t) { in compare()
183 int flags = toys.optflags; in filter()
[all …]
Ddu.c59 if (toys.optflags & FLAG_h) { in print()
65 if (toys.optflags & FLAG_K) bits = 9; in print()
66 else if (toys.optflags & FLAG_m) bits = 20; in print()
115 if ((toys.optflags & FLAG_x) && (TT.st_dev != node->st.st_dev)) in do_du()
119 if (toys.optflags & FLAG_L) { in do_du()
128 if (!(toys.optflags & FLAG_l) && !node->again) in do_du()
135 return DIRTREE_COMEAGAIN|(DIRTREE_SYMFOLLOW*!!(toys.optflags&FLAG_L)); in do_du()
147 if ((toys.optflags & FLAG_a) || !node->parent in do_du()
148 || (S_ISDIR(node->st.st_mode) && !(toys.optflags & FLAG_s))) in do_du()
163 dirtree_flagread(*args, DIRTREE_SYMFOLLOW*!!(toys.optflags&(FLAG_H|FLAG_L)), in du_main()
[all …]
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()
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&FLAG_F) xregcomp(&TT.reg, TT.d, REG_EXTENDED); in cut_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()
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 & (FLAG_H|FLAG_h)) { in df_main()
[all …]
/external/toybox/toys/pending/
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()
175 if (toys.optflags & FLAG_f) done(0); in recv_from()
176 if (!(toys.optflags & FLAG_b)) { in recv_from()
191 if (toys.optflags & FLAG_c) { in send_signal()
[all …]
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 …]
Duseradd.c49 if (toys.optflags) help_exit("options with USER GROUP");
81 if (toys.optflags & FLAG_u) {
85 if (toys.optflags & FLAG_S) TT.uid = CFG_TOYBOX_UID_SYS;
92 if (toys.optflags & FLAG_G) TT.gid = xgetgrnam(TT.u_grp)->gr_gid;
95 if (toys.optflags & FLAG_S) TT.gid = CFG_TOYBOX_UID_SYS;
104 if (!(toys.optflags & FLAG_G)) {
125 if (toys.optflags & FLAG_S)
134 if (!(toys.optflags & (FLAG_S|FLAG_H))) {
150 if (!(toys.optflags & FLAG_D))
153 if (toys.optflags & FLAG_G) {
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;
Darp.c145 if (!(toys.optflags & FLAG_D)) { in set_entry()
165 if ((toys.optflags & FLAG_H) && (ifre.ifr_hwaddr.sa_family != ARPHRD_ETHER)) in set_entry()
176 if (toys.optflags & FLAG_v) xprintf("Entry set for %s\n", toys.optargs[0]); in set_entry()
205 if (toys.optflags & FLAG_v) xprintf("Delete entry for %s\n", toys.optargs[0]); in delete_entry()
220 if ((toys.optflags & FLAG_A) || (toys.optflags & FLAG_p)) { in arp_main()
227 if (toys.optflags & FLAG_H) { in arp_main()
233 if (((toys.optflags & FLAG_s) || toys.optflags & FLAG_d)) { in arp_main()
239 if ((toys.optflags & FLAG_s) && !set_entry()) return; in arp_main()
240 if ((toys.optflags & FLAG_d) && !delete_entry()) return; in arp_main()
259 if (((toys.optflags & FLAG_H) && (get_index(hwtype, TT.hw_type) != h_type)) in arp_main()
[all …]
Dgzip.c120 if (!in_fd || (toys.optflags&FLAG_c)) out_fd = 1; in do_gzip()
122 if (!(toys.optflags&FLAG_f)) in do_gzip()
131 if (!(toys.optflags&FLAG_d)) out_name = xmprintf("%s%s", arg, ".gz"); in do_gzip()
141 O_CREAT|O_WRONLY|WARN_ONLY|(O_EXCL*!(toys.optflags&FLAG_f)), sb.st_mode); in do_gzip()
145 if (do_deflate(in_fd, out_fd, toys.optflags&FLAG_d, TT.level) && out_name) in do_gzip()
153 if (!(toys.optflags&FLAG_k)) if (unlink(arg)) perror_msg("unlink %s", arg); in do_gzip()
162 if ((toys.optflags>>TT.level)&1) break; in gzip_main()
170 toys.optflags |= FLAG_d; in gunzip_main()
176 toys.optflags |= (FLAG_c|FLAG_d); in zcat_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()
Ddmesg.c72 if (toys.optflags&FLAG_r) { in format_message()
78 if (!(toys.optflags&FLAG_t)) { in format_message()
80 if (toys.optflags&FLAG_T) { in format_message()
118 if (toys.optflags & (FLAG_C|FLAG_n)) goto no_output; in dmesg_main()
120 if (toys.optflags&FLAG_T) { in dmesg_main()
127 if (!(toys.optflags&FLAG_S)) { in dmesg_main()
134 fd = open("/dev/kmsg", O_RDONLY|(O_NONBLOCK*!(toys.optflags&FLAG_w))); in dmesg_main()
161 data[size = xklogctl(3+(toys.optflags&FLAG_c), data, size)] = 0; in dmesg_main()
177 if (toys.optflags & FLAG_n) xklogctl(8, 0, TT.n); in dmesg_main()
180 if (toys.optflags & (FLAG_C|FLAG_c)) xklogctl(5, 0, 0); in dmesg_main()
/external/toybox/toys/example/
Dskeleton.c74 if (toys.optflags) printf("flags=%llx\n", toys.optflags);
75 if (toys.optflags & FLAG_a) printf("Saw a\n");
76 if (toys.optflags & FLAG_b) printf("b=%s\n", TT.s.b);
77 if (toys.optflags & FLAG_c) printf("c=%ld\n", TT.s.c);
85 if (toys.optflags & FLAG_walrus) printf("Saw --walrus\n");
99 printf("flags=%llx\n", toys.optflags); in skeleton_alias_main()
103 if (toys.optflags & FLAG_b) printf("b=%ld", TT.a.b); in skeleton_alias_main()
/external/toybox/toys/other/
Dxxd.c47 if (toys.optflags&FLAG_s) {
55 if (!(toys.optflags&FLAG_p)) printf("%08llx: ", TT.o + pos);
67 if (!(toys.optflags&FLAG_p)) {
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&FLAG_i ? do_xxd_include : do_xxd)); in xxd_main()
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 & FLAG_c) dirtree_read("/sys/class/thermal", cool_callback); in acpi_main()
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()
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()
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()
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()

1234567