platform/msm_shared/partition_parser.c
static void
mbr_fill_name(struct partition_entry *partition_ent, unsigned int type)
{
	switch (type) {
		memset(partition_ent->name, 0, MAX_GPT_NAME_SIZE);
	case MBR_MODEM_TYPE:
	case MBR_MODEM_TYPE2:
		/* if already assigned last name available then return */
		if (!strcmp((const char *)vfat_partitions[vfat_count], "NONE"))
			return;
		strlcpy((char *)partition_ent->name,
			(const char *)vfat_partitions[vfat_count],
			sizeof(partition_ent->name));
		vfat_count++;
		break;
	case MBR_SBL1_TYPE:
		memcpy(partition_ent->name, "sbl1", 4);
		break;
	case MBR_SBL2_TYPE:
		memcpy(partition_ent->name, "sbl2", 4);
		break;
	case MBR_SBL3_TYPE:
		memcpy(partition_ent->name, "sbl3", 4);
		break;
	case MBR_RPM_TYPE:
		memcpy(partition_ent->name, "rpm", 3);
		break;
	case MBR_TZ_TYPE:
		memcpy(partition_ent->name, "tz", 2);
		break;
	case MBR_ABOOT_TYPE:
#if PLATFORM_MSM7X27A
		memcpy(partition_ent->name, "FOTA", 4);
#else
		memcpy(partition_ent->name, "aboot", 5);
#endif
		break;
	case MBR_BOOT_TYPE:
		memcpy(partition_ent->name, "boot", 4);
		break;
	case MBR_MODEM_ST1_TYPE:
		memcpy(partition_ent->name, "modem_st1", 9);
		break;
	case MBR_MODEM_ST2_TYPE:
		memcpy(partition_ent->name, "modem_st2", 9);
		break;
	case MBR_EFS2_TYPE:
		memcpy(partition_ent->name, "efs2", 4);
		break;
	case MBR_USERDATA_TYPE:
		if (ext3_count == sizeof(ext3_partitions) / sizeof(char *))
			return;
		strlcpy((char *)partition_ent->name,
			(const char *)ext3_partitions[ext3_count],
			sizeof(partition_ent->name));
		ext3_count++;
		break;
	case MBR_RECOVERY_TYPE:
		memcpy(partition_ent->name, "recovery", 8);
		break;
	case MBR_MISC_TYPE:
		memcpy(partition_ent->name, "misc", 4);
		break;
	case MBR_SSD_TYPE:
		memcpy(partition_ent->name, "ssd", 3);
		break;
	};
}
/*
 * Fill name for android partition found.
 */
Fill name for android partition found.
Fill name for android partition found .
static void
mbr_fill_name(struct partition_entry *partition_ent, unsigned int type)
{
	switch (type) {
		memset(partition_ent->name, 0, MAX_GPT_NAME_SIZE);
	case MBR_MODEM_TYPE:
	case MBR_MODEM_TYPE2:
		if (!strcmp((const char *)vfat_partitions[vfat_count], "NONE"))
			return;
		strlcpy((char *)partition_ent->name,
			(const char *)vfat_partitions[vfat_count],
			sizeof(partition_ent->name));
		vfat_count++;
		break;
	case MBR_SBL1_TYPE:
		memcpy(partition_ent->name, "sbl1", 4);
		break;
	case MBR_SBL2_TYPE:
		memcpy(partition_ent->name, "sbl2", 4);
		break;
	case MBR_SBL3_TYPE:
		memcpy(partition_ent->name, "sbl3", 4);
		break;
	case MBR_RPM_TYPE:
		memcpy(partition_ent->name, "rpm", 3);
		break;
	case MBR_TZ_TYPE:
		memcpy(partition_ent->name, "tz", 2);
		break;
	case MBR_ABOOT_TYPE:
#if PLATFORM_MSM7X27A
		memcpy(partition_ent->name, "FOTA", 4);
#else
		memcpy(partition_ent->name, "aboot", 5);
#endif
		break;
	case MBR_BOOT_TYPE:
		memcpy(partition_ent->name, "boot", 4);
		break;
	case MBR_MODEM_ST1_TYPE:
		memcpy(partition_ent->name, "modem_st1", 9);
		break;
	case MBR_MODEM_ST2_TYPE:
		memcpy(partition_ent->name, "modem_st2", 9);
		break;
	case MBR_EFS2_TYPE:
		memcpy(partition_ent->name, "efs2", 4);
		break;
	case MBR_USERDATA_TYPE:
		if (ext3_count == sizeof(ext3_partitions) / sizeof(char *))
			return;
		strlcpy((char *)partition_ent->name,
			(const char *)ext3_partitions[ext3_count],
			sizeof(partition_ent->name));
		ext3_count++;
		break;
	case MBR_RECOVERY_TYPE:
		memcpy(partition_ent->name, "recovery", 8);
		break;
	case MBR_MISC_TYPE:
		memcpy(partition_ent->name, "misc", 4);
		break;
	case MBR_SSD_TYPE:
		memcpy(partition_ent->name, "ssd", 3);
		break;
	};
}
static void mbr_fill_name ( struct partition_entry * partition_ent , unsigned int type ) { switch ( type ) { memset ( partition_ent -> name , 0 , MAX_GPT_NAME_SIZE ) ; case MBR_MODEM_TYPE : case MBR_MODEM_TYPE2 : if ( ! strcmp ( ( const char * ) vfat_partitions [ vfat_count ] , " " ) ) return ; strlcpy ( ( char * ) partition_ent -> name , ( const char * ) vfat_partitions [ vfat_count ] , sizeof ( partition_ent -> name ) ) ; vfat_count ++ ; break ; case MBR_SBL1_TYPE : memcpy ( partition_ent -> name , " " , 4 ) ; break ; case MBR_SBL2_TYPE : memcpy ( partition_ent -> name , " " , 4 ) ; break ; case MBR_SBL3_TYPE : memcpy ( partition_ent -> name , " " , 4 ) ; break ; case MBR_RPM_TYPE : memcpy ( partition_ent -> name , " " , 3 ) ; break ; case MBR_TZ_TYPE : memcpy ( partition_ent -> name , " " , 2 ) ; break ; case MBR_ABOOT_TYPE : #if PLATFORM_MSM7X27A memcpy ( partition_ent -> name , " " , 4 ) ; #else memcpy ( partition_ent -> name , " " , 5 ) ; #endif break ; case MBR_BOOT_TYPE : memcpy ( partition_ent -> name , " " , 4 ) ; break ; case MBR_MODEM_ST1_TYPE : memcpy ( partition_ent -> name , " " , 9 ) ; break ; case MBR_MODEM_ST2_TYPE : memcpy ( partition_ent -> name , " " , 9 ) ; break ; case MBR_EFS2_TYPE : memcpy ( partition_ent -> name , " " , 4 ) ; break ; case MBR_USERDATA_TYPE : if ( ext3_count == sizeof ( ext3_partitions ) / sizeof ( char * ) ) return ; strlcpy ( ( char * ) partition_ent -> name , ( const char * ) ext3_partitions [ ext3_count ] , sizeof ( partition_ent -> name ) ) ; ext3_count ++ ; break ; case MBR_RECOVERY_TYPE : memcpy ( partition_ent -> name , " " , 8 ) ; break ; case MBR_MISC_TYPE : memcpy ( partition_ent -> name , " " , 4 ) ; break ; case MBR_SSD_TYPE : memcpy ( partition_ent -> name , " " , 3 ) ; break ; } ; }
Fill name for android partition found.
Fill name for android partition found .
/* if already assigned last name available then return */