Don't divide the start and end of the chunk by the sector size when
filling in the GPT entry. Both are already in sector numbers (LBA) and exactly what we need for the entry. We now write a structurally correct GPT partitioning.
This commit is contained in:
parent
89eaefd6eb
commit
b6733aeb68
@ -264,8 +264,8 @@ update_gpt(int fd, const struct disk *disk, struct gpt_hdr *hdr,
|
||||
} else
|
||||
idx = CHUNK_FTOI(c->flags);
|
||||
|
||||
tbl[idx].ent_lba_start = c->offset / disk->sector_size;
|
||||
tbl[idx].ent_lba_end = c->end / disk->sector_size;
|
||||
tbl[idx].ent_lba_start = c->offset;
|
||||
tbl[idx].ent_lba_end = c->end;
|
||||
}
|
||||
|
||||
hdr[0].hdr_crc_table = crc32(tbl,
|
||||
|
Loading…
Reference in New Issue
Block a user