static int
virDomainDeviceInfoParseXML(virDomainXMLOptionPtr xmlopt,
xmlNodePtr node,
+ xmlXPathContextPtr ctxt G_GNUC_UNUSED,
virDomainDeviceInfoPtr info,
unsigned int flags)
{
}
}
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info,
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info,
flags | VIR_DOMAIN_DEF_PARSE_ALLOW_BOOT) < 0) {
return NULL;
}
if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
def->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_NONE) {
VIR_DEBUG("Ignoring device address for none model usb controller");
- } else if (virDomainDeviceInfoParseXML(xmlopt, node,
+ } else if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt,
&def->info, flags) < 0) {
return NULL;
}
def->src->path = g_steal_pointer(&source);
def->dst = g_steal_pointer(&target);
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info,
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info,
flags | VIR_DOMAIN_DEF_PARSE_ALLOW_BOOT) < 0)
goto error;
def->mac_check = tmpCheck;
}
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info,
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info,
flags | VIR_DOMAIN_DEF_PARSE_ALLOW_BOOT
| VIR_DOMAIN_DEF_PARSE_ALLOW_ROM) < 0) {
goto error;
}
}
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0)
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info, flags) < 0)
goto error;
if (def->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
return NULL;
}
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0)
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info, flags) < 0)
return NULL;
return g_steal_pointer(&def);
goto error;
}
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0)
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info, flags) < 0)
goto error;
return def;
static virDomainPanicDefPtr
virDomainPanicDefParseXML(virDomainXMLOptionPtr xmlopt,
xmlNodePtr node,
+ xmlXPathContextPtr ctxt,
unsigned int flags)
{
virDomainPanicDefPtr panic;
panic = g_new0(virDomainPanicDef, 1);
- if (virDomainDeviceInfoParseXML(xmlopt, node,
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt,
&panic->info, flags) < 0)
goto error;
}
}
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0)
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info, flags) < 0)
goto error;
if (def->bus == VIR_DOMAIN_INPUT_BUS_USB &&
static virDomainHubDefPtr
virDomainHubDefParseXML(virDomainXMLOptionPtr xmlopt,
xmlNodePtr node,
+ xmlXPathContextPtr ctxt,
unsigned int flags)
{
virDomainHubDefPtr def;
goto error;
}
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0)
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info, flags) < 0)
goto error;
return def;
}
}
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0)
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info, flags) < 0)
goto error;
return def;
static virDomainWatchdogDefPtr
virDomainWatchdogDefParseXML(virDomainXMLOptionPtr xmlopt,
xmlNodePtr node,
+ xmlXPathContextPtr ctxt,
unsigned int flags)
{
virDomainWatchdogDefPtr def;
}
}
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0)
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info, flags) < 0)
goto error;
return def;
break;
}
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0)
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info, flags) < 0)
goto error;
if (virDomainVirtioOptionsParseXML(virXPathNode("./driver", ctxt),
if (def->model == VIR_DOMAIN_MEMBALLOON_MODEL_NONE)
VIR_DEBUG("Ignoring device address for none model Memballoon");
- else if (virDomainDeviceInfoParseXML(xmlopt, node,
+ else if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt,
&def->info, flags) < 0)
goto error;
static virDomainNVRAMDefPtr
virDomainNVRAMDefParseXML(virDomainXMLOptionPtr xmlopt,
xmlNodePtr node,
+ xmlXPathContextPtr ctxt,
unsigned int flags)
{
virDomainNVRAMDefPtr def;
def = g_new0(virDomainNVRAMDef, 1);
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0)
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info, flags) < 0)
goto error;
return def;
goto cleanup;
}
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0)
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info, flags) < 0)
goto cleanup;
}
}
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0)
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info, flags) < 0)
return NULL;
def->driver = virDomainVideoDriverDefParseXML(node);
}
if (def->info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
- if (virDomainDeviceInfoParseXML(xmlopt, node, def->info,
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, def->info,
flags | VIR_DOMAIN_DEF_PARSE_ALLOW_BOOT
| VIR_DOMAIN_DEF_PARSE_ALLOW_ROM) < 0)
goto error;
if (def->source->type == VIR_DOMAIN_CHR_TYPE_SPICEVMC)
def->source->data.spicevmc = VIR_DOMAIN_CHR_SPICEVMC_USBREDIR;
- if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info,
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &def->info,
flags | VIR_DOMAIN_DEF_PARSE_ALLOW_BOOT) < 0)
goto error;
if (virDomainMemoryTargetDefParseXML(node, ctxt, def) < 0)
goto error;
- if (virDomainDeviceInfoParseXML(xmlopt, memdevNode,
+ if (virDomainDeviceInfoParseXML(xmlopt, memdevNode, ctxt,
&def->info, flags) < 0)
goto error;
}
}
- if (virDomainDeviceInfoParseXML(xmlopt, node, &vsock->info, flags) < 0)
+ if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, &vsock->info, flags) < 0)
return NULL;
if (virDomainVirtioOptionsParseXML(virXPathNode("./driver", ctxt),
return NULL;
break;
case VIR_DOMAIN_DEVICE_WATCHDOG:
- if (!(dev->data.watchdog = virDomainWatchdogDefParseXML(xmlopt,
- node, flags)))
+ if (!(dev->data.watchdog = virDomainWatchdogDefParseXML(xmlopt, node,
+ ctxt, flags)))
return NULL;
break;
case VIR_DOMAIN_DEVICE_VIDEO:
return NULL;
break;
case VIR_DOMAIN_DEVICE_HUB:
- if (!(dev->data.hub = virDomainHubDefParseXML(xmlopt, node, flags)))
+ if (!(dev->data.hub = virDomainHubDefParseXML(xmlopt, node,
+ ctxt, flags)))
return NULL;
break;
case VIR_DOMAIN_DEVICE_REDIRDEV:
return NULL;
break;
case VIR_DOMAIN_DEVICE_NVRAM:
- if (!(dev->data.nvram = virDomainNVRAMDefParseXML(xmlopt, node, flags)))
+ if (!(dev->data.nvram = virDomainNVRAMDefParseXML(xmlopt, node,
+ ctxt, flags)))
return NULL;
break;
case VIR_DOMAIN_DEVICE_SHMEM:
return NULL;
break;
case VIR_DOMAIN_DEVICE_PANIC:
- if (!(dev->data.panic = virDomainPanicDefParseXML(xmlopt, node, flags)))
+ if (!(dev->data.panic = virDomainPanicDefParseXML(xmlopt, node,
+ ctxt, flags)))
return NULL;
break;
case VIR_DOMAIN_DEVICE_MEMORY:
if (n > 0) {
virDomainWatchdogDefPtr watchdog;
- watchdog = virDomainWatchdogDefParseXML(xmlopt, nodes[0], flags);
+ watchdog = virDomainWatchdogDefParseXML(xmlopt, nodes[0], ctxt, flags);
if (!watchdog)
goto error;
goto error;
} else if (n == 1) {
virDomainNVRAMDefPtr nvram =
- virDomainNVRAMDefParseXML(xmlopt, nodes[0], flags);
+ virDomainNVRAMDefParseXML(xmlopt, nodes[0], ctxt, flags);
if (!nvram)
goto error;
def->nvram = nvram;
for (i = 0; i < n; i++) {
virDomainHubDefPtr hub;
- hub = virDomainHubDefParseXML(xmlopt, nodes[i], flags);
+ hub = virDomainHubDefParseXML(xmlopt, nodes[i], ctxt, flags);
if (!hub)
goto error;
for (i = 0; i < n; i++) {
virDomainPanicDefPtr panic;
- panic = virDomainPanicDefParseXML(xmlopt, nodes[i], flags);
+ panic = virDomainPanicDefParseXML(xmlopt, nodes[i], ctxt, flags);
if (!panic)
goto error;