Changeset c15296b in mainline


Ignore:
Timestamp:
2024-06-13T16:03:39Z (7 months ago)
Author:
jxsvoboda <5887334+jxsvoboda@…>
Branches:
master
Children:
df1b4a8
Parents:
3887aab2
git-author:
Miroslav Cimerman <mc@…> (2024-06-12 21:19:45)
git-committer:
jxsvoboda <5887334+jxsvoboda@…> (2024-06-13 16:03:39)
Message:

Encode and decode GPT UUIDs in little-endian format

File:
1 edited

Legend:

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

    r3887aab2 rc15296b  
    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.