mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
target: Use generic cpu_model_from_type()
Use generic cpu_model_from_type() when the CPU model name needs to be extracted from the CPU type name. Signed-off-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20231114235628.534334-23-gshan@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
f08f4c8ea4
commit
4b26aa9f3a
8 changed files with 8 additions and 16 deletions
|
@ -1744,8 +1744,7 @@ static char *x86_cpu_class_get_model_name(X86CPUClass *cc)
|
|||
{
|
||||
const char *class_name = object_class_get_name(OBJECT_CLASS(cc));
|
||||
assert(g_str_has_suffix(class_name, X86_CPU_TYPE_SUFFIX));
|
||||
return g_strndup(class_name,
|
||||
strlen(class_name) - strlen(X86_CPU_TYPE_SUFFIX));
|
||||
return cpu_model_from_type(class_name);
|
||||
}
|
||||
|
||||
typedef struct X86CPUVersionDefinition {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue