/system/core/adb/client/ |
D | mdns_utils_test.cpp | 27 auto res = mdns_parse_instance_name(str); in TEST() local 28 ASSERT_TRUE(res.has_value()); in TEST() 29 EXPECT_EQ(str, res->instance_name); in TEST() 30 EXPECT_TRUE(res->service_name.empty()); in TEST() 31 EXPECT_TRUE(res->transport_type.empty()); in TEST() 35 auto res = mdns_parse_instance_name(str); in TEST() local 36 ASSERT_TRUE(res.has_value()); in TEST() 37 EXPECT_EQ(str, res->instance_name); in TEST() 38 EXPECT_TRUE(res->service_name.empty()); in TEST() 39 EXPECT_TRUE(res->transport_type.empty()); in TEST() [all …]
|
/system/core/libqtaguid/ |
D | qtaguid.c | 57 int fd, res, savedErrno; in write_ctrl() local 66 res = TEMP_FAILURE_RETRY(write(fd, cmd, strlen(cmd))); in write_ctrl() 67 if (res < 0) { in write_ctrl() 72 if (res < 0) { in write_ctrl() 74 ALOGV("Failed write_ctrl(%s) res=%d errno=%d", cmd, res, savedErrno); in write_ctrl() 82 int res; in legacy_tagSocket() local 91 res = write_ctrl(lineBuf); in legacy_tagSocket() 92 if (res < 0) { in legacy_tagSocket() 94 tag, uid, res); in legacy_tagSocket() 97 return res; in legacy_tagSocket() [all …]
|
/system/tools/sysprop/ |
D | ApiCheckerMain.cpp | 46 if (auto res = ParseApiFile(argv[1]); res.ok()) { in main() local 47 latest = std::move(*res); in main() 50 << " failed: " << res.error(); in main() 53 if (auto res = ParseApiFile(argv[2]); res.ok()) { in main() local 54 current = std::move(*res); in main() 57 << " failed: " << res.error(); in main() 60 if (auto res = CompareApis(latest, current); !res.ok()) { in main() local 61 LOG(ERROR) << "sysprop_library API check failed:\n" << res.error(); in main()
|
D | ApiDumpMain.cpp | 50 if (auto res = ParseProps(argv[i]); res.ok()) { in main() local 51 if (!modules.emplace(res->module(), *res).second) { in main() 52 LOG(FATAL) << "duplicated module name " << res->module(); in main() 56 << " failed: " << res.error(); in main() 67 std::string res; in main() local 68 if (!google::protobuf::TextFormat::PrintToString(api, &res)) { in main() 72 if (!android::base::WriteStringToFile(res, argv[1])) { in main()
|
D | TypeCheckerMain.cpp | 85 if (auto res = ParseArgs(argc, argv); res.ok()) { in main() local 86 args = std::move(*res); in main() 88 LOG(ERROR) << argv[0] << ": " << res.error(); in main() 96 if (auto res = ParseApiFile(api_path); res.ok()) { in main() local 97 api.MergeFrom(*res); in main() 100 << " failed: " << res.error(); in main() 124 if (auto res = CheckPropertyTypes(api, entries); !res.ok()) { in main() local 125 LOG(ERROR) << "sysprop_library type check failed:\n\n" << res.error(); in main()
|
D | CppMain.cpp | 103 if (auto res = ParseArgs(argc, argv); res.ok()) { in main() local 104 args = std::move(*res); in main() 106 LOG(ERROR) << argv[0] << ": " << res.error(); in main() 110 if (auto res = GenerateCppFiles(args.input_file_path, args.header_dir, in main() local 113 !res.ok()) { in main() 115 << args.input_file_path << ": " << res.error(); in main()
|
D | JavaMain.cpp | 95 if (auto res = ParseArgs(argc, argv, &args); !res.ok()) { in main() local 96 LOG(ERROR) << res.error(); in main() 100 if (auto res = GenerateJavaLibrary(args.input_file_path, args.scope, in main() local 102 !res.ok()) { in main() 104 << args.input_file_path << ": " << res.error(); in main()
|
/system/core/adb/ |
D | types.cpp | 33 block_type res; in clear() local 35 res = std::move(chain_.back()); in clear() 38 return res; in clear() 74 IOVector res; in take_front() local 80 res.append(std::move(chain_[start_index_])); in take_front() 82 res.begin_offset_ = std::exchange(begin_offset_, 0); in take_front() 98 res.append(std::move(block)); in take_front() 106 res.append(std::move(chain_[start_index_])); in take_front() 111 return res; in take_front() 158 auto res = std::move(chain_.back()); in coalesce() local [all …]
|
/system/incremental_delivery/libdataloader/ |
D | JNIHelpers.h | 30 jmethodID res = env->GetMethodID(clazz, method_name, method_signature); in GetMethodIDOrDie() local 31 LOG_ALWAYS_FATAL_IF(res == NULL, "Unable to find method %s", method_name); in GetMethodIDOrDie() 32 return res; in GetMethodIDOrDie() 37 jmethodID res = env->GetStaticMethodID(clazz, method_name, method_signature); in GetStaticMethodIDOrDie() local 38 LOG_ALWAYS_FATAL_IF(res == NULL, "Unable to find static method %s", method_name); in GetStaticMethodIDOrDie() 39 return res; in GetStaticMethodIDOrDie() 44 jfieldID res = env->GetFieldID(clazz, field_name, field_signature); in GetFieldIDOrDie() local 45 LOG_ALWAYS_FATAL_IF(res == NULL, "Unable to find static field %s", field_name); in GetFieldIDOrDie() 46 return res; in GetFieldIDOrDie() 51 jfieldID res = env->GetStaticFieldID(clazz, field_name, field_signature); in GetStaticFieldIDOrDie() local [all …]
|
/system/memory/lmkd/libpsi/ |
D | psi.cpp | 39 int res; in init_psi_monitor() local 51 res = snprintf(buf, sizeof(buf), "%s %d %d", in init_psi_monitor() 60 if (res >= (ssize_t)sizeof(buf)) { in init_psi_monitor() 67 res = TEMP_FAILURE_RETRY(write(fd, buf, strlen(buf) + 1)); in init_psi_monitor() 68 if (res < 0) { in init_psi_monitor() 82 int res; in register_psi_monitor() local 87 res = epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &epev); in register_psi_monitor() 88 if (res < 0) { in register_psi_monitor() 91 return res; in register_psi_monitor()
|
/system/netd/server/ |
D | TrafficController.cpp | 355 base::Result<void> res = currentMap.iterate(countUidStatsEntries); in tagSocket() local 356 if (!res.ok()) { in tagSocket() 358 strerror(res.error().code())); in tagSocket() 359 return -res.error().code(); in tagSocket() 374 res = mCookieTagMap.writeValue(sock_cookie, newKey, BPF_ANY); in tagSocket() 375 if (!res.ok()) { in tagSocket() 376 ALOGE("Failed to tag the socket: %s, fd: %d", strerror(res.error().code()), in tagSocket() 378 return -res.error().code(); in tagSocket() 392 base::Result<void> res = mCookieTagMap.deleteValue(sock_cookie); in untagSocket() local 393 if (!res.ok()) { in untagSocket() [all …]
|
D | ClatdController.cpp | 437 int res = parsePrefix(nat64Prefix.c_str(), &family, &pfx96, sizeof(pfx96), &prefixLen); in init() local 439 if (res != sizeof(pfx96)) return res; in init() 486 int res = open("/dev/net/tun", O_RDWR | O_NONBLOCK | O_CLOEXEC); in startClatd() local 487 if (res == -1) { in startClatd() 488 res = errno; in startClatd() 489 ALOGE("open of tun device failed (%s)", strerror(res)); in startClatd() 490 return -res; in startClatd() 492 unique_fd tmpTunFd(res); in startClatd() 503 res = ioctl(tmpTunFd, TUNSETIFF, &ifr, sizeof(ifr)); in startClatd() 504 if (res == -1) { in startClatd() [all …]
|
D | NetdConstants.cpp | 103 addrinfo *res; in parsePrefix() local 107 int ret = getaddrinfo(addressString.c_str(), nullptr, &hints, &res); in parsePrefix() 108 if (ret || !res) { in parsePrefix() 115 switch (res[0].ai_family) { in parsePrefix() 120 sockaddr_in *sin = (sockaddr_in *) res[0].ai_addr; in parsePrefix() 129 sockaddr_in6 *sin6 = (sockaddr_in6 *) res[0].ai_addr; in parsePrefix() 135 freeaddrinfo(res); in parsePrefix() 141 freeaddrinfo(res); in parsePrefix() 145 *family = res[0].ai_family; in parsePrefix() 147 freeaddrinfo(res); in parsePrefix()
|
D | OffloadUtilsTest.cpp | 69 auto res = isEthernet("not_existing_if"); in TEST_F() local 70 ASSERT_FALSE(res.ok()); in TEST_F() 71 ASSERT_EQ(ENODEV, res.error().code()); in TEST_F() 75 auto res = isEthernet("lo"); in TEST_F() local 76 ASSERT_FALSE(res.ok()); in TEST_F() 77 ASSERT_EQ(EAFNOSUPPORT, res.error().code()); in TEST_F() 83 auto res = isEthernet("wlan0"); in TEST_F() local 84 if (!res.ok() && res.error().code() == ENODEV) return; in TEST_F() 86 ASSERT_RESULT_OK(res); in TEST_F() 87 ASSERT_TRUE(res.value()); in TEST_F() [all …]
|
D | NetdNativeService.cpp | 124 #define RETURN_BINDER_STATUS_IF_NOT_OK(logEntry, res) \ argument 126 if (!isOk((res))) { \ 127 logErrorStatus((logEntry), (res)); \ 128 return asBinderStatus((res)); \ 290 int res = gCtls->bandwidthCtrl.setInterfaceQuota(ifName, bytes); in bandwidthSetInterfaceQuota() local 291 return statusFromErrcode(res); in bandwidthSetInterfaceQuota() 296 int res = gCtls->bandwidthCtrl.removeInterfaceQuota(ifName); in bandwidthRemoveInterfaceQuota() local 297 return statusFromErrcode(res); in bandwidthRemoveInterfaceQuota() 303 int res = gCtls->bandwidthCtrl.setInterfaceAlert(ifName, bytes); in bandwidthSetInterfaceAlert() local 304 return statusFromErrcode(res); in bandwidthSetInterfaceAlert() [all …]
|
D | BandwidthController.cpp | 415 int res = 0; in setInterfaceSharedQuota() local 449 res |= iptablesRestoreFunction(V4V6, Join(cmds, "\n"), nullptr); in setInterfaceSharedQuota() 450 if (res) { in setInterfaceSharedQuota() 460 res |= updateQuota(cost, maxBytes); in setInterfaceSharedQuota() 461 if (res) { in setInterfaceSharedQuota() 504 int res = 0; in removeInterfaceSharedQuota() local 509 res = removeSharedAlert(); in removeInterfaceSharedQuota() 510 if (res == 0) { in removeInterfaceSharedQuota() 516 return res; in removeInterfaceSharedQuota() 537 if (int res = updateQuota(cost, maxBytes)) { in setInterfaceQuota() local [all …]
|
D | TetherController.cpp | 248 int res = errno; in startTethering() local 250 return -res; in startTethering() 302 int res = posix_spawn_file_actions_init(&fa); in startTethering() local 303 if (res) { in startTethering() 304 ALOGE("posix_spawn_file_actions_init failed (%s)", strerror(res)); in startTethering() 305 return -res; in startTethering() 308 res = posix_spawn_file_actions_adddup2(&fa, pipeRead.get(), STDIN_FILENO); in startTethering() 309 if (res) { in startTethering() 310 ALOGE("posix_spawn_file_actions_adddup2 failed (%s)", strerror(res)); in startTethering() 311 return -res; in startTethering() [all …]
|
/system/memory/libmeminfo/tools/ |
D | wsstop.cpp | 84 Vma res; in diff_vma_params() local 85 res.usage.shared_clean = cur.usage.shared_clean > last.usage.shared_clean in diff_vma_params() 88 res.usage.shared_dirty = cur.usage.shared_dirty > last.usage.shared_dirty in diff_vma_params() 91 res.usage.private_clean = cur.usage.private_clean > last.usage.private_clean in diff_vma_params() 94 res.usage.private_dirty = cur.usage.private_dirty > last.usage.private_dirty in diff_vma_params() 98 res.usage.rss = cur.usage.rss > last.usage.rss ? cur.usage.rss - last.usage.rss : 0; in diff_vma_params() 99 res.usage.pss = cur.usage.pss > last.usage.pss ? cur.usage.pss - last.usage.pss : 0; in diff_vma_params() 100 res.usage.uss = cur.usage.uss > last.usage.uss ? cur.usage.uss - last.usage.uss : 0; in diff_vma_params() 101 res.usage.swap = cur.usage.swap > last.usage.swap ? cur.usage.swap - last.usage.swap : 0; in diff_vma_params() 102 res.usage.swap_pss = in diff_vma_params() [all …]
|
/system/vold/ |
D | Benchmark.cpp | 92 status_t res = 0; in benchmarkInternal() local 127 res |= BenchmarkCreate([&](int progress) -> bool { in benchmarkInternal() 134 if (res == OK) extras->putLong(String16("create"), timer.duration().count()); in benchmarkInternal() 138 if (res == OK) { in benchmarkInternal() 143 res = -1; in benchmarkInternal() 147 if (res == OK) extras->putLong(String16("drop"), timer.duration().count()); in benchmarkInternal() 151 if (res == OK) { in benchmarkInternal() 154 res |= BenchmarkRun([&](int progress) -> bool { in benchmarkInternal() 161 if (res == OK) extras->putLong(String16("run"), timer.duration().count()); in benchmarkInternal() 168 res |= BenchmarkDestroy(); in benchmarkInternal() [all …]
|
D | FileDeviceUtils.cpp | 98 std::unique_ptr<struct fiemap> res(new (::operator new(allocsize)) struct fiemap); in alloc_fiemap() local 99 memset(res.get(), 0, allocsize); in alloc_fiemap() 100 res->fm_start = 0; in alloc_fiemap() 101 res->fm_length = UINT64_MAX; in alloc_fiemap() 102 res->fm_flags = 0; in alloc_fiemap() 103 res->fm_extent_count = extent_count; in alloc_fiemap() 104 res->fm_mapped_extents = 0; in alloc_fiemap() 105 return res; in alloc_fiemap()
|
/system/core/adb/tls/tests/ |
D | adb_ca_list_test.cpp | 69 auto res = SHA256HexStringToBits(sha_str); in TEST_F() local 70 EXPECT_FALSE(res.has_value()); in TEST_F() 74 auto res = SHA256HexStringToBits(sha_str); in TEST_F() local 75 EXPECT_FALSE(res.has_value()); in TEST_F() 79 auto res = SHA256HexStringToBits(sha_str); in TEST_F() local 80 EXPECT_FALSE(res.has_value()); in TEST_F() 84 auto res = SHA256HexStringToBits(sha_str); in TEST_F() local 85 EXPECT_FALSE(res.has_value()); in TEST_F() 91 auto res = SHA256HexStringToBits(sha_str); in TEST_F() local 92 EXPECT_FALSE(res.has_value()); in TEST_F()
|
/system/chre/external/kiss_fft/ |
D | _kiss_fft_guts.h | 100 #define C_ADD( res, a,b)\ argument 104 (res).r=(a).r+(b).r; (res).i=(a).i+(b).i; \ 106 #define C_SUB( res, a,b)\ argument 110 (res).r=(a).r-(b).r; (res).i=(a).i-(b).i; \ 112 #define C_ADDTO( res , a)\ argument 114 CHECK_OVERFLOW_OP((res).r,+,(a).r)\ 115 CHECK_OVERFLOW_OP((res).i,+,(a).i)\ 116 (res).r += (a).r; (res).i += (a).i;\ 119 #define C_SUBFROM( res , a)\ argument 121 CHECK_OVERFLOW_OP((res).r,-,(a).r)\ [all …]
|
/system/incremental_delivery/incfs/ |
D | path.cpp | 123 std::string res; in fromFd() local 133 res.resize(bufSize + 1, '\0'); in fromFd() 134 auto size = ::readlink(fdNameBuffer, &res[0], res.size()); in fromFd() 144 res.resize(size); in fromFd() 145 if (res.ends_with(kDeletedSuffix)) { in fromFd() 146 res.resize(size - kDeletedSuffix.size()); in fromFd() 148 return res; in fromFd() 180 void details::appendNextPath(std::string& res, std::string_view path) { in appendNextPath() argument 185 if (!res.empty() && !res.ends_with('/')) { in appendNextPath() 186 res.push_back('/'); in appendNextPath() [all …]
|
/system/libufdt/ |
D | ufdt_convert.c | 120 struct ufdt_node *res = ufdt_node_construct(fdtp, fdt_tag_ptr, pool); in ufdt_new_node() local 121 return res; in ufdt_new_node() 131 struct ufdt_node *res, *child_node; in fdt_to_ufdt_tree() local 133 res = NULL; in fdt_to_ufdt_tree() 144 res = ufdt_new_node(fdtp, cur_fdt_tag_offset, pool); in fdt_to_ufdt_tree() 148 res = ufdt_new_node(fdtp, cur_fdt_tag_offset, pool); in fdt_to_ufdt_tree() 155 ufdt_node_add_child(res, child_node); in fdt_to_ufdt_tree() 163 return res; in fdt_to_ufdt_tree() 219 struct ufdt_node *res = NULL; in ufdt_get_node_by_phandle() local 234 res = tree->phandle_table.data[s].node; in ufdt_get_node_by_phandle() [all …]
|
/system/iorap/include/binder/ |
D | app_launch_event.h | 79 if (::android::status_t res = function(__VA_ARGS__); res != ::android::NO_ERROR) { \ in readFromParcel() 81 return res; \ in readFromParcel() 123 if (::android::status_t res = function(__VA_ARGS__); res != ::android::NO_ERROR) { \ 124 return res; \ 166 ::android::status_t res; in ReadProto() 169 if ((res = parcel->readByteVector(/*out*/&byte_vector)) != ::android::NO_ERROR) { in ReadProto() 170 return unexpected(res); in ReadProto() 198 ::android::status_t res; in ReadNullableProto() 199 res = parcel->readBool(/*out*/&value); in ReadNullableProto() 201 if (res != ::android::NO_ERROR) { in ReadNullableProto() [all …]
|