]> git.baikalelectronics.ru Git - uboot.git/commit
cmd: fix gpt enumerate
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 26 Aug 2023 01:53:42 +0000 (03:53 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 27 Aug 2023 06:21:07 +0000 (08:21 +0200)
commitf25ec6574b89bdf5013460ae5fe5e6b16bfa58c4
tree46bbe0e1d6384a30f2d7096284cfae23dadc4e91
parentf47e9afa64697637fcf319e22c00459fe71ffaf8
cmd: fix gpt enumerate

Do not assume that partitions are numbered continuously starting at 1.

Only a single partition table type can exist on a block device. If we found
a GPT partition table, we must not re-enumerate with the MBR partition
driver which would find the protective partition.

Fixes: d49644d4b566 ("cmd: gpt: add eMMC and GPT support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/gpt.c