static const virArch archs[] = { VIR_ARCH_I686, VIR_ARCH_X86_64 };
-struct x86_vendor {
+typedef struct _virCPUx86Vendor virCPUx86Vendor;
+typedef virCPUx86Vendor *virCPUx86VendorPtr;
+struct _virCPUx86Vendor {
char *name;
virCPUx86CPUID cpuid;
- struct x86_vendor *next;
+ virCPUx86VendorPtr next;
};
struct x86_feature {
struct x86_model {
char *name;
- const struct x86_vendor *vendor;
+ virCPUx86VendorPtr vendor;
virCPUx86Data *data;
struct x86_model *next;
};
struct x86_map {
- struct x86_vendor *vendors;
+ virCPUx86VendorPtr vendors;
struct x86_feature *features;
struct x86_model *models;
struct x86_feature *migrate_blockers;
/* also removes bits corresponding to vendor string from data */
-static const struct x86_vendor *
+static virCPUx86VendorPtr
x86DataToVendor(virCPUx86Data *data,
const struct x86_map *map)
{
- const struct x86_vendor *vendor = map->vendors;
+ virCPUx86VendorPtr vendor = map->vendors;
virCPUx86CPUID *cpuid;
while (vendor) {
virCPUDefPtr cpu;
virCPUx86Data *copy = NULL;
virCPUx86Data *modelData = NULL;
- const struct x86_vendor *vendor;
+ virCPUx86VendorPtr vendor;
if (VIR_ALLOC(cpu) < 0 ||
VIR_STRDUP(cpu->model, model->name) < 0 ||
static void
-x86VendorFree(struct x86_vendor *vendor)
+x86VendorFree(virCPUx86VendorPtr vendor)
{
if (!vendor)
return;
}
-static struct x86_vendor *
+static virCPUx86VendorPtr
x86VendorFind(const struct x86_map *map,
const char *name)
{
- struct x86_vendor *vendor;
+ virCPUx86VendorPtr vendor;
vendor = map->vendors;
while (vendor) {
x86VendorLoad(xmlXPathContextPtr ctxt,
struct x86_map *map)
{
- struct x86_vendor *vendor = NULL;
+ virCPUx86VendorPtr vendor = NULL;
char *string = NULL;
int ret = 0;
}
while (map->vendors != NULL) {
- struct x86_vendor *vendor = map->vendors;
+ virCPUx86VendorPtr vendor = map->vendors;
map->vendors = vendor->next;
x86VendorFree(vendor);
}
}
if (vendor) {
- const struct x86_vendor *v = NULL;
+ virCPUx86VendorPtr v = NULL;
if (cpu->vendor && !(v = x86VendorFind(map, cpu->vendor))) {
virReportError(VIR_ERR_OPERATION_FAILED,
struct x86_model *base_model = NULL;
virCPUDefPtr cpu = NULL;
size_t i;
- const struct x86_vendor *vendor = NULL;
+ virCPUx86VendorPtr vendor = NULL;
struct x86_model *model = NULL;
bool outputVendor = true;
const char *modelName;