Added support for PARTUUID=

The Linux kernel expects partitions that are identified by uuid,
to have the the uuid prefixed by "PARTUUID=" and an optional suffix
of "PARTRNOFF=%d".

The change adds additional pattern matching for these strings.

This will also let get rid of custom uuid processing in dm-verity,
dm-bootcache and dm-verity-chromeos.

BUG=chromium:224066
TEST=security_test_image with old and new command line
BRANCH=none

Change-Id: I71b89dd1df8d7ccd5768c2784078bb869d546bf3
Reviewed-on: https://gerrit.chromium.org/gerrit/51303
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Paul Taysom <taysom@chromium.org>
Tested-by: Paul Taysom <taysom@chromium.org>
This commit is contained in:
Paul Taysom
2013-05-15 09:23:39 -07:00
committed by ChromeBot
parent 416bdc680c
commit ed92adaddf

View File

@@ -43,7 +43,7 @@ dmparams_mangle() {
# with MAGIC_HASH. The parameter is positional.
if [[ $dmparams == *bootcache* ]]; then
dmparams=$(echo $dmparams |
sed -r 's/(bootcache %U\+1 [0-9]+) [0-9a-fA-F]+/\1 MAGIC_HASH/')
sed -r 's:(bootcache (PARTUUID=)?%U(/PARTNROFF=|\+)1 [0-9]+) [0-9a-fA-F]+:\1 MAGIC_HASH:')
fi
echo $dmparams
}