mkimg: Correct an off by one error in the PMBR size
The PMBR last sector should be number of sector - 1 (As stated in UEFI Spec 2.6 page 118 table 17). This fixes warning printed by linux tools like parted or fdisk. Sponsored by: Gandi.net
This commit is contained in:
parent
7f1f65918b
commit
6b14aecae7
@ -152,7 +152,7 @@ gpt_write_pmbr(lba_t blks, void *bootcode)
|
||||
uint32_t secs;
|
||||
int error;
|
||||
|
||||
secs = (blks > UINT32_MAX) ? UINT32_MAX : (uint32_t)blks;
|
||||
secs = (blks > UINT32_MAX) ? UINT32_MAX : (uint32_t)blks - 1;
|
||||
|
||||
pmbr = malloc(secsz);
|
||||
if (pmbr == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user