Changeset 8c5d686 in mainline


Ignore:
Timestamp:
2024-06-13T08:38:24Z (3 weeks ago)
Author:
Miroslav Cimerman <mc@…>
Parents:
d85d4f2
git-author:
Miroslav Cimerman <mc@…> (2024-06-12 21:19:45)
git-committer:
Miroslav Cimerman <mc@…> (2024-06-13 08:38:24)
Message:

Encode and decode GPT UUIDs in little-endian format

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/label/src/gpt.c

    rd85d4f2 r8c5d686  
    443443                gpt_hdr->first_usable_lba = host2uint64_t_le(ba_min);
    444444                gpt_hdr->last_usable_lba = host2uint64_t_le(ba_max);
    445                 uuid_encode(&disk_uuid, gpt_hdr->disk_guid);
     445                uuid_encode_le(&disk_uuid, gpt_hdr->disk_guid);
    446446                gpt_hdr->entry_lba = host2uint64_t_le(ptba[i]);
    447447                gpt_hdr->num_entries = host2uint32_t_le(num_entries);
     
    812812
    813813        memset(pte, 0, sizeof(gpt_entry_t));
    814         uuid_encode(&part->ptype.t.uuid, pte->part_type);
    815         uuid_encode(&part->part_uuid, pte->part_id);
     814        uuid_encode_le(&part->ptype.t.uuid, pte->part_type);
     815        uuid_encode_le(&part->part_uuid, pte->part_id);
    816816        pte->start_lba = host2uint64_t_le(part->block0);
    817817        pte->end_lba = host2uint64_t_le(eblock);
     
    849849        part->nblocks = b1 - b0 + 1;
    850850        part->ptype.fmt = lptf_uuid;
    851         uuid_decode(pte->part_type, &part->ptype.t.uuid);
    852         uuid_decode(pte->part_id, &part->part_uuid);
     851        uuid_decode_le(pte->part_type, &part->ptype.t.uuid);
     852        uuid_decode_le(pte->part_id, &part->part_uuid);
    853853
    854854        part->label = label;
Note: See TracChangeset for help on using the changeset viewer.