Home
last modified time | relevance | path

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

12

/system/netd/server/
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 …]
DNetdConstants.cpp41 static void logExecError(const char* argv[], int res, int status) { in logExecError() argument
49 ALOGE("exec() res=%d, status=%d for %s", res, status, args.c_str()); in logExecError()
53 int res; in execIptablesCommand() local
56 res = android_fork_execvp(argc, (char **)argv, &status, false, in execIptablesCommand()
58 if (res || !WIFEXITED(status) || WEXITSTATUS(status)) { in execIptablesCommand()
60 logExecError(argv, res, status); in execIptablesCommand()
62 if (res) in execIptablesCommand()
63 return res; in execIptablesCommand()
87 int res = 0; in execIptables() local
90 res |= execIptablesCommand(argsList.size(), argv, silent); in execIptables()
[all …]
DIdletimerController.cpp154 int res; in setDefaults() local
162 res = runIpxtablesCmd(ARRAY_SIZE(cmd1), cmd1); in setDefaults()
164 if (res) in setDefaults()
165 return res; in setDefaults()
174 res = runIpxtablesCmd(ARRAY_SIZE(cmd2), cmd2); in setDefaults()
176 return res; in setDefaults()
180 int res = setDefaults(); in enableIdletimerControl() local
181 return res; in enableIdletimerControl()
185 int res = setDefaults(); in disableIdletimerControl() local
186 return res; in disableIdletimerControl()
[all …]
DBandwidthController.cpp159 int res = 0; in runIpxtablesCmd() local
162 res |= runIptablesCmd(cmd, jumpHandling, IptIpV4, failureHandling); in runIpxtablesCmd()
163 res |= runIptablesCmd(cmd, jumpHandling, IptIpV6, failureHandling); in runIpxtablesCmd()
164 return res; in runIpxtablesCmd()
181 int res; in runIptablesCmd() local
220 res = android_fork_execvp(argc, (char **)argv, &status, false, in runIptablesCmd()
222 res = res || !WIFEXITED(status) || WEXITSTATUS(status); in runIptablesCmd()
223 if (res && failureHandling == IptFailShow) { in runIptablesCmd()
224 ALOGE("runIptablesCmd(): res=%d status=%d failed %s", res, status, in runIptablesCmd()
227 return res; in runIptablesCmd()
[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()
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()
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()
/system/core/libcutils/
Dqtaguid.c62 int fd, res, savedErrno; in write_ctrl() local
71 res = TEMP_FAILURE_RETRY(write(fd, cmd, strlen(cmd))); in write_ctrl()
72 if (res < 0) { in write_ctrl()
77 if (res < 0) { in write_ctrl()
78 ALOGI("Failed write_ctrl(%s) res=%d errno=%d", cmd, res, savedErrno); in write_ctrl()
86 int res; in write_param() local
92 res = TEMP_FAILURE_RETRY(write(param_fd, value, strlen(value))); in write_param()
93 if (res < 0) { in write_param()
102 int res; in qtaguid_tagSocket() local
111 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/
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
69 res = read(fd, &buf, read_len); in hd_main()
70 if(res == 0) in hd_main()
72 for(i = 0; i < res; i++) { in hd_main()
79 if(((i & 15) == 15) || (i == res - 1)) { in hd_main()
84 if(res < 0) { in hd_main()
88 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
113 res = ioctl(fd, ioctl_nr, *(uint32_t*)ioctl_args); in ioctl_main()
115 res = ioctl(fd, ioctl_nr, ioctl_args); in ioctl_main()
117 res = ioctl(fd, ioctl_nr, 0); in ioctl_main()
118 if (res < 0) { in ioctl_main()
120 fprintf(stderr, "ioctl 0x%x failed, %d\n", ioctl_nr, res); in ioctl_main()
/system/core/debuggerd/
Dgetevent.cpp106 int res; in read_notify() local
114 res = read(nfd, event_buf, sizeof(event_buf)); in read_notify()
115 if (res < (int)sizeof(*event)) { in read_notify()
126 while (res >= (int)sizeof(*event)) { in read_notify()
137 res -= event_size; in read_notify()
166 int res; in init_getevent() local
174 res = inotify_add_watch(ufds[0].fd, device_path, IN_DELETE | IN_CREATE); in init_getevent()
175 if (res < 0) { in init_getevent()
178 res = scan_dir(device_path); in init_getevent()
179 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/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/core/sdcard/
Dsdcard.c792 int res; in fuse_reply() local
803 res = writev(fuse->fd, vec, 2); in fuse_reply()
804 if (res < 0) { in fuse_reply()
1136 int res; in handle_rename() local
1149 res = -ENOENT; in handle_rename()
1153 res = -EACCES; in handle_rename()
1157 res = -EACCES; in handle_rename()
1163 res = -ENOENT; in handle_rename()
1177 res = -ENOENT; in handle_rename()
1182 res = rename(old_child_path, new_child_path); in handle_rename()
[all …]
/system/core/include/private/pixelflinger/
Dggl_fixed.h184 int64_t res; in gglMulii() member
191 return res; in gglMulii()
204 : [res]"=&r"(result),[tmp]"=&r"(tmp) in gglMulx()
220 : [res]"=&r"(result),[tmp]"=&r"(tmp),[tmp1]"=&r"(tmp1) in gglMulx()
238 : [res]"=&r"(result),[tmp]"=&r"(tmp),[tmp1]"=&r"(tmp1),[tmp2]"=&r"(tmp2) in gglMulx()
260 : [res]"=&r"(result),[tmp]"=&r"(tmp),[tmp1]"=&r"(tmp1),[tmp2]"=&r"(tmp2) in gglMulx()
283 : [res]"=&r"(result),[tmp]"=&r"(tmp),[tmp1]"=&r"(tmp1),[tmp2]"=&r"(tmp2) in gglMulx()
321 : [res]"=&r"(result),[t]"=&r"(t) in gglMulAddx()
338 : [res]"=&r"(result),[t]"=&r"(t),[tmp1]"=&r"(tmp1),[tmp2]"=&r"(tmp2) in gglMulAddx()
356 : [res]"=&r"(result),[t]"=&r"(t),[tmp1]"=&r"(tmp1),[tmp2]"=&r"(tmp2) in gglMulAddx()
[all …]
/system/extras/tests/iptables/qtaguid/
DsocketTag.cpp65 int res; in doCtrlCommand() local
72 res = write(ctrl, buff, strlen(buff)); in doCtrlCommand()
73 testPrintI("cmd: '%s' res=%d %d/%s", buff, res, errno, strerror(errno)); in doCtrlCommand()
77 return res; in doCtrlCommand()
83 int res; in writeModuleParam() local
92 res = write(param_fd, data, strlen(data)); in writeModuleParam()
93 if (res < 0) { in writeModuleParam()
97 return res; in writeModuleParam()
140 int res; in checkTag() local
173 res = sscanf(pos - strlen("sock=1234abcd"), in checkTag()
[all …]
/system/media/audio_utils/tests/
Dprimitives_tests.cpp103 int32_t res; in TEST() local
107 res = clampq4_27_from_float(val.f); in TEST()
108 EXPECT_EQ(res, 0x7fffffff); in TEST()
110 res = clampq4_27_from_float(val.f); in TEST()
111 EXPECT_LE(res, 0x7fffffff); in TEST()
112 EXPECT_GE(res, 0x7fff0000); in TEST()
114 res = clampq4_27_from_float(val.f); in TEST()
115 EXPECT_EQ(res, (int32_t)0x80000000); // negative in TEST()
117 res = clampq4_27_from_float(val.f); in TEST()
118 EXPECT_GE(res, (int32_t)0x80000000); // negative in TEST()
[all …]

12