]> git.baikalelectronics.ru Git - uboot.git/commit
efi_loader: correct EFI_BLOCK_IO_PROTOCOL.Media.LastBlock
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 23 Jan 2021 05:52:21 +0000 (06:52 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 23 Jan 2021 06:56:54 +0000 (07:56 +0100)
commit79b52045852aed6f375d0233b2e71c9ad0b66476
tree8360f2c6102514b4896233f4623e57797e0db3b5
parent2d4bf7313dd95832f6abfe5e3014db3c136850e4
efi_loader: correct EFI_BLOCK_IO_PROTOCOL.Media.LastBlock

The field Media.LastBlock of the EFI_BLOCK_IO_PROTOCOL.Media was filled
incorrectly both for block devices as well as for partitions.

The field must be filled with the index of the last logical block (LBA):

* block devices: device size minus 1
* partitions: partition size minus 1

Reported-by: Alexander von Gluck IV <kallisti5@unixzen.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_disk.c