Changeset 70815a24 in mainline
- Timestamp:
- 2015-07-09T22:00:34Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b7a4d06
- Parents:
- bf7ddde
- Location:
- uspace/lib
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/Makefile
rbf7ddde r70815a24 154 154 generic/assert.c \ 155 155 generic/pio_trace.c \ 156 generic/uuid.c \ 156 157 generic/vbd.c \ 157 158 generic/vol.c -
uspace/lib/label/include/types/liblabel.h
rbf7ddde r70815a24 41 41 #include <sys/types.h> 42 42 #include <vol.h> 43 #include <uuid.h> 43 44 44 45 typedef struct label label_t; … … 96 97 /** Partition type */ 97 98 uint64_t ptype; 99 /** Partition UUID */ 100 uuid_t part_uuid; 98 101 }; 99 102 -
uspace/lib/label/src/gpt.c
rbf7ddde r70815a24 40 40 #include <mem.h> 41 41 #include <stdlib.h> 42 #include <uuid.h> 42 43 43 44 #include "std/gpt.h" … … 335 336 uint64_t resv_blocks; 336 337 uint32_t pt_crc; 338 uuid_t disk_uuid; 337 339 int i, j; 338 340 int rc; … … 399 401 goto error; 400 402 } 403 404 uuid_generate(&disk_uuid); 401 405 402 406 for (j = 0; j < 8; ++j) … … 409 413 gpt_hdr->first_usable_lba = host2uint64_t_le(ba_min); 410 414 gpt_hdr->last_usable_lba = host2uint64_t_le(ba_max); 411 //gpt_hdr->disk_guid XXX415 uuid_encode(&disk_uuid, gpt_hdr->disk_guid); 412 416 gpt_hdr->entry_lba = host2uint64_t_le(ptba[i]); 413 417 gpt_hdr->num_entries = host2uint32_t_le(num_entries); … … 594 598 part->nblocks = pspec->nblocks; 595 599 part->ptype = pspec->ptype; 600 uuid_generate(&part->part_uuid); 596 601 597 602 /* Prepare partition table entry */ … … 651 656 memset(pte, 0, sizeof(gpt_entry_t)); 652 657 pte->part_type[0] = 0x12; 653 pte->part_id[0] = 0x34;658 uuid_encode(&part->part_uuid, pte->part_id); 654 659 pte->start_lba = host2uint64_t_le(part->block0); 655 660 pte->end_lba = host2uint64_t_le(eblock); … … 686 691 part->block0 = b0; 687 692 part->nblocks = b1 - b0 + 1; 693 uuid_decode(pte->part_id, &part->part_uuid); 688 694 689 695 part->label = label;
Note:
See TracChangeset
for help on using the changeset viewer.