Home
last modified time | relevance | path

Searched refs:block_map_data (Results 1 – 2 of 2) sorted by relevance

/bootable/recovery/otautil/
Dsysutil.cpp122 auto block_map_data = BlockMapData::ParseBlockMapFile(filename); in MapBlockFile() local
123 if (!block_map_data) { in MapBlockFile()
127 if (block_map_data.file_size() > std::numeric_limits<size_t>::max()) { in MapBlockFile()
128 LOG(ERROR) << "File size is too large for mmap " << block_map_data.file_size(); in MapBlockFile()
133 uint32_t blksize = block_map_data.block_size(); in MapBlockFile()
134 uint64_t blocks = ((block_map_data.file_size() - 1) / blksize) + 1; in MapBlockFile()
141 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(block_map_data.path().c_str(), O_RDONLY))); in MapBlockFile()
143 PLOG(ERROR) << "failed to open block device " << block_map_data.path(); in MapBlockFile()
152 for (const auto& [start, end] : block_map_data.block_ranges()) { in MapBlockFile()
173 length = block_map_data.file_size(); in MapBlockFile()
[all …]
/bootable/recovery/tests/unit/
Dsysutil_test.cpp41 auto block_map_data = BlockMapData::ParseBlockMapFile(temp_file.path); in TEST() local
42 ASSERT_EQ("/dev/abc", block_map_data.path()); in TEST()
43 ASSERT_EQ(49652, block_map_data.file_size()); in TEST()
44 ASSERT_EQ(4096, block_map_data.block_size()); in TEST()
50 block_map_data.block_ranges()); in TEST()
76 auto block_map_data = BlockMapData::ParseBlockMapFile(temp_file.path); in TEST() local
77 ASSERT_EQ("/dev/abc", block_map_data.path()); in TEST()
78 ASSERT_EQ(42949672950, block_map_data.file_size()); in TEST()
79 ASSERT_EQ(4294967295, block_map_data.block_size()); in TEST()