Lines Matching refs:gpt_e
142 static int validate_gpt_entries(gpt_header *gpt_h, gpt_entry *gpt_e) in validate_gpt_entries() argument
147 calc_crc32 = efi_crc32((const unsigned char *)gpt_e, in validate_gpt_entries()
390 gpt_header *gpt_h, gpt_entry *gpt_e) in write_gpt_table() argument
402 calc_crc32 = efi_crc32((const unsigned char *)gpt_e, in write_gpt_table()
416 pte_blk_cnt, gpt_e) != pte_blk_cnt) in write_gpt_table()
422 + 1, pte_blk_cnt, gpt_e) != pte_blk_cnt) in write_gpt_table()
438 gpt_header *gpt_h, gpt_entry *gpt_e, in gpt_fill_pte() argument
484 gpt_e[i].starting_lba = cpu_to_le64(start); in gpt_fill_pte()
493 gpt_e[i].ending_lba = gpt_h->last_usable_lba; in gpt_fill_pte()
495 gpt_e[i].ending_lba = cpu_to_le64(offset - 1); in gpt_fill_pte()
499 bin_type_guid = gpt_e[i].partition_type_guid.b; in gpt_fill_pte()
514 memcpy(gpt_e[i].partition_type_guid.b, in gpt_fill_pte()
520 bin_uuid = gpt_e[i].unique_partition_guid.b; in gpt_fill_pte()
530 memset(&gpt_e[i].attributes, 0, in gpt_fill_pte()
534 gpt_e[i].attributes.fields.legacy_bios_bootable = 1; in gpt_fill_pte()
537 efiname_len = sizeof(gpt_e[i].partition_name) in gpt_fill_pte()
541 memset(gpt_e[i].partition_name, 0, in gpt_fill_pte()
542 sizeof(gpt_e[i].partition_name)); in gpt_fill_pte()
545 gpt_e[i].partition_name[k] = in gpt_fill_pte()
632 gpt_entry *gpt_e; in gpt_restore() local
645 gpt_e = malloc_cache_aligned(size); in gpt_restore()
646 if (gpt_e == NULL) { in gpt_restore()
651 memset(gpt_e, 0, size); in gpt_restore()
659 ret = gpt_fill_pte(dev_desc, gpt_h, gpt_e, partitions, parts_count); in gpt_restore()
664 ret = write_gpt_table(dev_desc, gpt_h, gpt_e); in gpt_restore()
667 free(gpt_e); in gpt_restore()
716 gpt_entry *gpt_e; in gpt_verify_partitions() local
723 gpt_e = *gpt_pte; in gpt_verify_partitions()
732 gpt_convert_efi_name_to_char(efi_str, gpt_e[i].partition_name, in gpt_verify_partitions()
746 gpt_part_size = le64_to_cpu(gpt_e[i].ending_lba) - in gpt_verify_partitions()
747 le64_to_cpu(gpt_e[i].starting_lba) + 1; in gpt_verify_partitions()
774 le64_to_cpu(gpt_e[i].starting_lba), in gpt_verify_partitions()
777 if (le64_to_cpu(gpt_e[i].starting_lba) != partitions[i].start) { in gpt_verify_partitions()
779 efi_str, le64_to_cpu(gpt_e[i].starting_lba), in gpt_verify_partitions()
791 gpt_entry *gpt_e; in is_valid_gpt_buf() local
801 gpt_e = buf + (le64_to_cpu(gpt_h->partition_entry_lba) * in is_valid_gpt_buf()
803 if (validate_gpt_entries(gpt_h, gpt_e)) in is_valid_gpt_buf()
812 gpt_entry *gpt_e; in write_mbr_and_gpt_partitions() local
825 gpt_e = buf + (le64_to_cpu(gpt_h->partition_entry_lba) * in write_mbr_and_gpt_partitions()
851 if (blk_dwrite(dev_desc, lba, cnt, gpt_e) != cnt) { in write_mbr_and_gpt_partitions()
862 if (blk_dwrite(dev_desc, lba, cnt, gpt_e) != cnt) { in write_mbr_and_gpt_partitions()