diff options
author | David Anderson <dvander@google.com> | 2018-07-31 13:34:14 -0700 |
---|---|---|
committer | David Anderson <dvander@google.com> | 2018-08-01 17:41:29 -0700 |
commit | 2e755e38af9e73b802c229e88a3de4e48eaff805 (patch) | |
tree | f37784a345dee91b90e6aef8be5c8c86329af9b9 /fs_mgr/liblp/io_test.cpp | |
parent | d5f825c78bc98027a485d8bdecd14e8563a449ba (diff) |
liblp: Add a ResizePartition helper to MetadataBuilder.
This change is to assist with implementing the fastbootd "resize-partition"
command. The GrowPartition and ShrinkPartition functions are now
private.
Bug: 78793464
Test: N/A
Change-Id: Ic66a3052359e2558663272ff6e014704206b197e
Diffstat (limited to 'fs_mgr/liblp/io_test.cpp')
-rw-r--r-- | fs_mgr/liblp/io_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs_mgr/liblp/io_test.cpp b/fs_mgr/liblp/io_test.cpp index bbbedc761..638f4b310 100644 --- a/fs_mgr/liblp/io_test.cpp +++ b/fs_mgr/liblp/io_test.cpp @@ -85,7 +85,7 @@ static bool AddDefaultPartitions(MetadataBuilder* builder) { if (!system) { return false; } - return builder->GrowPartition(system, 24 * 1024); + return builder->ResizePartition(system, 24 * 1024); } // Create a temporary disk and flash it with the default partition setup. @@ -345,7 +345,7 @@ TEST(liblp, TooManyPartitions) { ASSERT_NE(partition, nullptr); // Add one extent to any partition to fill up more space - we're at 508 // bytes after this, out of 512. - ASSERT_TRUE(builder->GrowPartition(partition, 1024)); + ASSERT_TRUE(builder->ResizePartition(partition, 1024)); unique_ptr<LpMetadata> exported = builder->Export(); ASSERT_NE(exported, nullptr); |