Home
last modified time | relevance | path

Searched refs:result (Results 1 – 25 of 34) sorted by relevance

12

/bootable/recovery/fuse_sideload/
Dfuse_sideload.cpp304 int result = fetch_block(fd, block); in handle_read() local
305 if (result != 0) return result; in handle_read()
331 result = fetch_block(fd, block + 1); in handle_read()
332 if (result != 0) return result; in handle_read()
368 int result; in run_fuse_sideload() local
371 result = -1; in run_fuse_sideload()
384 result = -1; in run_fuse_sideload()
390 result = -1; in run_fuse_sideload()
397 result = -1; in run_fuse_sideload()
406 result = mount("/dev/fuse", mount_point, "fuse", MS_NOSUID | MS_NODEV | MS_RDONLY | MS_NOEXEC, in run_fuse_sideload()
[all …]
/bootable/recovery/tests/unit/
Dfuse_provider_test.cpp70 std::vector<uint8_t> result(2000); in TEST() local
71 ASSERT_TRUE(block_map_data->ReadBlockAlignedData(result.data(), 2000, 1)); in TEST()
72 ASSERT_EQ(std::vector<uint8_t>(content.begin() + 4096, content.begin() + 6096), result); in TEST()
74 result.resize(20000); in TEST()
75 ASSERT_TRUE(block_map_data->ReadBlockAlignedData(result.data(), 20000, 0)); in TEST()
76 ASSERT_EQ(std::vector<uint8_t>(content.begin(), content.begin() + 20000), result); in TEST()
97 std::vector<uint8_t> result(20000); in TEST() local
99 ASSERT_FALSE(block_map_data->ReadBlockAlignedData(result.data(), 20000, 2)); in TEST()
100 ASSERT_TRUE(block_map_data->ReadBlockAlignedData(result.data(), 20000, 1)); in TEST()
103 ASSERT_EQ(std::vector<uint8_t>(expected.begin(), expected.end()), result); in TEST()
Dedify_test.cpp32 std::string result; in expect() local
33 bool status = Evaluate(&state, e, &result); in expect()
38 EXPECT_STREQ(expected, result.c_str()); in expect()
Dupdate_verifier_test.cpp63 recovery_update_verifier::CareMap result; in ConstructProto() local
79 *result.add_partitions() = info; in ConstructProto()
82 return result.SerializeAsString(); in ConstructProto()
/bootable/recovery/minui/
Dresources.cpp49 auto result = std::unique_ptr<GRSurface>(new GRSurface(width, height, row_bytes, pixel_bytes)); in Create() local
51 result->data_size_ = in Create()
53 result->data_.reset( in Create()
54 static_cast<uint8_t*>(aligned_alloc(kSurfaceDataAlignment, result->data_size_))); in Create()
55 if (!result->data_) return nullptr; in Create()
56 return result; in Create()
60 auto result = GRSurface::Create(width, height, row_bytes, pixel_bytes); in Clone() local
61 if (!result) return nullptr; in Clone()
62 memcpy(result->data(), data(), data_size_); in Clone()
63 return result; in Clone()
[all …]
Dgraphics_adf.cpp76 int result = 0; in InterfaceInit() local
77 surfaces[0] = GRSurfaceAdf::Create(intf_fd, &intf_data.current_mode, format, &result); in InterfaceInit()
79 fprintf(stderr, "Failed to allocate surface 0: %s\n", strerror(-result)); in InterfaceInit()
83 surfaces[1] = GRSurfaceAdf::Create(intf_fd, &intf_data.current_mode, format, &result); in InterfaceInit()
85 fprintf(stderr, "Failed to allocate surface 1: %s\n", strerror(-result)); in InterfaceInit()
93 return result; in InterfaceInit()
/bootable/recovery/install/
Dfuse_install.cpp113 std::string result = BrowseDirectory(new_path, device, ui); in BrowseDirectory() local
114 if (!result.empty()) return result; in BrowseDirectory()
161 InstallResult result = INSTALL_ERROR; in InstallWithFuseFromPath() local
166 result = INSTALL_ERROR; in InstallWithFuseFromPath()
178 result = INSTALL_ERROR; in InstallWithFuseFromPath()
186 result = in InstallWithFuseFromPath()
204 return result; in InstallWithFuseFromPath()
229 auto result = InstallWithFuseFromPath(path, ui); in ApplyFromSdcard() local
231 return result; in ApplyFromSdcard()
Dadb_install.cpp93 static auto AdbInstallPackageHandler(RecoveryUI* ui, InstallResult* result) { in AdbInstallPackageHandler() argument
100 *result = INSTALL_ERROR; in AdbInstallPackageHandler()
117 *result = InstallPackage(package.get(), FUSE_SIDELOAD_HOST_PATHNAME, false, 0, ui); in AdbInstallPackageHandler()
124 return std::make_pair(*result == INSTALL_SUCCESS, should_continue); in AdbInstallPackageHandler()
127 static auto AdbRebootHandler(MinadbdCommand command, InstallResult* result, in AdbRebootHandler() argument
150 *result = INSTALL_REBOOT; in AdbRebootHandler()
178 const auto [result, should_continue] = command_func(); in HandleMessageFromMinadbd()
179 LOG(INFO) << "Command " << static_cast<uint32_t>(command_type) << " finished with " << result; in HandleMessageFromMinadbd()
180 if (!WriteStatusToFd(result ? MinadbdCommandStatus::kSuccess : MinadbdCommandStatus::kFailure, in HandleMessageFromMinadbd()
371 bool result = WipeData(device, false); in ApplyFromAdb() local
[all …]
Dwipe_data.cpp58 int result; in EraseVolume() local
74 result = format_volume(volume, CONVERT_FBE_DIR); in EraseVolume()
78 result = format_volume(volume); in EraseVolume()
85 return (result == 0); in EraseVolume()
Dinstall.cpp544 auto result = TryUpdateBinary(package, wipe_cache, log_buffer, retry_count, max_temperature, ui); in VerifyAndInstallPackage() local
548 return result; in VerifyAndInstallPackage()
558 InstallResult result; in InstallPackage() local
567 result = INSTALL_CORRUPT; in InstallPackage()
570 result = INSTALL_ERROR; in InstallPackage()
573 result = VerifyAndInstallPackage(package, &updater_wipe_cache, &log_buffer, retry_count, in InstallPackage()
603 result == INSTALL_SUCCESS ? "1" : "0", in InstallPackage()
630 if (result == INSTALL_SUCCESS && should_wipe_cache) { in InstallPackage()
632 result = INSTALL_ERROR; in InstallPackage()
636 return result; in InstallPackage()
Dwipe_device.cpp74 std::vector<std::string> result; in GetWipePartitionList() local
82 result.push_back(line); in GetWipePartitionList()
85 return result; in GetWipePartitionList()
Dverifier.cpp321 std::vector<Certificate> result; in IterateZipEntriesAndSearchForKeys() local
341 result.emplace_back(std::move(cert)); in IterateZipEntriesAndSearchForKeys()
349 return result; in IterateZipEntriesAndSearchForKeys()
359 std::vector<Certificate> result = IterateZipEntriesAndSearchForKeys(handle); in LoadKeysFromZipfile() local
361 return result; in LoadKeysFromZipfile()
/bootable/recovery/applypatch/
Dbspatch.cpp72 int result = bsdiff::bspatch(old_data, old_size, in ApplyBSDiffPatch() local
75 if (result != 0) { in ApplyBSDiffPatch()
76 LOG(ERROR) << "bspatch failed, result: " << result; in ApplyBSDiffPatch()
78 if (result == 2) { in ApplyBSDiffPatch()
86 return result; in ApplyBSDiffPatch()
Dapplypatch.cpp373 int result; in GenerateTarget() local
375 result = ApplyBSDiffPatch(source_file.data.data(), source_file.data.size(), patch, 0, sink); in GenerateTarget()
377 result = in GenerateTarget()
381 if (result != 0) { in GenerateTarget()
382 LOG(ERROR) << "Failed to apply the patch: " << result; in GenerateTarget()
/bootable/recovery/minadbd/
Dminadbd_services.cpp117 if (int result = run_fuse_sideload(std::move(adb_data_reader), sideload_mount_point.c_str()); in RunAdbFuseSideload() local
118 result != 0) { in RunAdbFuseSideload()
154 if (auto result = RunAdbFuseSideload(sfd.get(), args, &status); result != kMinadbdSuccess) { in RescueInstallHostService() local
155 exit(result); in RescueInstallHostService()
188 std::string result; in RescueGetpropHostService() local
195 result += "[" + key + "]: [" + value + "]\n"; in RescueGetpropHostService()
198 result = query_prop(prop) + "\n"; in RescueGetpropHostService()
200 if (result.empty()) { in RescueGetpropHostService()
201 result = "\n"; in RescueGetpropHostService()
203 if (!android::base::WriteFully(sfd, result.data(), result.size())) { in RescueGetpropHostService()
/bootable/recovery/edify/
Dexpr.cpp45 bool Evaluate(State* state, const std::unique_ptr<Expr>& expr, std::string* result) { in Evaluate() argument
46 if (result == nullptr) { in Evaluate()
59 *result = v->data; in Evaluate()
82 std::string result; in ConcatFn() local
88 result += str; in ConcatFn()
91 return StringValue(result); in ConcatFn()
126 std::string result; in AssertFn() local
127 if (!Evaluate(state, argv[i], &result)) { in AssertFn()
130 if (result.empty()) { in AssertFn()
213 std::string result = (haystack.find(needle) != std::string::npos) ? "t" : ""; in SubstringFn() local
[all …]
/bootable/recovery/otautil/include/otautil/
Dprint_sha1.h27 std::string result = ""; in print_sha1() local
29 result.push_back(hex[(sha1[i] >> 4) & 0xf]); in print_sha1()
30 result.push_back(hex[sha1[i] & 0xf]); in print_sha1()
32 return result; in print_sha1()
/bootable/recovery/updater/
Dcommands.cpp129 SourceInfo result(src_hash, src_ranges, {}, {}); in ParseTargetInfoAndSourceInfo() local
131 if (result.blocks() != src_blocks) { in ParseTargetInfoAndSourceInfo()
133 android::base::StringPrintf("mismatching block count: %zu (%s) vs %zu", result.blocks(), in ParseTargetInfoAndSourceInfo()
138 *source = result; in ParseTargetInfoAndSourceInfo()
167 SourceInfo result(src_hash, src_ranges, src_ranges_location, stashes); in ParseTargetInfoAndSourceInfo() local
168 if (src_blocks != result.blocks()) { in ParseTargetInfoAndSourceInfo()
169 *err = android::base::StringPrintf("mismatching block count: %zu (%s) vs %zu", result.blocks(), in ParseTargetInfoAndSourceInfo()
174 *source = result; in ParseTargetInfoAndSourceInfo()
405 TransferList result{}; in Parse() local
414 if (!android::base::ParseInt(lines[0], &result.version_, 3, 4)) { in Parse()
[all …]
Dmounts.cpp77 int result = umount(mount_point.c_str()); in unmount_mounted_volume() local
78 if (result == -1) { in unmount_mounted_volume()
81 return result; in unmount_mounted_volume()
Ddynamic_partitions.cpp83 bool result = updater_runtime->MapPartitionOnDeviceMapper(args[0], &path); in MapPartitionFn() local
84 return result ? StringValue(path) : StringValue(""); in MapPartitionFn()
108 int result = stat(updated_marker.c_str(), &sb); in UpdateDynamicPartitionsFn() local
109 if (result == 0) { in UpdateDynamicPartitionsFn()
/bootable/recovery/otautil/
Drangeset.cpp118 std::vector<RangeSet> result; in Split() local
141 result.push_back(std::move(buffer)); in Split()
143 return result; in Split()
150 std::string result = std::to_string(ranges_.size() * 2); in ToString() local
152 result += android::base::StringPrintf(",%zu,%zu", begin, end); in ToString()
155 return result; in ToString()
201 RangeSet result; in GetSubRanges() local
221 if (!result.PushBack({ trimmed_range_start, trimmed_range_end })) { in GetSubRanges()
225 return result; in GetSubRanges()
228 if (!result.PushBack({ trimmed_range_start, range_end })) { in GetSubRanges()
Dsysutil.cpp242 std::vector<char*> result(args.size()); in StringVectorToNullTerminatedArray() local
243 std::transform(args.cbegin(), args.cend(), result.begin(), in StringVectorToNullTerminatedArray()
245 result.push_back(nullptr); in StringVectorToNullTerminatedArray()
246 return result; in StringVectorToNullTerminatedArray()
/bootable/recovery/update_verifier/
Dcare_map_generator.py118 result = ParseProtoMessage(content, args.fingerprint_enabled)
122 result = care_map_proto.SerializeToString()
125 output.write(result)
/bootable/recovery/tools/image_generator/
DImageGenerator.java333 Map<Locale, String> result = in readLocalizedStringFromXmls() local
371 result.put(locale, localizedText.substring(1, localizedText.length() - 1)); in readLocalizedStringFromXmls()
374 return result; in readLocalizedStringFromXmls()
393 Font result = Font.createFont(Font.TRUETYPE_FONT, fontFile).deriveFont(mFontSize); in loadFontsByLocale() local
394 mLoadedFontMap.put(language, result); in loadFontsByLocale()
395 return result; in loadFontsByLocale()
453 WrappedTextInfo result = new WrappedTextInfo(); in processAndWrapText() local
455 result.addLines(wrapText(line, metrics)); in processAndWrapText()
458 return result; in processAndWrapText()
/bootable/recovery/recovery_utils/
Droots.cpp230 int result = exec_cmd(mke2fs_args); in format_volume() local
231 if (result == 0 && !directory.empty()) { in format_volume()
235 result = exec_cmd(e2fsdroid_args); in format_volume()
238 if (result != 0) { in format_volume()

12