Home
last modified time | relevance | path

Searched refs:rv (Results 1 – 25 of 36) sorted by relevance

12

/system/netd/tests/
Dnetd_test.cpp119 int rv = socket(AF_UNIX, SOCK_DGRAM | SOCK_NONBLOCK, 0); in TEST() local
121 ASSERT_GE(rv, 3); in TEST()
122 unique_fd unixfd(rv); in TEST()
124 rv = open("/dev/net/tun", O_RDWR | O_NONBLOCK); in TEST()
126 ASSERT_GE(rv, 3); in TEST()
127 unique_fd tun(rv); in TEST()
129 rv = open("/dev/net/tun", O_RDWR | O_NONBLOCK); in TEST()
131 ASSERT_GE(rv, 3); in TEST()
132 unique_fd tap(rv); in TEST()
144 rv = ioctl(tun, TUNSETIFF, &tun_ifr); in TEST()
[all …]
/system/netd/libnetdutils/
DSyscalls.cpp30 auto rv = fn(std::forward<Params>(params)...); in syscallRetry() local
31 while ((rv == -1) && (errno == EINTR)) { in syscallRetry()
32 rv = fn(std::forward<Params>(params)...); in syscallRetry()
34 return rv; in syscallRetry()
61 auto rv = ::getsockname(sock.get(), addr, addrlen); in getsockname() local
62 if (rv == -1) { in getsockname()
70 auto rv = ::getsockopt(sock.get(), level, optname, optval, optlen); in getsockopt() local
71 if (rv == -1) { in getsockopt()
79 auto rv = ::setsockopt(sock.get(), level, optname, optval, optlen); in setsockopt() local
80 if (rv == -1) { in setsockopt()
[all …]
DSocket.cpp27 auto* rv = inet_ntop(AF_INET6, &addr, out.data(), out.size()); in toString() local
28 if (rv == nullptr) { in toString()
/system/extras/tests/lib/testUtil/
DtestUtil.c46 double rv; in ts2double() local
48 rv = val->tv_sec; in ts2double()
49 rv += (double) val->tv_nsec / nSecsPerSec; in ts2double()
51 return rv; in ts2double()
57 double rv; in tv2double() local
59 rv = val->tv_sec; in tv2double()
60 rv += (double) val->tv_usec / uSecsPerSec; in tv2double()
62 return rv; in tv2double()
68 struct timespec rv; in double2ts() local
70 rv.tv_sec = floor(amt); in double2ts()
[all …]
/system/extras/tests/binder/benchmarks/
DbinderAddInts.cpp88 int rv; in server() local
93 if ((rv = sm->addService(serviceName, in server()
95 cerr << "addService " << serviceName << " failed, rv: " << rv in server()
107 int rv; in BM_addInts() local
144 if ((rv = binder->transact(AddIntsService::ADD_INTS, in BM_addInts()
146 cerr << "binder->transact failed, rv: " << rv in BM_addInts()
174 status_t rv(0); in onTransact() local
201 return rv; in onTransact()
206 int rv; in bindCPU() local
211 rv = sched_setaffinity(0, sizeof(cpuset), &cpuset); in bindCPU()
[all …]
/system/netd/server/
DOffloadUtils.cpp65 int rv = hardwareAddressType(interface); in isEthernet() local
66 if (rv < 0) { in isEthernet()
67 errno = -rv; in isEthernet()
71 switch (rv) { in isEthernet()
80 return ErrnoErrorf("Unknown hardware address type {} on interface {}", rv, interface); in isEthernet()
95 int rv = setsockopt(fd, SOL_NETLINK, NETLINK_CAP_ACK, &on, sizeof(on)); in sendAndProcessNetlinkResponse() local
96 if (rv) ALOGE("setsockopt(fd, SOL_NETLINK, NETLINK_CAP_ACK, %d)", on); in sendAndProcessNetlinkResponse()
99 rv = bind(fd, (const struct sockaddr*)&KERNEL_NLADDR, sizeof(KERNEL_NLADDR)); in sendAndProcessNetlinkResponse()
100 if (rv) { in sendAndProcessNetlinkResponse()
107 rv = connect(fd, (const struct sockaddr*)&KERNEL_NLADDR, sizeof(KERNEL_NLADDR)); in sendAndProcessNetlinkResponse()
[all …]
DClatdController.cpp102 int rv = getClatEgressMapFd(); in init() local
103 if (rv < 0) { in init()
104 ALOGE("getClatEgressMapFd() failure: %s", strerror(-rv)); in init()
108 mClatEgressMap.reset(rv); in init()
110 rv = getClatIngressMapFd(); in init()
111 if (rv < 0) { in init()
112 ALOGE("getClatIngressMapFd() failure: %s", strerror(-rv)); in init()
117 mClatIngressMap.reset(rv); in init()
239 int rv = getClatEgressProgFd(RAWIP); in maybeStartBpf() local
240 if (rv < 0) { in maybeStartBpf()
[all …]
DWakeupController.cpp218 auto rv = mIptables->execute(V4V6, cmd, &out); in execIptables() local
219 if (rv != 0) { in execIptables()
220 auto s = Status(rv, "Failed to execute iptables cmd: " + cmd + ", out: " + out); in execIptables()
DInterfaceController.cpp164 int rv = writeValueToPath(prefix.c_str(), iface.c_str(), "accept_ra_rt_info_min_plen", in setAcceptIPv6RIO() local
166 if (rv != 0) { in setAcceptIPv6RIO()
376 int rv = 0; in disableIcmpRedirects() local
377 rv |= writeValueToPath(ipv4_proc_path, "all", "accept_redirects", "0"); in disableIcmpRedirects()
378 rv |= writeValueToPath(ipv6_proc_path, "all", "accept_redirects", "0"); in disableIcmpRedirects()
381 return rv; in disableIcmpRedirects()
DTetherController.cpp186 int rv = InterfaceController::disableIcmpRedirects(); in setIpFwdEnabled() local
187 success &= (rv == 0); in setIpFwdEnabled()
1113 int rv = getTetherIngressProgFd(isEthernet.value()); in maybeStartBpf() local
1114 if (rv < 0) { in maybeStartBpf()
1115 ALOGE("getTetherIngressProgFd(%d) failure: %s", isEthernet.value(), strerror(-rv)); in maybeStartBpf()
1118 unique_fd tetherProgFd(rv); in maybeStartBpf()
1120 rv = tcFilterAddDevIngressTether(ifIndex, tetherProgFd, isEthernet.value()); in maybeStartBpf()
1121 if (rv) { in maybeStartBpf()
1123 isEthernet.value(), strerror(-rv)); in maybeStartBpf()
1138 int rv = tcFilterDelDevIngressTether(ifIndex); in maybeStopBpf() local
[all …]
/system/core/toolbox/
Dmodprobe.cpp66 for (std::string rv = str;;) { in stripComments() local
67 auto comment = rv.find('#'); in stripComments()
68 if (comment == std::string::npos) return rv; in stripComments()
69 auto end = rv.find('\n', comment); in stripComments()
71 rv.erase(comment, end); in stripComments()
98 int rv = EXIT_SUCCESS; in modprobe_main() local
127 rv = EXIT_FAILURE; in modprobe_main()
149 return rv; in modprobe_main()
228 rv = EXIT_FAILURE; in modprobe_main()
234 rv = EXIT_FAILURE; in modprobe_main()
[all …]
/system/extras/kexec_tools/
Dkexecload.c37 int rv; in test_kexeccall() local
39 rv = kexec_load(0, 0, NULL, KEXEC_ARCH_DEFAULT); in test_kexeccall()
41 if (rv != 0) { in test_kexeccall()
67 int rv; in main() local
151 rv = kexec_load(((uintptr_t) start_address + KEXEC_ARM_ZIMAGE_OFFSET), in main()
154 if (rv != 0) { in main()
155 fprintf(stderr, "Kexec_load returned non-zero exit code: %d with errno %d\n", rv, errno); in main()
/system/core/init/
Dfirst_stage_console.cpp44 int rv = execv(path, const_cast<char**>(args)); in RunScript() local
45 LOG(ERROR) << "unable to execv /first_stage.sh, returned " << rv << " errno " << errno; in RunScript()
86 int rv = execv(path, const_cast<char**>(args)); in StartConsole() local
87 LOG(ERROR) << "unable to execv, returned " << rv << " errno " << errno; in StartConsole()
/system/chre/platform/slpi/see/
Dsns_qmi_client.c167 int rv = -1; in sns_client_init() local
189 rv = 0; in sns_client_init()
192 if (0 != rv) { in sns_client_init()
202 return rv; in sns_client_init()
215 int rv = 0; in sns_client_send() local
225 rv = -1; in sns_client_send()
246 rv = -2; in sns_client_send()
251 return rv; in sns_client_send()
/system/extras/vbmeta_tools/
Dvbmake.cc53 int rv; in main() local
54 while ((rv = getopt_long_only(argc, argv, "i:o:", options, NULL)) != -1) { in main()
55 switch (rv) { in main()
/system/core/fs_mgr/
Dfile_wait.cpp159 int rv = poll(&event, 1, static_cast<int>(remaining_ms)); in WaitImpl() local
160 if (rv <= 0) { in WaitImpl()
161 if (rv == 0 || errno == EINTR) { in WaitImpl()
197 ssize_t rv = TEMP_FAILURE_RETRY(read(inotify_fd_, buffer, sizeof(buffer))); in ConsumeEvents() local
198 if (rv <= 0) { in ConsumeEvents()
199 if (rv == 0 || errno == EAGAIN) { in ConsumeEvents()
/system/extras/verity/fec/
Dmain.cpp62 int j, rv; in decode_rs() local
74 rv = decode_rs_char(ctx->rs, data, nullptr, 0); in decode_rs()
76 if (rv < 0) { in decode_rs()
79 } else if (rv > 0) { in decode_rs()
85 ctx->rv += rv; in decode_rs()
255 if (ctx.rv) { in decode()
256 INFO("corrected %" PRIu64 " errors\n", ctx.rv); in decode()
Dimage.h60 uint64_t rv; member
73 uint64_t rv; member
/system/core/fs_mgr/liblp/
Dimages.cpp388 int rv = sparse_file_add_fd(output_device, fd, pos, read_size, output_block); in AddPartitionImage() local
389 if (rv) { in AddPartitionImage()
390 LERROR << "sparse_file_add_fd failed with code: " << rv; in AddPartitionImage()
394 int rv = sparse_file_add_fill(output_device, buffer[0], read_size, output_block); in AddPartitionImage() local
395 if (rv) { in AddPartitionImage()
396 LERROR << "sparse_file_add_fill failed with code: " << rv; in AddPartitionImage()
466 int rv = sparse_file_write(source.get(), tf.fd, false, false, false); in OpenImageFile() local
467 if (rv) { in OpenImageFile()
468 LERROR << "sparse_file_write failed with code: " << rv; in OpenImageFile()
/system/gsid/
Dpartition_installer.cpp207 ssize_t rv = TEMP_FAILURE_RETRY(read(stream_fd, buffer.get(), max_to_read)); in CommitGsiChunk() local
208 if (rv < 0) { in CommitGsiChunk()
212 if (rv == 0) { in CommitGsiChunk()
216 if (!CommitGsiChunk(buffer.get(), rv)) { in CommitGsiChunk()
219 CHECK(static_cast<uint64_t>(rv) <= remaining); in CommitGsiChunk()
220 remaining -= rv; in CommitGsiChunk()
Dgsi_tool.cpp215 int rv, index; in Install() local
216 while ((rv = getopt_long_only(argc, argv, "", options, &index)) != -1) { in Install()
217 switch (rv) { in Install()
480 int rv, index; in Enable() local
481 while ((rv = getopt_long_only(argc, argv, "", options, &index)) != -1) { in Enable()
482 switch (rv) { in Enable()
/system/core/fs_mgr/libfs_avb/
Dutil.cpp94 int rv = access(filename.c_str(), F_OK); in WaitForFile() local
96 if (!rv || errno != ENOENT) return true; in WaitForFile()
98 if (rv && errno == ENOENT) return true; in WaitForFile()
/system/core/libutils/include/utils/
DFastStrcmp.h57 static inline int fastcmp(const void* lv, const void* rv, const size_t s) { in fastcmp() argument
59 const char* r = static_cast<const char*>(rv); in fastcmp()
/system/core/libdiskconfig/
Ddiskconfig.c241 int rv; in sync_ptable() local
250 if (S_ISBLK(stat.st_mode) && ((rv = ioctl(fd, BLKRRPART, NULL)) < 0)) { in sync_ptable()
437 int rv; in apply_disk_config() local
444 if ((rv = wlist_commit(fd, wr_lst, test)) >= 0) in apply_disk_config()
445 rv = test ? 0 : sync_ptable(fd); in apply_disk_config()
449 return rv; in apply_disk_config()
/system/memory/libmemunreachable/tests/
DBinder_test.cpp150 status_t rv = service->transact(0, send, &reply); in TEST_F() local
151 ASSERT_EQ(static_cast<status_t>(OK), rv); in TEST_F()

12