Use mkimg_uuid() instead of uuidgen().

This commit is contained in:
marcel 2014-06-28 04:19:43 +00:00
parent 787496f854
commit a19c1b095e

4
gpt.c
View File

@ -211,7 +211,7 @@ gpt_mktbl(u_int tblsz)
STAILQ_FOREACH(part, &partlist, link) {
ent = tbl + part->index;
gpt_uuid_enc(&ent->ent_type, ALIAS_TYPE2PTR(part->type));
uuidgen(&uuid, 1);
mkimg_uuid(&uuid);
gpt_uuid_enc(&ent->ent_uuid, &uuid);
le64enc(&ent->ent_lba_start, part->block);
le64enc(&ent->ent_lba_end, part->block + part->size - 1);
@ -279,7 +279,7 @@ gpt_write(lba_t imgsz, void *bootcode)
le32enc(&hdr->hdr_size, offsetof(struct gpt_hdr, padding));
le64enc(&hdr->hdr_lba_start, 2 + tblsz);
le64enc(&hdr->hdr_lba_end, imgsz - tblsz - 2);
uuidgen(&uuid, 1);
mkimg_uuid(&uuid);
gpt_uuid_enc(&hdr->hdr_uuid, &uuid);
le32enc(&hdr->hdr_entries, nparts);
le32enc(&hdr->hdr_entsz, sizeof(struct gpt_ent));