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()
601 gpt_header *gpt_h, gpt_entry *gpt_e) in write_gpt_table() argument
615 calc_crc32 = efi_crc32((const unsigned char *)gpt_e, in write_gpt_table()
629 pte_blk_cnt, gpt_e) != pte_blk_cnt) in write_gpt_table()
635 + 1) * sector, pte_blk_cnt, gpt_e) != pte_blk_cnt) in write_gpt_table()
651 gpt_header *gpt_h, gpt_entry *gpt_e, in gpt_fill_pte() argument
697 gpt_e[i].starting_lba = cpu_to_le64(start); in gpt_fill_pte()
706 gpt_e[i].ending_lba = gpt_h->last_usable_lba; in gpt_fill_pte()
708 gpt_e[i].ending_lba = cpu_to_le64(offset - 1); in gpt_fill_pte()
712 bin_type_guid = gpt_e[i].partition_type_guid.b; in gpt_fill_pte()
727 memcpy(gpt_e[i].partition_type_guid.b, in gpt_fill_pte()
733 bin_uuid = gpt_e[i].unique_partition_guid.b; in gpt_fill_pte()
743 memset(&gpt_e[i].attributes, 0, in gpt_fill_pte()
747 gpt_e[i].attributes.fields.legacy_bios_bootable = 1; in gpt_fill_pte()
750 efiname_len = sizeof(gpt_e[i].partition_name) in gpt_fill_pte()
754 memset(gpt_e[i].partition_name, 0, in gpt_fill_pte()
755 sizeof(gpt_e[i].partition_name)); in gpt_fill_pte()
758 gpt_e[i].partition_name[k] = in gpt_fill_pte()
850 gpt_entry *gpt_e; in gpt_restore() local
862 gpt_e = malloc_cache_aligned(size); in gpt_restore()
863 if (gpt_e == NULL) { in gpt_restore()
868 memset(gpt_e, 0, size); in gpt_restore()
876 ret = gpt_fill_pte(dev_desc, gpt_h, gpt_e, partitions, parts_count); in gpt_restore()
881 ret = write_gpt_table(dev_desc, gpt_h, gpt_e); in gpt_restore()
884 free(gpt_e); in gpt_restore()
942 gpt_entry *gpt_e; in gpt_verify_partitions() local
949 gpt_e = *gpt_pte; in gpt_verify_partitions()
958 gpt_convert_efi_name_to_char(efi_str, gpt_e[i].partition_name, in gpt_verify_partitions()
972 gpt_part_size = le64_to_cpu(gpt_e[i].ending_lba) - in gpt_verify_partitions()
973 le64_to_cpu(gpt_e[i].starting_lba) + 1; in gpt_verify_partitions()
1000 le64_to_cpu(gpt_e[i].starting_lba), in gpt_verify_partitions()
1003 if (le64_to_cpu(gpt_e[i].starting_lba) != partitions[i].start) { in gpt_verify_partitions()
1005 efi_str, le64_to_cpu(gpt_e[i].starting_lba), in gpt_verify_partitions()
1017 gpt_entry *gpt_e; in is_valid_gpt_buf() local
1036 gpt_e = buf + (le64_to_cpu(gpt_h->partition_entry_lba) * in is_valid_gpt_buf()
1038 if (validate_gpt_entries(gpt_h, gpt_e)) in is_valid_gpt_buf()
1047 gpt_entry *gpt_e; in write_mbr_and_gpt_partitions() local
1065 gpt_e = buf + (le64_to_cpu(gpt_h->partition_entry_lba) * in write_mbr_and_gpt_partitions()
1091 if (blk_dwrite(dev_desc, lba, cnt, gpt_e) != cnt) { in write_mbr_and_gpt_partitions()
1102 if (blk_dwrite(dev_desc, lba, cnt, gpt_e) != cnt) { in write_mbr_and_gpt_partitions()