diff options
author | Andreas Färber <afaerber@suse.de> | 2012-12-16 02:17:02 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-12-19 14:08:56 +0100 |
commit | 92a3136174f60ee45b113296cb2c2a5225b00369 (patch) | |
tree | ab686fdaa37845ea0551e725c706ab99c9c89885 /target-alpha | |
parent | 494342b35b55b3b126821141e15c8a49df122ff1 (diff) |
cpu: Introduce CPUListState struct
This generalizes {ARM,M68k,Alpha}CPUListState to avoid declaring it for
each target. Place it in cpu-common.h to avoid circular dependencies.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target-alpha')
-rw-r--r-- | target-alpha/cpu.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/target-alpha/cpu.c b/target-alpha/cpu.c index 2deb3c1d7d..59d8669ab0 100644 --- a/target-alpha/cpu.c +++ b/target-alpha/cpu.c @@ -33,11 +33,6 @@ static void alpha_cpu_realize(Object *obj, Error **errp) #endif } -typedef struct AlphaCPUListState { - fprintf_function cpu_fprintf; - FILE *file; -} AlphaCPUListState; - /* Sort alphabetically by type name. */ static gint alpha_cpu_list_compare(gconstpointer a, gconstpointer b) { @@ -53,7 +48,7 @@ static gint alpha_cpu_list_compare(gconstpointer a, gconstpointer b) static void alpha_cpu_list_entry(gpointer data, gpointer user_data) { ObjectClass *oc = data; - AlphaCPUListState *s = user_data; + CPUListState *s = user_data; (*s->cpu_fprintf)(s->file, " %s\n", object_class_get_name(oc)); @@ -61,7 +56,7 @@ static void alpha_cpu_list_entry(gpointer data, gpointer user_data) void alpha_cpu_list(FILE *f, fprintf_function cpu_fprintf) { - AlphaCPUListState s = { + CPUListState s = { .file = f, .cpu_fprintf = cpu_fprintf, }; |