Home
last modified time | relevance | path

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

12345

/external/libconfig/contrib/ls-config/src/
Dls-config.c93 int set_config_int(config_setting_t *setting, char *dataString, struct flags optflags) { in set_config_int() argument
102 if(optflags.quiet == 0) printf(gettext("ERROR! Incorrect data format.\n")); in set_config_int()
110 if(optflags.quiet == 0) printf(gettext("ERROR! Variable set failed.\n")); in set_config_int()
117 int set_config_int64(config_setting_t *setting, char *dataString, struct flags optflags) { in set_config_int64() argument
126 if(optflags.quiet == 0) printf(gettext("ERROR! Incorrect data format.\n")); in set_config_int64()
133 if(optflags.quiet == 0) printf(gettext("ERROR! Variable set failed.\n")); in set_config_int64()
140 int set_config_float(config_setting_t *setting, char *dataString, struct flags optflags) { in set_config_float() argument
149 if(optflags.quiet == 0) printf(gettext("ERROR! Incorrect data format.\n")); in set_config_float()
156 if(optflags.quiet == 0) printf(gettext("ERROR! Variable set failed.\n")); in set_config_float()
163 int set_config_bool(config_setting_t *setting, char *dataString, struct flags optflags) { in set_config_bool() argument
[all …]
/external/toybox/toys/net/
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 …]
/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()
174 if (toys.optflags & FLAG_f) done(0); in recv_from()
175 if (!(toys.optflags & FLAG_b)) { in recv_from()
190 if (toys.optflags & FLAG_c) { in send_signal()
[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;
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 & FLAG_n)) { in do_trace()
[all …]
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 & FLAG_p) && (strlen(TT.unix_socket) > 108)) in syslogd_main()
416 TT.config_file = (toys.optflags & FLAG_f) ? in syslogd_main()
[all …]
Dfsck.c205 if(toys.optflags & FLAG_C) args[i++] = xmprintf("%s %d","-C", TT.fd_num); in do_fsck()
213 if ((toys.optflags & FLAG_V) || (toys.optflags & FLAG_N)) { in do_fsck()
220 if (toys.optflags & FLAG_N) { in do_fsck()
306 if (toys.optflags & FLAG_V) xprintf("Checking all filesystem\n"); in scan_all()
313 if (!(toys.optflags & FLAG_P)) { in scan_all()
316 if ((toys.optflags & FLAG_R) || to_be_ignored(finfo)) { in scan_all()
330 if (toys.optflags & FLAG_R) { // with -PR we choose to skip root. in scan_all()
346 if ((toys.optflags & FLAG_s) || (TT.nr_run in scan_all()
378 if (toys.optflags & FLAG_t) fix_tlist(); in fsck_main()
384 if (!(toys.optflags & FLAG_T)) xprintf("fsck ----- (Toybox)\n"); in fsck_main()
[all …]
Ddhcp.c533 char *script = (toys.optflags & FLAG_s) ? TT.script in run_script()
910 if (!(toys.optflags & FLAG_o)) { in dhcpc_addreqoptions()
917 if (toys.optflags & FLAG_O) { in dhcpc_addreqoptions()
1005 if (!(toys.optflags & FLAG_C)) pend = dhcpc_addclientid(pend); in dhcpc_sendmsg()
1010 if (toys.optflags & FLAG_r) { in dhcpc_sendmsg()
1015 vendor = (toys.optflags & FLAG_V) ? TT.vendor_cls : "toybox\0"; in dhcpc_sendmsg()
1017 …if (toys.optflags & FLAG_H) pend = dhcpc_addstropt(pend, DHCP_OPTION_HOST_NAME, TT.hostname, strle… in dhcpc_sendmsg()
1018 if (toys.optflags & FLAG_F) pend = dhcpc_addfdnname(pend, TT.fdn_name); in dhcpc_sendmsg()
1019 if (!(toys.optflags & FLAG_o) || (toys.optflags & FLAG_O)) in dhcpc_sendmsg()
1021 if (toys.optflags & FLAG_x) pend = set_xopt(pend); in dhcpc_sendmsg()
[all …]
Ddhcp6.c142 if (toys.optflags & FLAG_S) infomode |= LOG_SYSTEM; in logit()
143 if(toys.optflags & FLAG_v) infomode |= LOG_CONSOLE; in logit()
436 char *script = (toys.optflags & FLAG_s) ? TT.script in run_script()
472 if (toys.optflags & FLAG_n) { in lease_fail()
477 if (toys.optflags & FLAG_b) { in lease_fail()
480 if (toys.optflags & FLAG_p) write_pid(TT.pidfile); in lease_fail()
481 toys.optflags &= ~FLAG_b; in lease_fail()
482 toys.optflags |= FLAG_f; in lease_fail()
517 if ((toys.optflags & FLAG_R) && TT.state == DHCP6CONFIRM) in signal_handler()
546 if (toys.optflags & FLAG_v) dbg = logit; in dhcp6_main()
[all …]
/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()
/external/toybox/toys/other/
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()
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()
Dchrt.c60 if (toys.optflags&FLAG_m) { in chrt_main()
69 if (toys.optflags==FLAG_p && !*toys.optargs) { in chrt_main()
84 if (!toys.optargs[1] == !(toys.optflags&FLAG_p)) in chrt_main()
88 if (-1==(pol = highest_bit(toys.optflags&0x2f))) pol = SCHED_RR; in chrt_main()
91 if (toys.optflags&FLAG_R) pol |= SCHED_RESET_ON_FORK; in chrt_main()
Dmix.c44 } else if (toys.optflags & FLAG_l) break; in mix_main()
49 if (!(toys.optflags & (FLAG_c|FLAG_l))) return; in mix_main()
52 if (!(toys.optflags & FLAG_l)) { in mix_main()
60 if (!(toys.optflags & FLAG_r)) level = TT.r | (level<<8); in mix_main()
Dflock.c30 if (toys.optflags & FLAG_u) op = LOCK_UN; in flock_main()
31 else op = (toys.optflags & FLAG_s) ? LOCK_SH : LOCK_EX; in flock_main()
33 if (toys.optflags & FLAG_n) op |= LOCK_NB; in flock_main()
Dchcon.c31 if (toys.optflags & FLAG_v) printf("chcon '%s' to %s\n", path, con); in do_chcon()
32 if (-1 == ((toys.optflags & FLAG_h) ? lsetfilecon : setfilecon)(path, con)) in do_chcon()
36 return (toys.optflags & FLAG_R)*DIRTREE_RECURSE; in do_chcon()
/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()
/external/toybox/toys/posix/
Dwc.c45 if (!(!toys.optc && !(toys.optflags & (toys.optflags-1))) && toys.optc!=1)
49 if (toys.optflags&(1<<i)) {
65 if (toys.optflags == FLAG_c) { in do_wc()
116 if (!toys.optflags) toys.optflags = FLAG_l|FLAG_w|FLAG_c; in wc_main()
Duname.c54 if (!toys.optflags) toys.optflags = FLAG_s; in uname_main()
55 for (i=0; i<6; i++) if (toys.optflags & ((1<<i)|FLAG_a)) { in uname_main()
69 toys.optflags = FLAG_m; in arch_main()
Dulimit.c78 if (!(toys.optflags&(FLAG_H-1))) toys.optflags |= FLAG_f; in ulimit_main()
85 int get = toys.optflags&(FLAG_a|(1<<i)); in ulimit_main()
109 if (toys.optflags&(1<<i)) break; in ulimit_main()
Dbasename.c33 if (toys.optflags&FLAG_s) toys.optflags |= FLAG_a;
35 if (!(toys.optflags&FLAG_a)) {
Dpaste.c38 int i, any, dcount, dlen, len, seq = toys.optflags&FLAG_s;
117 if (toys.optflags&FLAG_s) { in do_paste()
126 if (!(toys.optflags&FLAG_d)) TT.d = "\t"; in paste_main()
129 if (!(toys.optflags&FLAG_s)) paste_files(); in paste_main()
Drenice.c24 int which = (toys.optflags & FLAG_g) ? PRIO_PGRP :
25 ((toys.optflags & FLAG_u) ? PRIO_USER : PRIO_PROCESS);
32 if (toys.optflags & FLAG_u) {
/external/toybox/lib/
Dargs.c155 if (toys.optflags & opt->dex[0]) { in gotflag()
158 if (i & toys.optflags & opt->dex[0]) forget_arg(and); in gotflag()
159 toys.optflags &= ~opt->dex[0]; in gotflag()
163 toys.optflags |= opt->dex[1]; in gotflag()
167 if (toys.optflags & gof->excludes) { in gotflag()
169 if (opt == and || !(i & toys.optflags)) continue; in gotflag()
170 if (toys.optflags & and->dex[2]) break; in gotflag()
480 if (gof.nodash_now) toys.optflags |= FLAGS_NODASH; in get_optflags()
486 saveflags = toys.optflags; in get_optflags()
495 toys.optflags = saveflags; in get_optflags()
[all …]

12345