/bootable/recovery/otautil/ |
D | sysutil.cpp | 71 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() 139 uint64_t blocks = ((block_map_data.file_size() - 1) / blksize) + 1; in MapBlockFile() local 140 void* reserve = mmap(nullptr, blocks * blksize, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0); in MapBlockFile() 149 munmap(reserve, blocks * blksize); in MapBlockFile() 156 size_t remaining_size = blocks * blksize; in MapBlockFile() 163 munmap(reserve, blocks * blksize); in MapBlockFile() 173 munmap(reserve, blocks * blksize); in MapBlockFile()
|
D | rangeset.cpp | 123 for (const auto& blocks : blocks_per_group) { in Split() local 125 size_t needed = blocks; in Split()
|
/bootable/recovery/updater/ |
D | commands.cpp | 131 if (result.blocks() != src_blocks) { in ParseTargetInfoAndSourceInfo() 133 android::base::StringPrintf("mismatching block count: %zu (%s) vs %zu", result.blocks(), in ParseTargetInfoAndSourceInfo() 168 if (src_blocks != result.blocks()) { in ParseTargetInfoAndSourceInfo() 169 *err = android::base::StringPrintf("mismatching block count: %zu (%s) vs %zu", result.blocks(), in ParseTargetInfoAndSourceInfo() 321 size_t start = locs.blocks(); in MoveRange() 324 size_t blocks = it->second - it->first; in MoveRange() local 325 start -= blocks; in MoveRange() 326 memmove(to + (it->first * block_size), from + (start * block_size), blocks * block_size); in MoveRange() 334 if (buffer->size() < blocks() * block_size) { in ReadAll() 350 std::vector<uint8_t> stash_buffer(stash.blocks() * block_size); in ReadAll() [all …]
|
D | blockimg.cpp | 249 return tgt_.blocks() * BLOCKSIZE - bytes_written_; in AvailableSpace() 594 locs = RangeSet(std::vector<Range>{ Range{ 0, src.blocks() } }); in PrintHashForCorruptedSourceBlocks() 601 CHECK_EQ(src.blocks(), locs.blocks()); in PrintHashForCorruptedSourceBlocks() 604 LOG(INFO) << "printing hash in hex for " << src.blocks() << " source blocks"; in PrintHashForCorruptedSourceBlocks() 605 for (size_t i = 0; i < src.blocks(); i++) { in PrintHashForCorruptedSourceBlocks() 623 CHECK_EQ(src.blocks() * BLOCKSIZE, buffer.size()); in PrintHashForCorruptedStashedBlocks() 625 for (size_t i = 0; i < src.blocks(); i++) { in PrintHashForCorruptedStashedBlocks() 645 std::vector<uint8_t> buffer(src.blocks() * BLOCKSIZE); in PrintHashForMissingStashedBlocks() 654 const size_t blocks, bool printerror) { in VerifyBlocks() argument 658 SHA1(data, blocks * BLOCKSIZE, digest); in VerifyBlocks() [all …]
|
/bootable/recovery/tests/unit/ |
D | rangeset_test.cpp | 43 ASSERT_EQ(static_cast<size_t>(9), rs.blocks()); in TEST() 49 ASSERT_EQ(static_cast<size_t>(14), rs2.blocks()); in TEST() 97 ASSERT_EQ(static_cast<size_t>(12), rs.blocks()); in TEST() 158 size_t rs6_blocks = rs6.blocks(); in TEST() 168 sum += element.blocks(); in TEST() 279 ASSERT_EQ(static_cast<size_t>(10), rs.blocks()); in TEST() 282 ASSERT_EQ(static_cast<size_t>(11), rs.blocks()); in TEST() 287 ASSERT_EQ(static_cast<size_t>(16), rs.blocks()); in TEST() 292 ASSERT_EQ(static_cast<size_t>(22), rs.blocks()); in TEST()
|
D | commands_test.cpp | 63 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 …]
|
D | fuse_sideload_test.cpp | 62 const std::vector<std::string> blocks = { in TEST() local 68 const std::string content = android::base::Join(blocks, ""); in TEST()
|
/bootable/recovery/updater/include/private/ |
D | commands.h | 47 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/otautil/include/otautil/ |
D | rangeset.h | 73 size_t blocks() const { in blocks() function
|
/bootable/recovery/uncrypt/ |
D | uncrypt.cpp | 271 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/ |
D | fuse_sideload.cpp | 162 attr->blocks = (size == 0) ? 0 : (((size - 1) / attr->blksize) + 1); in fill_attr()
|
/bootable/recovery/applypatch/ |
D | imgdiff.cpp | 970 } else if (src_ranges.blocks() * BLOCK_SIZE + src_length <= limit) { in SplitZipModeImageWithLimit()
|