diff options
author | marcel <marcel@FreeBSD.org> | 2014-07-28 02:07:16 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2014-07-28 02:07:16 +0000 |
commit | 37a9f7be2fd32cf24c75d466cacac9ce83a3766b (patch) | |
tree | 66e64f422d8c9a6302c783fe4783cf8ee5e22044 /usr.bin/mkimg/gpt.c | |
parent | 920342975e733e6db05ffe8353ba9a3d29fffb23 (diff) | |
download | FreeBSD-src-37a9f7be2fd32cf24c75d466cacac9ce83a3766b.zip FreeBSD-src-37a9f7be2fd32cf24c75d466cacac9ce83a3766b.tar.gz |
MFC r268236,268264,268524,268646,268802,269021:
This brings VHD support to mkimg(1); both dynamic and fixed file formats.
Dynamic VHD and VMDK file images are now sparsely written, meaning that
"free" sectors do not occupy space.
Relnotes: yes
Diffstat (limited to 'usr.bin/mkimg/gpt.c')
-rw-r--r-- | usr.bin/mkimg/gpt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mkimg/gpt.c b/usr.bin/mkimg/gpt.c index 47fa64a..959deb3 100644 --- a/usr.bin/mkimg/gpt.c +++ b/usr.bin/mkimg/gpt.c @@ -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)); |