Home
last modified time | relevance | path

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

1234567

/external/toybox/toys/posix/
Dgrep.c83 if (name && (toys.optflags&FLAG_H)) printf("%s%c", name, dash);
84 if (!line || (lcount && (toys.optflags&FLAG_n)))
86 if (bcount && (toys.optflags&FLAG_b)) printf("%ld%c", bcount-1, dash);
128 if (toys.optflags & FLAG_F) { in do_grep()
133 if (toys.optflags & FLAG_x) { in do_grep()
134 int i = (toys.optflags & FLAG_i); in do_grep()
142 if (toys.optflags & FLAG_i) s = strnstr(line, seek->arg); in do_grep()
157 if (toys.optflags & FLAG_x) in do_grep()
160 if (!rc && (toys.optflags & FLAG_w)) { in do_grep()
178 if (toys.optflags & FLAG_v) { in do_grep()
[all …]
Dulimit.c69 if (!(toys.optflags&(FLAG_H-1))) toys.optflags |= FLAG_f; in ulimit_main()
70 if ((toys.optflags&(FLAG_a|FLAG_p)) && toys.optc) error_exit("can't set -ap"); in ulimit_main()
73 if (!(toys.optflags&FLAG_P)) TT.pid = getppid(); in ulimit_main()
78 int get = toys.optflags&(FLAG_a|(1<<i)); in ulimit_main()
82 if (toys.optflags&FLAG_a) printf("-%c: ", flags[i]); in ulimit_main()
85 if (toys.optflags&FLAG_H) in ulimit_main()
95 rlim_t rl = (toys.optflags&FLAG_H) ? rr.rlim_max : rr.rlim_cur; in ulimit_main()
102 if (toys.optflags&(1<<i)) break; in ulimit_main()
105 if (toys.optflags&(FLAG_a|FLAG_p)) return; in ulimit_main()
113 if (toys.optflags&FLAG_H) rr.rlim_max = val; in ulimit_main()
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_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 …]
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 …]
Dls.c74 if (toys.optflags&FLAG_q) *buf = '?'; in crunch_qb()
79 if (toys.optflags&FLAG_b) { in crunch_qb()
110 if ((toys.optflags&(FLAG_F|FLAG_p)) && S_ISDIR(mode)) return '/'; in endtype()
111 if (toys.optflags & FLAG_F) { in endtype()
127 if (toys.optflags&FLAG_h) return human_readable(s, value*units, 0); in print_with_h()
136 unsigned flags = toys.optflags; in entrylen()
165 int ret = 0, reverse = (toys.optflags & FLAG_r) ? -1 : 1; in compare()
167 if (toys.optflags & FLAG_S) { in compare()
171 if (toys.optflags & FLAG_t) { in compare()
183 int flags = toys.optflags; in filter()
[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()
65 if ((CFG_CAT_V || CFG_CATV) && (toys.optflags&~FLAG_u)) { in do_cat()
69 if (c > 126 && (toys.optflags & FLAG_v)) { in do_cat()
81 if (toys.optflags & FLAG_e) xputc('$'); in do_cat()
82 } else if (toys.optflags & (c==9 ? FLAG_t : FLAG_v)) { in do_cat()
100 toys.optflags ^= FLAG_v; in catv_main()
Dtouch.c43 if (toys.optflags & (FLAG_t|FLAG_d)) {
53 if (toys.optflags & FLAG_d) {
69 if (toys.optflags&FLAG_t) {
85 if (toys.optflags&FLAG_t)
113 i = toys.optflags & (FLAG_a|FLAG_m);
125 (toys.optflags & FLAG_h)*AT_SYMLINK_NOFOLLOW)) continue;
126 if (toys.optflags & FLAG_c) continue;
129 if (toys.optflags) ss--;
Dpatch.c81 if (toys.optflags & FLAG_x)
108 if (!(toys.optflags & FLAG_dry_run)) in fail_hunk()
137 int matcheof, trailing = 0, reverse = toys.optflags & FLAG_R, backwarn = 0; in apply_one_hunk()
140 lcmp = (toys.optflags & FLAG_l) ? (void *)loosecmp : (void *)strcmp; in apply_one_hunk()
147 if (toys.optflags & FLAG_x) fprintf(stderr, "HUNK:%s\n", plist->data); in apply_one_hunk()
151 if (toys.optflags & FLAG_x) in apply_one_hunk()
175 if (toys.optflags & FLAG_x) fprintf(stderr, "INEOF\n"); in apply_one_hunk()
187 } else if (toys.optflags & FLAG_x) fprintf(stderr, "IN: %s\n", data); in apply_one_hunk()
204 if (toys.optflags & FLAG_x) { in apply_one_hunk()
230 if (toys.optflags & FLAG_x) fprintf(stderr, "MAYBE: %s\n", plist->data); in apply_one_hunk()
[all …]
/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.c70 if (toys.optflags & FLAG_v) fprintf(stderr, "%s\n", toybuf);
81 if (toys.optflags & FLAG_v) fprintf(stderr, s, cmd, arg); in ftp_line()
101 if (!(toys.optflags&(FLAG_v-1))) in ftpget_main()
102 toys.optflags |= (toys.which->name[3]=='g') ? FLAG_g : FLAG_s; in ftpget_main()
119 if (toys.optflags & FLAG_m) { in ftpget_main()
123 } else if (toys.optflags & FLAG_M) ftp_line("MKD", toys.optargs[1], 257); in ftpget_main()
124 else if (toys.optflags & FLAG_d) ftp_line("DELE", toys.optargs[1], 250); in ftpget_main()
125 else if (toys.optflags & FLAG_D) ftp_line("RMD", toys.optargs[1], 250); in ftpget_main()
127 int get = !(toys.optflags&FLAG_s), cnt = toys.optflags&FLAG_c; in ftpget_main()
156 if (toys.optflags&(FLAG_s|FLAG_g)) { in ftpget_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 …]
Dgzip.c103 if (toys.optflags&FLAG_c) { in do_gunzip()
116 O_CREAT|O_WRONLY|((toys.optflags&FLAG_f)?0:O_EXCL), in do_gunzip()
130 if (!(toys.optflags&(FLAG_c|FLAG_k))) unlink(in_name); in do_gunzip()
144 out_name = (toys.optflags&FLAG_c) ? strdup("-") : xmprintf("%s.gz", in_name); in do_gzip()
150 out_fd = open(out_name, O_CREAT|O_WRONLY|((toys.optflags&FLAG_f)?0:O_EXCL), in do_gzip()
167 if (!(toys.optflags&(FLAG_c|FLAG_k))) unlink(in_name); in do_gzip()
173 if (toys.optflags&FLAG_d) do_gunzip(fd, name); in do_gz()
179 int i = (toys.optflags&0x1ff); in gzip_main()
184 if (!*toys.optargs) toys.optflags |= FLAG_c; in gzip_main()
191 toys.optflags |= FLAG_d; in gunzip_main()
[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) 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) {
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 …]
/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_string);
77 if (toys.optflags & FLAG_c) printf("c=%ld\n", TT.s.c_number);
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_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()
Ddmesg.c73 if (toys.optflags&FLAG_r) { in format_message()
79 if (!(toys.optflags&FLAG_t)) { in format_message()
81 if (toys.optflags&FLAG_T) { in format_message()
119 if (toys.optflags & (FLAG_C|FLAG_n)) goto no_output; in dmesg_main()
121 if (toys.optflags&FLAG_T) { in dmesg_main()
128 if (!(toys.optflags&FLAG_S)) { in dmesg_main()
135 fd = open("/dev/kmsg", O_RDONLY|(O_NONBLOCK*!(toys.optflags&FLAG_w))); in dmesg_main()
162 data[size = xklogctl(3+(toys.optflags&FLAG_c), data, size)] = 0; in dmesg_main()
178 if (toys.optflags & FLAG_n) xklogctl(8, 0, TT.level); in dmesg_main()
181 if (toys.optflags & (FLAG_C|FLAG_c)) xklogctl(5, 0, 0); in dmesg_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()
77 if (toys.optflags & FLAG_h) xprintf("</pre>\n"); in help_main()
80 if (toys.optflags & FLAG_h) xprintf("</html>"); in help_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()
Dnsenter.c104 return toys.optflags & FLAG_r; in test_r()
109 return toys.optflags & FLAG_f; in test_f()
129 if (test_r()) toys.optflags |= FLAG_U; in unshare_main()
132 if (toys.optflags & (1<<i)) f |= flags[i]; in unshare_main()
149 if (toys.optflags & (1<<i)) { in unshare_main()
151 if (!(toys.optflags & FLAG_t)) error_exit("need -t or =filename"); in unshare_main()
162 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.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()
107 if (toys.optflags & FLAG_w) { in hwclock_main()
113 } else if (toys.optflags & FLAG_s) { in hwclock_main()
117 } else if (toys.optflags & FLAG_t) { in hwclock_main()
130 if (toys.optflags & (FLAG_t|FLAG_s)) { in hwclock_main()

1234567