Home
last modified time | relevance | path

Searched refs:res (Results 1 – 25 of 51) sorted by relevance

123

/system/netd/
DFirewallController.cpp42 int res = 0; in enableFirewall() local
48 res |= execIptables(V4V6, "-A", LOCAL_INPUT, "-j", "DROP", NULL); in enableFirewall()
49 res |= execIptables(V4V6, "-A", LOCAL_OUTPUT, "-j", "REJECT", NULL); in enableFirewall()
50 res |= execIptables(V4V6, "-A", LOCAL_FORWARD, "-j", "REJECT", NULL); in enableFirewall()
52 return res; in enableFirewall()
56 int res = 0; in disableFirewall() local
59 res |= execIptables(V4V6, "-F", LOCAL_INPUT, NULL); in disableFirewall()
60 res |= execIptables(V4V6, "-F", LOCAL_OUTPUT, NULL); in disableFirewall()
61 res |= execIptables(V4V6, "-F", LOCAL_FORWARD, NULL); in disableFirewall()
63 return res; in disableFirewall()
[all …]
DIdletimerController.cpp126 int res; in runIpxtablesCmd() local
128 res = android_fork_execvp(argc, (char **)argv, NULL, false, false); in runIpxtablesCmd()
129 ALOGV("runCmd() res=%d", res); in runIpxtablesCmd()
130 return res; in runIpxtablesCmd()
138 int res; in setDefaults() local
146 res = runIpxtablesCmd(ARRAY_SIZE(cmd1), cmd1); in setDefaults()
148 if (res) in setDefaults()
149 return res; in setDefaults()
158 res = runIpxtablesCmd(ARRAY_SIZE(cmd2), cmd2); in setDefaults()
160 return res; in setDefaults()
[all …]
DBandwidthController.cpp155 int res = 0; in runIpxtablesCmd() local
158 res |= runIptablesCmd(cmd, jumpHandling, IptIpV4, failureHandling); in runIpxtablesCmd()
159 res |= runIptablesCmd(cmd, jumpHandling, IptIpV6, failureHandling); in runIpxtablesCmd()
160 return res; in runIpxtablesCmd()
177 int res; in runIptablesCmd() local
216 res = android_fork_execvp(argc, (char **)argv, &status, false, in runIptablesCmd()
218 res = res || !WIFEXITED(status) || WEXITSTATUS(status); in runIptablesCmd()
219 if (res && failureHandling == IptFailShow) { in runIptablesCmd()
220 ALOGE("runIptablesCmd(): res=%d status=%d failed %s", res, status, in runIptablesCmd()
223 return res; in runIptablesCmd()
[all …]
DNetdConstants.cpp36 static void logExecError(const char* argv[], int res, int status) { in logExecError() argument
44 ALOGE("exec() res=%d, status=%d for %s", res, status, args.c_str()); in logExecError()
48 int res; in execIptablesCommand() local
51 res = android_fork_execvp(argc, (char **)argv, &status, false, in execIptablesCommand()
53 if (res || !WIFEXITED(status) || WEXITSTATUS(status)) { in execIptablesCommand()
55 logExecError(argv, res, status); in execIptablesCommand()
57 if (res) in execIptablesCommand()
58 return res; in execIptablesCommand()
82 int res = 0; in execIptables() local
85 res |= execIptablesCommand(argsList.size(), argv, silent); in execIptables()
[all …]
Dndc.c80 int res = errno; in do_cmd() local
82 return res; in do_cmd()
97 int res = errno; in do_cmd() local
100 return res; in do_cmd()
107 int res = errno; in do_cmd() local
110 return res; in do_cmd()
135 int res = errno; in do_monitor() local
138 return res; in do_monitor()
146 int res = errno; in do_monitor() local
154 return res; in do_monitor()
Doem_iptables_hook.cpp31 int res; in runIptablesCmd() local
33 res = android_fork_execvp(argc, (char **)argv, NULL, false, false); in runIptablesCmd()
34 return res; in runIptablesCmd()
DNatController.cpp56 int res; in runCmd() local
58 res = android_fork_execvp(argc, (char **)argv, NULL, false, false); in runCmd()
73 ALOGV("runCmd(%s) res=%d", full_cmd.c_str(), res); in runCmd()
75 return res; in runCmd()
79 int res; in setupIptablesHooks() local
80 res = setDefaults(); in setupIptablesHooks()
81 if (res < 0) { in setupIptablesHooks()
82 return res; in setupIptablesHooks()
/system/core/libcutils/
Dqtaguid.c61 int fd, res, savedErrno; in write_ctrl() local
70 res = TEMP_FAILURE_RETRY(write(fd, cmd, strlen(cmd))); in write_ctrl()
71 if (res < 0) { in write_ctrl()
76 if (res < 0) { in write_ctrl()
77 ALOGI("Failed write_ctrl(%s) res=%d errno=%d", cmd, res, savedErrno); in write_ctrl()
85 int res; in write_param() local
91 res = TEMP_FAILURE_RETRY(write(param_fd, value, strlen(value))); in write_param()
92 if (res < 0) { in write_param()
101 int res; in qtaguid_tagSocket() local
110 res = write_ctrl(lineBuf); in qtaguid_tagSocket()
[all …]
Dfs.c154 int res = 0; in fs_mkdirs() local
161 res = -EINVAL; in fs_mkdirs()
167 res = -errno; in fs_mkdirs()
179 res = -EINVAL; in fs_mkdirs()
191 res = -errno; in fs_mkdirs()
197 res = -errno; in fs_mkdirs()
203 res = -ELOOP; in fs_mkdirs()
208 res = -ENOTDIR; in fs_mkdirs()
217 res = -errno; in fs_mkdirs()
234 return res; in fs_mkdirs()
/system/core/toolbox/
Dsetconsole.c15 int res; in activate_thread() local
19 res = ioctl(fd, VT_ACTIVATE, (void*)activate_thread_switch_vc); in activate_thread()
20 } while(res < 0 && errno == EINTR); in activate_thread()
21 if (res < 0) { in activate_thread()
22 …fprintf(stderr, "ioctl( vcfd, VT_ACTIVATE, vtnum) failed, %d %d %s for %d\n", res, errno, strerror… in activate_thread()
35 int res; in setconsole_main() local
113 res = ioctl(fd, VT_GETSTATE, &vs); in setconsole_main()
114 if (res < 0) { in setconsole_main()
115 fprintf(stderr, "ioctl(vcfd, VT_GETSTATE, &vs) failed, %d\n", res); in setconsole_main()
122 res = ioctl(fd, VT_OPENQRY, &vtnum); in setconsole_main()
[all …]
Dalarm.c14 int res; in alarm_main() local
75 res = ioctl(fd, RTC_ALM_READ, &tm); in alarm_main()
76 if(res < 0) { in alarm_main()
95 res = ioctl(fd, RTC_RD_TIME, &tm); in alarm_main()
96 if(res < 0) { in alarm_main()
114 res = ioctl(afd, ANDROID_ALARM_GET_TIME(alarmtype), &ts); in alarm_main()
115 if(res < 0) { in alarm_main()
126 res = ioctl(afd, ANDROID_ALARM_SET(alarmtype), &ts); in alarm_main()
127 if(res < 0) { in alarm_main()
133 res = ioctl(fd, RTC_ALM_SET, &tm); in alarm_main()
[all …]
Dhd.c15 int res; in hd_main() local
70 res = read(fd, &buf, read_len); in hd_main()
71 if(res == 0) in hd_main()
73 for(i = 0; i < res; i++) { in hd_main()
80 if(((i & 15) == 15) || (i == res - 1)) { in hd_main()
85 if(res < 0) { in hd_main()
89 filepos += res; in hd_main()
Dnotify.c15 int res; in notify_main() local
69 res = inotify_add_watch(nfd, file_names[i], event_mask); in notify_main()
70 if(res < 0) { in notify_main()
75 id_offset = -res; in notify_main()
76 if(res + id_offset != i) { in notify_main()
77 fprintf(stderr, "%s got unexpected id %d instead of %d\n", file_names[i], res, i); in notify_main()
86 res = read(nfd, event_buf, sizeof(event_buf)); in notify_main()
87 if(res < (int)sizeof(*event)) { in notify_main()
94 while(res >= (int)sizeof(*event)) { in notify_main()
139 res -= event_size; in notify_main()
Dcmp.c15 int res, res1, res2; in cmp_main() local
65 res = res1 < res2 ? res1 : res2; in cmp_main()
69 for(i = 0; i < res; i++) { in cmp_main()
85 if(res1 != res2 || res < 0) { in cmp_main()
86 … printf("%s on %s\n", res < 0 ? "Read error" : "EOF", res1 < res2 ? argv[optind] : argv[optind+1]); in cmp_main()
89 filepos += res; in cmp_main()
Dgetevent.c47 int res; in print_input_props() local
52 res = ioctl(fd, EVIOCGPROP(sizeof(bits)), bits); in print_input_props()
53 if(res < 0) { in print_input_props()
58 for(i = 0; i < res; i++) { in print_input_props()
81 int res, res2; in print_possible_events() local
89 res = ioctl(fd, EVIOCGBIT(i, bits_size), bits); in print_possible_events()
90 if(res < bits_size) in print_possible_events()
92 bits_size = res + 16; in print_possible_events()
102 res2 = ioctl(fd, EVIOCGKEY(res), bits + bits_size); in print_possible_events()
119 res2 = ioctl(fd, EVIOCGLED(res), bits + bits_size); in print_possible_events()
[all …]
Drotatefb.c19 int res; in rotatefb_main() local
49 res = ioctl(fd, FBIOGET_VSCREENINFO, &fbinfo); in rotatefb_main()
50 if(res < 0) { in rotatefb_main()
64 res = ioctl(fd, FBIOPUT_VSCREENINFO, &fbinfo); in rotatefb_main()
65 if(res < 0) { in rotatefb_main()
Dioctl.c17 int res; in ioctl_main() local
109 res = ioctl(fd, ioctl_nr, *(uint32_t*)ioctl_args); in ioctl_main()
111 res = ioctl(fd, ioctl_nr, ioctl_args); in ioctl_main()
113 res = ioctl(fd, ioctl_nr, 0); in ioctl_main()
114 if (res < 0) { in ioctl_main()
115 fprintf(stderr, "ioctl 0x%x failed, %d\n", ioctl_nr, res); in ioctl_main()
/system/core/debuggerd/
Dgetevent.c95 int res; in read_notify() local
103 res = read(nfd, event_buf, sizeof(event_buf)); in read_notify()
104 if(res < (int)sizeof(*event)) { in read_notify()
116 while(res >= (int)sizeof(*event)) { in read_notify()
129 res -= event_size; in read_notify()
161 int res; in init_getevent() local
169 res = inotify_add_watch(ufds[0].fd, device_path, IN_DELETE | IN_CREATE); in init_getevent()
170 if(res < 0) { in init_getevent()
173 res = scan_dir(device_path); in init_getevent()
174 if(res < 0) { in init_getevent()
[all …]
/system/core/libutils/
DLinearTransform.cpp33 uint64_t* res, in scale_u64_to_u64() argument
38 assert(res); in scale_u64_to_u64()
67 *res = UINT64_MAX; in scale_u64_to_u64()
100 *res = (tmp2 << 32) | tmp1; in scale_u64_to_u64()
102 ++(*res); in scale_u64_to_u64()
103 if (!(*res)) { in scale_u64_to_u64()
104 *res = UINT64_MAX; in scale_u64_to_u64()
120 uint64_t scaled, res; in linear_transform_s64_to_s64() local
176 res = scaled + basis2; in linear_transform_s64_to_s64()
178 if ((scaled ^ basis2 ^ INT64_MIN) & (scaled ^ res) & INT64_MIN) in linear_transform_s64_to_s64()
[all …]
/system/extras/tests/bionic/libc/common/
Dtest_getaddrinfo.c19 struct addrinfo* res; in main() local
23 ret = getaddrinfo( SERVER_NAME, PORT_NUMBER, NULL, &res); in main()
29 freeaddrinfo(res); in main()
37 ret = getaddrinfo( SERVER_NAME, PORT_NUMBER, &hints, &res ); in main()
/system/core/adb/
Dusb_linux.c314 int res; in usb_bulk_write() local
329 res = -1; in usb_bulk_write()
333 res = ioctl(h->desc, USBDEVFS_SUBMITURB, urb); in usb_bulk_write()
334 } while((res < 0) && (errno == EINTR)); in usb_bulk_write()
336 if(res < 0) { in usb_bulk_write()
340 res = -1; in usb_bulk_write()
347 res = pthread_cond_timedwait(&h->notify, &h->lock, &ts); in usb_bulk_write()
348 if(res < 0 || h->dead) { in usb_bulk_write()
353 res = urb->actual_length; in usb_bulk_write()
361 return res; in usb_bulk_write()
[all …]
/system/core/sdcard/
Dsdcard.c749 int res; in fuse_reply() local
760 res = writev(fuse->fd, vec, 2); in fuse_reply()
761 if (res < 0) { in fuse_reply()
1093 int res; in handle_rename() local
1106 res = -ENOENT; in handle_rename()
1110 res = -EACCES; in handle_rename()
1114 res = -EACCES; in handle_rename()
1120 res = -ENOENT; in handle_rename()
1134 res = -ENOENT; in handle_rename()
1139 res = rename(old_child_path, new_child_path); in handle_rename()
[all …]
/system/extras/tests/ext4/
Drand_emmc_perf.c148 struct timeval start, end, res; in perf_test() local
153 res.tv_sec = 0; in perf_test()
155 while (res.tv_sec < TEST_LEN) { in perf_test()
170 timersub(&end, &start, &res); in perf_test()
177 timersub(&end, &start, &res); in perf_test()
179 msecs = (res.tv_sec * 1000) + (res.tv_usec / 1000); in perf_test()
/system/extras/tests/iptables/qtaguid/
DsocketTag.cpp61 int res; in doCtrlCommand() local
68 res = write(ctrl, buff, strlen(buff)); in doCtrlCommand()
69 testPrintI("cmd: '%s' res=%d %d/%s", buff, res, errno, strerror(errno)); in doCtrlCommand()
73 return res; in doCtrlCommand()
79 int res; in writeModuleParam() local
88 res = write(param_fd, data, strlen(data)); in writeModuleParam()
89 if (res < 0) { in writeModuleParam()
93 return res; in writeModuleParam()
136 int res; in checkTag() local
169 res = sscanf(pos - strlen("sock=1234abcd"), in checkTag()
[all …]
/system/core/libcutils/tests/memset_mips/
Dtest_memset.c20 uint32_t res; in get_count() local
21 …asm volatile (".set push; .set mips32r2; rdhwr %[res],$2; .set pop" : [res] "=r" (res) : : "memory… in get_count()
22 return res; in get_count()
31 uint32_t res; in get_count() local
33 res = (uint32_t)(now.tv_sec * 1000000000LL + now.tv_nsec); in get_count()
35 return res; in get_count()

123