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
2464f65e4a
commit
f46a656239
@ -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