Home
last modified time | relevance | path

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

12345678910

/system/core/libqtaguid/
Dqtaguid.c57 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/core/fastboot/
Dvendor_boot_img_utils.cpp41 if (auto res = CheckAdvance(old_data_ptr_, old_end(), num_bytes, __FUNCTION__); !res.ok()) in Copy() local
42 return res; in Copy()
43 if (auto res = CheckAdvance(new_data_ptr_, new_end(), num_bytes, __FUNCTION__); !res.ok()) in Copy() local
44 return res; in Copy()
56 if (auto res = CheckAdvance(old_data_ptr_, old_end(), old_num_bytes, __FUNCTION__); in Replace() local
57 !res.ok()) in Replace()
58 return res; in Replace()
62 if (auto res = CheckAdvance(new_data_ptr_, new_end(), new_data_size, __FUNCTION__); in Replace() local
63 !res.ok()) in Replace()
64 return res; in Replace()
[all …]
/system/tools/sysprop/
DApiCheckerMain.cpp46 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()
DTypeCheckerMain.cpp85 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()
DApiDumpMain.cpp50 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()
79 std::string res; in main() local
80 if (!google::protobuf::TextFormat::PrintToString(api, &res)) { in main()
84 if (!android::base::WriteStringToFile(res, argv[1])) { in main()
DCppMain.cpp103 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()
DJavaMain.cpp95 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/incremental_delivery/libdataloader/
DJNIHelpers.h30 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/incremental_delivery/incfs/
Dpath.cpp123 std::string res; in fromFd() local
129 res.resize(bufSize - 1, '\0'); in fromFd()
130 auto size = ::readlink(fdNameBuffer, &res[0], res.size()); in fromFd()
135 if (size >= ssize_t(res.size())) { in fromFd()
140 res.resize(size); in fromFd()
141 if (res.ends_with(kDeletedSuffix)) { in fromFd()
142 res.resize(size - kDeletedSuffix.size()); in fromFd()
144 return res; in fromFd()
177 void details::appendNextPath(std::string& res, std::string_view path) { in appendNextPath() argument
178 preparePathComponent(path, !res.empty()); in appendNextPath()
[all …]
/system/memory/lmkd/libpsi/
Dpsi.cpp41 int res; in init_psi_monitor() local
53 res = snprintf(buf, sizeof(buf), "%s %d %d", in init_psi_monitor()
62 if (res >= (ssize_t)sizeof(buf)) { in init_psi_monitor()
69 res = TEMP_FAILURE_RETRY(write(fd, buf, strlen(buf) + 1)); in init_psi_monitor()
70 if (res < 0) { in init_psi_monitor()
84 int res; in register_psi_monitor() local
89 res = epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &epev); in register_psi_monitor()
90 if (res < 0) { in register_psi_monitor()
93 return res; in register_psi_monitor()
/system/netd/server/
DTrafficController.cpp347 base::Result<void> res = currentMap.iterate(countUidStatsEntries); in tagSocket() local
348 if (!res.ok()) { in tagSocket()
350 strerror(res.error().code())); in tagSocket()
351 return -res.error().code(); in tagSocket()
366 res = mCookieTagMap.writeValue(sock_cookie, newKey, BPF_ANY); in tagSocket()
367 if (!res.ok()) { in tagSocket()
368 ALOGE("Failed to tag the socket: %s, fd: %d", strerror(res.error().code()), in tagSocket()
370 return -res.error().code(); in tagSocket()
380 base::Result<void> res = mCookieTagMap.deleteValue(sock_cookie); in untagSocket() local
381 if (!res.ok()) { in untagSocket()
[all …]
DClatdController.cpp395 int res = parsePrefix(nat64Prefix.c_str(), &family, &pfx96, sizeof(pfx96), &prefixLen); in init() local
397 if (res != sizeof(pfx96)) return res; in init()
444 int res = open("/dev/net/tun", O_RDWR | O_NONBLOCK | O_CLOEXEC); in startClatd() local
445 if (res == -1) { in startClatd()
446 res = errno; in startClatd()
447 ALOGE("open of tun device failed (%s)", strerror(res)); in startClatd()
448 return -res; in startClatd()
450 unique_fd tmpTunFd(res); in startClatd()
461 res = ioctl(tmpTunFd, TUNSETIFF, &ifr, sizeof(ifr)); in startClatd()
462 if (res == -1) { in startClatd()
[all …]
DOffloadUtilsTest.cpp69 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 …]
DNetdConstants.cpp104 addrinfo *res; in parsePrefix() local
108 int ret = getaddrinfo(addressString.c_str(), nullptr, &hints, &res); in parsePrefix()
109 if (ret || !res) { in parsePrefix()
116 switch (res[0].ai_family) { in parsePrefix()
121 sockaddr_in *sin = (sockaddr_in *) res[0].ai_addr; in parsePrefix()
130 sockaddr_in6 *sin6 = (sockaddr_in6 *) res[0].ai_addr; in parsePrefix()
136 freeaddrinfo(res); in parsePrefix()
142 freeaddrinfo(res); in parsePrefix()
146 *family = res[0].ai_family; in parsePrefix()
148 freeaddrinfo(res); in parsePrefix()
DBandwidthController.cpp352 int res = 0; in setInterfaceSharedQuota() local
386 res |= iptablesRestoreFunction(V4V6, Join(cmds, "\n"), nullptr); in setInterfaceSharedQuota()
387 if (res) { in setInterfaceSharedQuota()
397 res |= updateQuota(cost, maxBytes); in setInterfaceSharedQuota()
398 if (res) { in setInterfaceSharedQuota()
441 int res = 0; in removeInterfaceSharedQuota() local
446 res = removeSharedAlert(); in removeInterfaceSharedQuota()
447 if (res == 0) { in removeInterfaceSharedQuota()
453 return res; in removeInterfaceSharedQuota()
474 if (int res = updateQuota(cost, maxBytes)) { in setInterfaceQuota() local
[all …]
DTetherController.cpp221 int res = errno; in startTethering() local
223 return -res; in startTethering()
275 int res = posix_spawn_file_actions_init(&fa); in startTethering() local
276 if (res) { in startTethering()
277 ALOGE("posix_spawn_file_actions_init failed (%s)", strerror(res)); in startTethering()
278 return -res; in startTethering()
281 res = posix_spawn_file_actions_adddup2(&fa, pipeRead.get(), STDIN_FILENO); in startTethering()
282 if (res) { in startTethering()
283 ALOGE("posix_spawn_file_actions_adddup2 failed (%s)", strerror(res)); in startTethering()
284 return -res; in startTethering()
[all …]
DNetdNativeService.cpp126 #define RETURN_BINDER_STATUS_IF_NOT_OK(logEntry, res) \ argument
128 if (!isOk((res))) { \
129 logErrorStatus((logEntry), (res)); \
130 return asBinderStatus((res)); \
293 int res = gCtls->bandwidthCtrl.setInterfaceQuota(ifName, bytes); in bandwidthSetInterfaceQuota() local
294 return statusFromErrcode(res); in bandwidthSetInterfaceQuota()
299 int res = gCtls->bandwidthCtrl.removeInterfaceQuota(ifName); in bandwidthRemoveInterfaceQuota() local
300 return statusFromErrcode(res); in bandwidthRemoveInterfaceQuota()
306 int res = gCtls->bandwidthCtrl.setInterfaceAlert(ifName, bytes); in bandwidthSetInterfaceAlert() local
307 return statusFromErrcode(res); in bandwidthSetInterfaceAlert()
[all …]
/system/memory/libmeminfo/tools/
Dwsstop.cpp84 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/
DBenchmark.cpp92 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 …]
DFileDeviceUtils.cpp98 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/bpf/libbpf_android/
DBpfUtils.cpp52 int res = getsockopt(sockFd, SOL_SOCKET, SO_COOKIE, &sock_cookie, &cookie_len); in getSocketCookie() local
53 if (res < 0) { in getSocketCookie()
54 res = -errno; in getSocketCookie()
56 errno = -res; in getSocketCookie()
90 int res = setrlimit(RLIMIT_MEMLOCK, &limit); in setrlimitForTest() local
91 if (res) { in setrlimitForTest()
94 return res; in setrlimitForTest()
/system/chre/external/kiss_fft/
D_kiss_fft_guts.h104 #define C_ADD( res, a,b)\ argument
108 (res).r=(a).r+(b).r; (res).i=(a).i+(b).i; \
110 #define C_SUB( res, a,b)\ argument
114 (res).r=(a).r-(b).r; (res).i=(a).i-(b).i; \
116 #define C_ADDTO( res , a)\ argument
118 CHECK_OVERFLOW_OP((res).r,+,(a).r)\
119 CHECK_OVERFLOW_OP((res).i,+,(a).i)\
120 (res).r += (a).r; (res).i += (a).i;\
123 #define C_SUBFROM( res , a)\ argument
125 CHECK_OVERFLOW_OP((res).r,-,(a).r)\
[all …]
/system/libufdt/
Dufdt_convert.c120 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/apex/apexd/
Dapexservice.cpp143 Result<void> res = ::android::apex::StagePackages(paths); in stagePackages() local
145 if (res.ok()) { in stagePackages()
150 << res.error(); in stagePackages()
153 String8(res.error().message().c_str())); in stagePackages()
158 Result<void> res = ::android::apex::UnstagePackages(paths); in unstagePackages() local
159 if (res.ok()) { in unstagePackages()
164 << res.error(); in unstagePackages()
167 String8(res.error().message().c_str())); in unstagePackages()
249 if (auto res = calculateSizeForCompressedApex(compressed_apex_info_list, in reserveSpaceForCompressedApex() local
251 !res.isOk()) { in reserveSpaceForCompressedApex()
[all …]
/system/incremental_delivery/incfs/include/
Dincfs_inline.h86 std::string res(kIncFsFileIdStringLength, '\0'); in toString()
87 auto err = IncFs_FileIdToString(fileId, res.data()); in toString()
92 return res; in toString()
314 int res; in getFilledRanges() local
324 res = IncFs_GetFilledRangesStartingFrom(fd, rawRanges.endIndex, outBuffer, &newRanges); in getFilledRanges()
325 if (res && res != -ERANGE) { in getFilledRanges()
326 return {res, FilledRanges(std::move(buffer), {})}; in getFilledRanges()
333 } while (res && loadAll); in getFilledRanges()
337 return {res, FilledRanges(std::move(buffer), rawRanges)}; in getFilledRanges()
340 inline LoadingState toLoadingState(IncFsErrorCode res) { in toLoadingState() argument
[all …]

12345678910