cmd: gpt: fix the wrong size parse for the last partition
authorKever Yang <kever.yang@rock-chips.com>
Fri, 29 Jul 2016 03:12:18 +0000 (11:12 +0800)
committerTom Rini <trini@konsulko.com>
Sat, 6 Aug 2016 00:55:16 +0000 (20:55 -0400)
commitc2fdd34569145ad281aeea5ef16fff83d7075830
tree596fddf6ec6cc840d5d092651068c29866aa00a2
parent584550d76ad113a072470b806cc785141632b9f5
cmd: gpt: fix the wrong size parse for the last partition

The calculation of "dev_desc->lba - 34  - 1 - offset" is not correct for
size '-', because both fist_usable_lba and last_usable_lba will remain
34 sectors.

We can simply use 0 for size '-' because the part_efi module will decode
the size and auto extend the size to maximum available size.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
cmd/gpt.c
disk/part_efi.c