Added support for generic loopback partition name parsing
Changed SplitPartitionName/MakePartitionName functions to
support generic device partition names where partition number
is separated from the disk name with 'p'. This used to be the
case only for MMC devices (/dev/mmcblk). But now, as long
as the disk name ends with a digit, then the following partition
name is assumed to be separated by 'p'.
Also added special case for NAND devices (/dev/ubiblock) to
be split and merged too, in order to make it possible to
use the split/merge functions with KernelDeviceOfBootDevice().
Updated KernelDeviceOfBootDevice() and GetInstallDev() to use
the SplitPartitionName/MakePartitionName functions.
Finally, updated the unit tests for ubiblock devices and added
unit tests for MakePartitionName function.
BUG=chromium:354494
TEST=Added/updated unit tests. All unit tests pass.
Change-Id: I8a813e13b315d118027bd84f179a0e569d0d4014
Reviewed-on: https://chromium-review.googlesource.com/191785
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
2 files changed