platform/msm_shared/partition_parser.c
static unsigned int
write_gpt_partition_array(unsigned char *header,
			  unsigned int partition_array_start,
			  unsigned int array_size)
{
	unsigned int ret = MMC_BOOT_E_INVAL;
	unsigned long long partition_entry_lba;
	unsigned long long partition_entry_array_start_location;

	partition_entry_lba =
	    GET_LLWORD_FROM_BYTE(&header[PARTITION_ENTRIES_OFFSET]);
	partition_entry_array_start_location = partition_entry_lba * BLOCK_SIZE;

	ret = mmc_write(partition_entry_array_start_location, array_size,
			(unsigned int *)partition_array_start);
	if (ret) {
		dprintf(CRITICAL,
			"GPT: FAILED to write the partition entry array\n");
		goto end;
	}

 end:
	return ret;
}
/*
 * Write the GPT Partition Entry Array to the MMC.
 */
Write the GPT Partition Entry Array to the MMC.
Write the GPT Partition Entry Array to the MMC .
static unsigned int
write_gpt_partition_array(unsigned char *header,
			  unsigned int partition_array_start,
			  unsigned int array_size)
{
	unsigned int ret = MMC_BOOT_E_INVAL;
	unsigned long long partition_entry_lba;
	unsigned long long partition_entry_array_start_location;
	partition_entry_lba =
	    GET_LLWORD_FROM_BYTE(&header[PARTITION_ENTRIES_OFFSET]);
	partition_entry_array_start_location = partition_entry_lba * BLOCK_SIZE;
	ret = mmc_write(partition_entry_array_start_location, array_size,
			(unsigned int *)partition_array_start);
	if (ret) {
		dprintf(CRITICAL,
			"GPT: FAILED to write the partition entry array\n");
		goto end;
	}
 end:
	return ret;
}
static unsigned int write_gpt_partition_array ( unsigned char * header , unsigned int partition_array_start , unsigned int array_size ) { unsigned int ret = MMC_BOOT_E_INVAL ; unsigned long long partition_entry_lba ; unsigned long long partition_entry_array_start_location ; partition_entry_lba = GET_LLWORD_FROM_BYTE ( & header [ PARTITION_ENTRIES_OFFSET ] ) ; partition_entry_array_start_location = partition_entry_lba * BLOCK_SIZE ; ret = mmc_write ( partition_entry_array_start_location , array_size , ( unsigned int * ) partition_array_start ) ; if ( ret ) { dprintf ( CRITICAL , " \n " ) ; goto end ; } end : return ret ; }
Write the GPT Partition Entry Array to the MMC.
Write the GPT Partition Entry Array to the MMC .