mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
cpu: use typedefs for enums in "src/cpu/cpu_map.h"
In "src/cpu/" there are some enumerations (enum) declarations. Similar to the recent cleanup to "src/util", "src/conf" and other directories, it's better to use a typedef for variable types, function types and other usages. Other enumeration and folders will be changed to typedef's in the future. Specially, in files that are in different places of "src/util" and "src/conf". Most of the files changed in this commit are related to CPU (cpu_map.h) enums. Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
This commit is contained in:
parent
289a3163de
commit
5443b15829
@ -729,7 +729,7 @@ struct cpuGetModelsData
|
||||
};
|
||||
|
||||
static int
|
||||
cpuGetArchModelsCb(enum cpuMapElement element,
|
||||
cpuGetArchModelsCb(cpuMapElement element,
|
||||
xmlXPathContextPtr ctxt,
|
||||
void *cbdata)
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ VIR_ENUM_IMPL(cpuMapElement, CPU_MAP_ELEMENT_LAST,
|
||||
|
||||
|
||||
static int load(xmlXPathContextPtr ctxt,
|
||||
enum cpuMapElement element,
|
||||
cpuMapElement element,
|
||||
cpuMapLoadCallback callback,
|
||||
void *data)
|
||||
{
|
||||
|
@ -27,19 +27,19 @@
|
||||
# include "virxml.h"
|
||||
|
||||
|
||||
enum cpuMapElement {
|
||||
typedef enum {
|
||||
CPU_MAP_ELEMENT_VENDOR,
|
||||
CPU_MAP_ELEMENT_FEATURE,
|
||||
CPU_MAP_ELEMENT_MODEL,
|
||||
|
||||
CPU_MAP_ELEMENT_LAST
|
||||
};
|
||||
} cpuMapElement;
|
||||
|
||||
VIR_ENUM_DECL(cpuMapElement)
|
||||
|
||||
|
||||
typedef int
|
||||
(*cpuMapLoadCallback) (enum cpuMapElement element,
|
||||
(*cpuMapLoadCallback) (cpuMapElement element,
|
||||
xmlXPathContextPtr ctxt,
|
||||
void *data);
|
||||
|
||||
|
@ -273,7 +273,7 @@ ppcModelLoad(xmlXPathContextPtr ctxt,
|
||||
}
|
||||
|
||||
static int
|
||||
ppcMapLoadCallback(enum cpuMapElement element,
|
||||
ppcMapLoadCallback(cpuMapElement element,
|
||||
xmlXPathContextPtr ctxt,
|
||||
void *data)
|
||||
{
|
||||
|
@ -1098,7 +1098,7 @@ x86MapFree(struct x86_map *map)
|
||||
|
||||
|
||||
static int
|
||||
x86MapLoadCallback(enum cpuMapElement element,
|
||||
x86MapLoadCallback(cpuMapElement element,
|
||||
xmlXPathContextPtr ctxt,
|
||||
void *data)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user