]> git.baikalelectronics.ru Git - uboot.git/commit
efi_loader: Fix partition offsets
authorAlexander Graf <agraf@suse.de>
Fri, 1 Dec 2017 15:10:33 +0000 (16:10 +0100)
committerAlexander Graf <agraf@suse.de>
Fri, 1 Dec 2017 21:30:47 +0000 (22:30 +0100)
commit4557a33e40a583fe1ae4c8bfeaf06f8113301a1e
tree2c4f9c68761b3573d716ed1e16f633a8eff77e0d
parent437ffd0bca312570298fc1bffc0c4ca661320d76
efi_loader: Fix partition offsets

Commit 9ba50d378e (efi_loader: use proper device-paths for partitions) tried
to introduce the el torito scheme to all partition table types: Spawn
individual disk objects for each partition on a disk.

Unfortunately, that code ended up creating partitions with offset=0 which meant
that anyone accessing these objects gets data from the raw block device instead
of the partition.

Furthermore, all the el torito logic to spawn devices for partitions was
duplicated. So let's merge the two code paths and give partition disk objects
good offsets to work from, so that payloads can actually make use of them.

Fixes: 9ba50d378e (efi_loader: use proper device-paths for partitions)
Reported-by: Yousaf Kaukab <yousaf.kaukab@suse.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_disk.c