Lines Matching refs:gpt_e
150 static int validate_gpt_entries(gpt_header *gpt_h, gpt_entry *gpt_e) in validate_gpt_entries() argument
155 calc_crc32 = efi_crc32((const unsigned char *)gpt_e, in validate_gpt_entries()
549 gpt_header *gpt_h, gpt_entry *gpt_e) in write_gpt_table() argument
561 calc_crc32 = efi_crc32((const unsigned char *)gpt_e, in write_gpt_table()
575 pte_blk_cnt, gpt_e) != pte_blk_cnt) in write_gpt_table()
581 + 1, pte_blk_cnt, gpt_e) != pte_blk_cnt) in write_gpt_table()
597 gpt_header *gpt_h, gpt_entry *gpt_e, in gpt_fill_pte() argument
643 gpt_e[i].starting_lba = cpu_to_le64(start); in gpt_fill_pte()
652 gpt_e[i].ending_lba = gpt_h->last_usable_lba; in gpt_fill_pte()
654 gpt_e[i].ending_lba = cpu_to_le64(offset - 1); in gpt_fill_pte()
658 bin_type_guid = gpt_e[i].partition_type_guid.b; in gpt_fill_pte()
673 memcpy(gpt_e[i].partition_type_guid.b, in gpt_fill_pte()
679 bin_uuid = gpt_e[i].unique_partition_guid.b; in gpt_fill_pte()
689 memset(&gpt_e[i].attributes, 0, in gpt_fill_pte()
693 gpt_e[i].attributes.fields.legacy_bios_bootable = 1; in gpt_fill_pte()
696 efiname_len = sizeof(gpt_e[i].partition_name) in gpt_fill_pte()
700 memset(gpt_e[i].partition_name, 0, in gpt_fill_pte()
701 sizeof(gpt_e[i].partition_name)); in gpt_fill_pte()
704 gpt_e[i].partition_name[k] = in gpt_fill_pte()
791 gpt_entry *gpt_e; in gpt_restore() local
804 gpt_e = malloc_cache_aligned(size); in gpt_restore()
805 if (gpt_e == NULL) { in gpt_restore()
810 memset(gpt_e, 0, size); in gpt_restore()
818 ret = gpt_fill_pte(dev_desc, gpt_h, gpt_e, partitions, parts_count); in gpt_restore()
823 ret = write_gpt_table(dev_desc, gpt_h, gpt_e); in gpt_restore()
826 free(gpt_e); in gpt_restore()
884 gpt_entry *gpt_e; in gpt_verify_partitions() local
891 gpt_e = *gpt_pte; in gpt_verify_partitions()
900 gpt_convert_efi_name_to_char(efi_str, gpt_e[i].partition_name, in gpt_verify_partitions()
914 gpt_part_size = le64_to_cpu(gpt_e[i].ending_lba) - in gpt_verify_partitions()
915 le64_to_cpu(gpt_e[i].starting_lba) + 1; in gpt_verify_partitions()
942 le64_to_cpu(gpt_e[i].starting_lba), in gpt_verify_partitions()
945 if (le64_to_cpu(gpt_e[i].starting_lba) != partitions[i].start) { in gpt_verify_partitions()
947 efi_str, le64_to_cpu(gpt_e[i].starting_lba), in gpt_verify_partitions()
959 gpt_entry *gpt_e; in is_valid_gpt_buf() local
978 gpt_e = buf + (le64_to_cpu(gpt_h->partition_entry_lba) * in is_valid_gpt_buf()
980 if (validate_gpt_entries(gpt_h, gpt_e)) in is_valid_gpt_buf()
989 gpt_entry *gpt_e; in write_mbr_and_gpt_partitions() local
1002 gpt_e = buf + (le64_to_cpu(gpt_h->partition_entry_lba) * in write_mbr_and_gpt_partitions()
1028 if (blk_dwrite(dev_desc, lba, cnt, gpt_e) != cnt) { in write_mbr_and_gpt_partitions()
1039 if (blk_dwrite(dev_desc, lba, cnt, gpt_e) != cnt) { in write_mbr_and_gpt_partitions()