Home
last modified time | relevance | path

Searched refs:blocks (Results 1 – 12 of 12) sorted by relevance

/bootable/recovery/otautil/
Dsysutil.cpp71 uint64_t blocks = ((file_size - 1) / blksize) + 1; in ParseBlockMapFile() local
72 if (blocks > std::numeric_limits<uint32_t>::max() || range_count == 0 || in ParseBlockMapFile()
80 uint64_t remaining_blocks = blocks; in ParseBlockMapFile()
134 uint64_t blocks = ((block_map_data.file_size() - 1) / blksize) + 1; in MapBlockFile() local
135 void* reserve = mmap(nullptr, blocks * blksize, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0); in MapBlockFile()
144 munmap(reserve, blocks * blksize); in MapBlockFile()
151 size_t remaining_size = blocks * blksize; in MapBlockFile()
158 munmap(reserve, blocks * blksize); in MapBlockFile()
168 munmap(reserve, blocks * blksize); in MapBlockFile()
Drangeset.cpp123 for (const auto& blocks : blocks_per_group) { in Split() local
125 size_t needed = blocks; in Split()
/bootable/recovery/updater/
Dcommands.cpp132 if (result.blocks() != src_blocks) { in ParseTargetInfoAndSourceInfo()
134 android::base::StringPrintf("mismatching block count: %zu (%s) vs %zu", result.blocks(), in ParseTargetInfoAndSourceInfo()
169 if (src_blocks != result.blocks()) { in ParseTargetInfoAndSourceInfo()
170 *err = android::base::StringPrintf("mismatching block count: %zu (%s) vs %zu", result.blocks(), in ParseTargetInfoAndSourceInfo()
322 size_t start = locs.blocks(); in MoveRange()
325 size_t blocks = it->second - it->first; in MoveRange() local
326 start -= blocks; in MoveRange()
327 memmove(to + (it->first * block_size), from + (start * block_size), blocks * block_size); in MoveRange()
335 if (buffer->size() < blocks() * block_size) { in ReadAll()
351 std::vector<uint8_t> stash_buffer(stash.blocks() * block_size); in ReadAll()
[all …]
Dblockimg.cpp244 return tgt_.blocks() * BLOCKSIZE - bytes_written_; in AvailableSpace()
589 locs = RangeSet(std::vector<Range>{ Range{ 0, src.blocks() } }); in PrintHashForCorruptedSourceBlocks()
596 CHECK_EQ(src.blocks(), locs.blocks()); in PrintHashForCorruptedSourceBlocks()
599 LOG(INFO) << "printing hash in hex for " << src.blocks() << " source blocks"; in PrintHashForCorruptedSourceBlocks()
600 for (size_t i = 0; i < src.blocks(); i++) { in PrintHashForCorruptedSourceBlocks()
618 CHECK_EQ(src.blocks() * BLOCKSIZE, buffer.size()); in PrintHashForCorruptedStashedBlocks()
620 for (size_t i = 0; i < src.blocks(); i++) { in PrintHashForCorruptedStashedBlocks()
640 std::vector<uint8_t> buffer(src.blocks() * BLOCKSIZE); in PrintHashForMissingStashedBlocks()
649 const size_t blocks, bool printerror) { in VerifyBlocks() argument
653 SHA1(data, blocks * BLOCKSIZE, digest); in VerifyBlocks()
[all …]
/bootable/recovery/tests/unit/
Drangeset_test.cpp42 ASSERT_EQ(static_cast<size_t>(9), rs.blocks()); in TEST()
48 ASSERT_EQ(static_cast<size_t>(14), rs2.blocks()); in TEST()
96 ASSERT_EQ(static_cast<size_t>(12), rs.blocks()); in TEST()
157 size_t rs6_blocks = rs6.blocks(); in TEST()
167 sum += element.blocks(); in TEST()
255 ASSERT_EQ(static_cast<size_t>(10), rs.blocks()); in TEST()
258 ASSERT_EQ(static_cast<size_t>(11), rs.blocks()); in TEST()
263 ASSERT_EQ(static_cast<size_t>(16), rs.blocks()); in TEST()
268 ASSERT_EQ(static_cast<size_t>(22), rs.blocks()); in TEST()
Dcommands_test.cpp63 ASSERT_EQ(117, source.blocks()); in TEST()
88 ASSERT_EQ(2, source.blocks()); in TEST()
116 ASSERT_EQ(96, source.blocks()); in TEST()
443 std::fill_n(block_buffer->begin(), src.blocks() * kBlockSize, 'a'); in TEST()
447 std::vector<uint8_t> buffer(source.blocks() * kBlockSize); in TEST()
449 ASSERT_EQ(source.blocks() * kBlockSize, buffer.size()); in TEST()
462 std::fill_n(block_buffer->begin(), src.blocks() * kBlockSize, 'a'); in TEST()
469 std::vector<uint8_t> buffer(source.blocks() * kBlockSize); in TEST()
471 ASSERT_EQ(source.blocks() * kBlockSize, buffer.size()); in TEST()
483 std::vector<uint8_t> buffer(source.blocks() * kBlockSize - 1); in TEST()
[all …]
/bootable/recovery/updater/include/private/
Dcommands.h47 size_t blocks() const { in blocks() function
48 return ranges_.blocks(); in blocks()
73 size_t blocks() const { in blocks() function
74 return ranges_.blocks(); in blocks()
111 blocks_ = ranges_.blocks(); in SourceInfo()
113 blocks_ += stash.ranges().blocks(); in SourceInfo()
138 size_t blocks() const { in blocks() function
/bootable/recovery/tests/component/
Dsideload_test.cpp58 const std::vector<std::string> blocks = { in TEST() local
64 const std::string content = android::base::Join(blocks, ""); in TEST()
/bootable/recovery/otautil/include/otautil/
Drangeset.h66 size_t blocks() const { in blocks() function
/bootable/recovery/uncrypt/
Duncrypt.cpp271 int blocks = ((sb.st_size - 1) / sb.st_blksize) + 1; in ProductBlockMap() local
272 LOG(INFO) << " file size: " << sb.st_size << " bytes, " << blocks << " blocks"; in ProductBlockMap()
/bootable/recovery/fuse_sideload/
Dfuse_sideload.cpp162 attr->blocks = (size == 0) ? 0 : (((size - 1) / attr->blksize) + 1); in fill_attr()
/bootable/recovery/applypatch/
Dimgdiff.cpp945 } else if (src_ranges.blocks() * BLOCK_SIZE + src_length <= limit) { in SplitZipModeImageWithLimit()