Home
last modified time | relevance | path

Searched refs:AlignTo (Results 1 – 4 of 4) sorted by relevance

/system/core/fs_mgr/liblp/
Dutility_test.cpp63 std::optional<uint64_t> AlignTo(uint64_t base, uint32_t alignment) { in AlignTo() function
65 if (!AlignTo(base, alignment, &r)) { in AlignTo()
71 TEST(liblp, AlignTo) { in TEST() argument
72 EXPECT_EQ(AlignTo(37, 0), std::optional<uint64_t>(37)); in TEST()
73 EXPECT_EQ(AlignTo(1024, 1024), std::optional<uint64_t>(1024)); in TEST()
74 EXPECT_EQ(AlignTo(555, 1024), std::optional<uint64_t>(1024)); in TEST()
75 EXPECT_EQ(AlignTo(555, 1000), std::optional<uint64_t>(1000)); in TEST()
76 EXPECT_EQ(AlignTo(0, 1024), std::optional<uint64_t>(0)); in TEST()
77 EXPECT_EQ(AlignTo(54, 32), std::optional<uint64_t>(64)); in TEST()
78 EXPECT_EQ(AlignTo(32, 32), std::optional<uint64_t>(32)); in TEST()
[all …]
Dutility.h72 bool AlignTo(T base, uint32_t alignment, T* out) { in AlignTo() function
Dbuilder.cpp406 if (!AlignTo(metadata_max_size, LP_SECTOR_SIZE, &metadata_max_size)) { in Init()
443 ok = AlignTo(free_area_start, out.alignment, &free_area_start); in Init()
445 ok = AlignTo(free_area_start, logical_block_size, &free_area_start); in Init()
488 ok = AlignTo(free_area_start, super.alignment, &free_area_start); in Init()
490 ok = AlignTo(free_area_start, logical_block_size, &free_area_start); in Init()
991 if (!AlignTo(lba, block_device.alignment, out)) { in AlignSector()
994 if (!AlignTo(*out, LP_SECTOR_SIZE, out)) { in AlignSector()
1073 if (!AlignTo(requested_size, geometry_.logical_block_size, &aligned_size)) { in ResizePartition()
Dbuilder_test.cpp233 ASSERT_TRUE(AlignTo(lba, device_info.alignment, &aligned_lba)); in TEST_F()