platform/msm_shared/partition_parser.c
unsigned partition_get_index(const char *name)
{
	unsigned int input_string_length = strlen(name);
	unsigned n;

	if( partition_count >= NUM_PARTITIONS)
	{
		return INVALID_PTN;
	}
	for (n = 0; n < partition_count; n++) {
		if (!memcmp
		    (name, &partition_entries[n].name, input_string_length)
		    && input_string_length ==
		    strlen((const char *)&partition_entries[n].name)) {
			return n;
		}
	}
	return INVALID_PTN;
}
/*
 * Find index of parition in array of partition entries
 */
Find index of parition in array of partition entries
Find index of parition in array of partition entries
unsigned partition_get_index(const char *name)
{
	unsigned int input_string_length = strlen(name);
	unsigned n;
	if( partition_count >= NUM_PARTITIONS)
	{
		return INVALID_PTN;
	}
	for (n = 0; n < partition_count; n++) {
		if (!memcmp
		    (name, &partition_entries[n].name, input_string_length)
		    && input_string_length ==
		    strlen((const char *)&partition_entries[n].name)) {
			return n;
		}
	}
	return INVALID_PTN;
}
unsigned partition_get_index ( const char * name ) { unsigned int input_string_length = strlen ( name ) ; unsigned n ; if ( partition_count >= NUM_PARTITIONS ) { return INVALID_PTN ; } for ( n = 0 ; n < partition_count ; n ++ ) { if ( ! memcmp ( name , & partition_entries [ n ] . name , input_string_length ) && input_string_length == strlen ( ( const char * ) & partition_entries [ n ] . name ) ) { return n ; } } return INVALID_PTN ; }
Find index of parition in array of partition entries
Find index of parition in array of partition entries