diff options
author | David Anderson <dvander@google.com> | 2019-08-15 13:21:43 -0700 |
---|---|---|
committer | David Anderson <dvander@google.com> | 2019-08-15 16:39:48 -0700 |
commit | 4929df0c44c94e6c4163860daecbcb9b379ae24e (patch) | |
tree | ee4aa4a9fb827558da0228af6c0d10ab886a5059 /fastboot/fastboot.cpp | |
parent | 15aa9540df7dc241c5ab87ce04452fa072fd7038 (diff) |
fs_mgr: Allow using major:minor device strings in CreateLogicalPartition.
IPartitionOpener is useful for writing gtests, however, it can't easily
be used with CreateLogicalPartition. fs_mgr assumes the super partition
name will map to /dev/block/by-name/super whereas in tests we want to
redirect it to a different block device.
This CL makes two changes. First, it adds a new method to IPartitionOpener
to return a "device string" for a device name. The string must either be
an absolute path (for example /dev/block/by-name/super) or a major:minor
sequence, since device-mapper will accept either.
Second, CreateLogicalPartition now accepts an optional IPartitionOpener.
When converting block devices to paths, it uses the opener instead of
automatically prepending /dev/block/by-name.
Bug: 139204329
Test: liblp_test gtest
libsnapshot_test gtest
Change-Id: Id6b3120cc2ef5c0dd941b29ff96215ad3c8ec848
Diffstat (limited to 'fastboot/fastboot.cpp')
0 files changed, 0 insertions, 0 deletions