sparc: cleanup cpu type name composition

introduce SPARC_CPU_TYPE_NAME macro and use it to
construct cpu type names.

Backports commit 1d4bfc5496387124e56df6fd49481e1821403456 from qemu
This commit is contained in:
Igor Mammedov 2018-03-20 08:26:15 -04:00 committed by Lioncash
parent 074865ff98
commit 9e175711d6
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -757,7 +757,7 @@ static bool sparc_cpu_has_work(CPUState *cs)
static char *sparc_cpu_type_name(const char *cpu_model)
{
char *name = g_strdup_printf("%s-" TYPE_SPARC_CPU, cpu_model);
char *name = g_strdup_printf(SPARC_CPU_TYPE_NAME("%s"), cpu_model);
char *s = name;
/* SPARC cpu model names happen to have whitespaces,