1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-16 12:14:01 +02:00

base-files: upgrade: fix efi partitions size calculation

We were missing (not using) the last sector of each partition,
compared with the output of gparted.

Signed-off-by: Javier Marcet <javier@marcet.info>
[moved the dot]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 018ada5403)
This commit is contained in:
Javier Marcet 2020-04-04 17:52:29 +02:00 committed by Christian Lamparter
parent 8166bbf680
commit e81dd8a10a

View File

@ -267,7 +267,7 @@ get_partitions() { # <device> <filename>
local type="$1"
local lba="$(( $(hex_le32_to_cpu $4) * 0x100000000 + $(hex_le32_to_cpu $3) ))"
local end="$(( $(hex_le32_to_cpu $6) * 0x100000000 + $(hex_le32_to_cpu $5) ))"
local num="$(( $end - $lba ))"
local num="$(( $end - $lba + 1 ))"
[ "$type" = "00000000000000000000000000000000" ] && continue