platform/msm_shared/partition_parser.c
unsigned int
partition_parse_gpt_header(unsigned char *buffer,
			   unsigned long long *first_usable_lba,
			   unsigned int *partition_entry_size,
			   unsigned int *header_size,
			   unsigned int *max_partition_count)
{
	/* Check GPT Signature */
	if (((uint32_t *) buffer)[0] != GPT_SIGNATURE_2 ||
	    ((uint32_t *) buffer)[1] != GPT_SIGNATURE_1)
		return 1;

	*header_size = GET_LWORD_FROM_BYTE(&buffer[HEADER_SIZE_OFFSET]);
	*first_usable_lba =
	    GET_LLWORD_FROM_BYTE(&buffer[FIRST_USABLE_LBA_OFFSET]);
	*max_partition_count =
	    GET_LWORD_FROM_BYTE(&buffer[PARTITION_COUNT_OFFSET]);
	*partition_entry_size =
	    GET_LWORD_FROM_BYTE(&buffer[PENTRY_SIZE_OFFSET]);

	return 0;
}
/*
 * Parse the gpt header and get the required header fields
 * Return 0 on valid signature
 */
Parse the gpt header and get the required header fields
Return 0 on valid signature
Parse the gpt header and get the required header fields Return 0 on valid signature
unsigned int
partition_parse_gpt_header(unsigned char *buffer,
			   unsigned long long *first_usable_lba,
			   unsigned int *partition_entry_size,
			   unsigned int *header_size,
			   unsigned int *max_partition_count)
{
	if (((uint32_t *) buffer)[0] != GPT_SIGNATURE_2 ||
	    ((uint32_t *) buffer)[1] != GPT_SIGNATURE_1)
		return 1;
	*header_size = GET_LWORD_FROM_BYTE(&buffer[HEADER_SIZE_OFFSET]);
	*first_usable_lba =
	    GET_LLWORD_FROM_BYTE(&buffer[FIRST_USABLE_LBA_OFFSET]);
	*max_partition_count =
	    GET_LWORD_FROM_BYTE(&buffer[PARTITION_COUNT_OFFSET]);
	*partition_entry_size =
	    GET_LWORD_FROM_BYTE(&buffer[PENTRY_SIZE_OFFSET]);
	return 0;
}
unsigned int partition_parse_gpt_header ( unsigned char * buffer , unsigned long long * first_usable_lba , unsigned int * partition_entry_size , unsigned int * header_size , unsigned int * max_partition_count ) { if ( ( ( uint32_t * ) buffer ) [ 0 ] != GPT_SIGNATURE_2 || ( ( uint32_t * ) buffer ) [ 1 ] != GPT_SIGNATURE_1 ) return 1 ; * header_size = GET_LWORD_FROM_BYTE ( & buffer [ HEADER_SIZE_OFFSET ] ) ; * first_usable_lba = GET_LLWORD_FROM_BYTE ( & buffer [ FIRST_USABLE_LBA_OFFSET ] ) ; * max_partition_count = GET_LWORD_FROM_BYTE ( & buffer [ PARTITION_COUNT_OFFSET ] ) ; * partition_entry_size = GET_LWORD_FROM_BYTE ( & buffer [ PENTRY_SIZE_OFFSET ] ) ; return 0 ; }
Parse the gpt header and get the required header fields
 Return 0 on valid signature
Parse the gpt header and get the required header fields Return 0 on valid signature
/* Check GPT Signature */