mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-05 12:56:08 +00:00
Fix a bug in the size of the PMBR partition. Since the partition starts
at LBA 1, the size is not the mediasize in sectors, but one less.
This commit is contained in:
parent
c3b36c8f05
commit
97a337185f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=161135
@ -123,6 +123,8 @@ write_pmbr(int fd, const struct disk *disk)
|
||||
|
||||
error = 0;
|
||||
nsects = disk->media_size / disk->sector_size;
|
||||
nsects--; /* The GPT starts at LBA 1 */
|
||||
|
||||
buffer = calloc(disk->sector_size, 1);
|
||||
if (buffer == NULL)
|
||||
return (ENOMEM);
|
||||
|
Loading…
Reference in New Issue
Block a user