Home
last modified time | relevance | path

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

/bootable/recovery/otautil/
DSysUtil.cpp92 size_t blocks; in MapBlockFile() local
94 blocks = ((size - 1) / blksize) + 1; in MapBlockFile()
96 if (size == 0 || blksize == 0 || blocks > SIZE_MAX / blksize || range_count == 0 || in MapBlockFile()
104 void* reserve = mmap(nullptr, blocks * blksize, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0); in MapBlockFile()
114 munmap(reserve, blocks * blksize); in MapBlockFile()
121 size_t remaining_size = blocks * blksize; in MapBlockFile()
156 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/tests/component/
Dsideload_test.cpp45 const std::vector<std::string> blocks = { in TEST() local
51 const std::string content = android::base::Join(blocks, ""); in TEST()
56 vtab.read_block = [&blocks](uint32_t block, uint8_t* buffer, uint32_t fetch_size) { in TEST()
58 blocks[block].copy(reinterpret_cast<char*>(buffer), fetch_size); in TEST()
/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()
254 ASSERT_EQ(static_cast<size_t>(10), rs.blocks()); in TEST()
257 ASSERT_EQ(static_cast<size_t>(11), rs.blocks()); in TEST()
262 ASSERT_EQ(static_cast<size_t>(16), rs.blocks()); in TEST()
267 ASSERT_EQ(static_cast<size_t>(22), rs.blocks()); in TEST()
/bootable/recovery/otautil/include/otautil/
Drangeset.h66 size_t blocks() const { in blocks() function
/bootable/recovery/uncrypt/
Duncrypt.cpp281 int blocks = ((sb.st_size-1) / sb.st_blksize) + 1; in produce_block_map() local
282 LOG(INFO) << " file size: " << sb.st_size << " bytes, " << blocks << " blocks"; in produce_block_map()
/bootable/recovery/applypatch/
Dimgdiff.cpp945 } else if (src_ranges.blocks() * BLOCK_SIZE + src_length <= limit) { in SplitZipModeImageWithLimit()