提交 b5f591cd 编写于 作者: D Daniel P. Berrangé

conf: drop virCapsPtr param from domain post parse & validate APIs

Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 61bff77b
......@@ -5810,7 +5810,6 @@ virDomainDefPostParseCheckFailure(virDomainDefPtr def,
int
virDomainDefPostParse(virDomainDefPtr def,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque)
......@@ -7115,7 +7114,6 @@ virDomainDefValidateInternal(const virDomainDef *def,
*/
int
virDomainDefValidate(virDomainDefPtr def,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags,
virDomainXMLOptionPtr xmlopt)
{
......@@ -21566,11 +21564,11 @@ virDomainObjParseXML(xmlDocPtr xml,
parseOpaque = xmlopt->privateData.getParseOpaque(obj);
/* callback to fill driver specific domain aspects */
if (virDomainDefPostParse(obj->def, caps, flags, xmlopt, parseOpaque) < 0)
if (virDomainDefPostParse(obj->def, flags, xmlopt, parseOpaque) < 0)
goto error;
/* validate configuration */
if (virDomainDefValidate(obj->def, caps, flags, xmlopt) < 0)
if (virDomainDefValidate(obj->def, flags, xmlopt) < 0)
goto error;
return obj;
......@@ -21655,11 +21653,11 @@ virDomainDefParseNode(xmlDocPtr xml,
return NULL;
/* callback to fill driver specific domain aspects */
if (virDomainDefPostParse(def, caps, flags, xmlopt, parseOpaque) < 0)
if (virDomainDefPostParse(def, flags, xmlopt, parseOpaque) < 0)
return NULL;
/* validate configuration */
if (virDomainDefValidate(def, caps, flags, xmlopt) < 0)
if (virDomainDefValidate(def, flags, xmlopt) < 0)
return NULL;
return g_steal_pointer(&def);
......
......@@ -2783,7 +2783,6 @@ virDomainSCSIDriveAddressIsUsed(const virDomainDef *def,
const virDomainDeviceDriveAddress *addr);
int virDomainDefPostParse(virDomainDefPtr def,
virCapsPtr caps,
unsigned int parseFlags,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque);
......@@ -2796,7 +2795,6 @@ int virDomainDeviceValidateAliasForHotplug(virDomainObjPtr vm,
bool virDomainDeviceAliasIsUserAlias(const char *aliasStr);
int virDomainDefValidate(virDomainDefPtr def,
virCapsPtr caps,
unsigned int parseFlags,
virDomainXMLOptionPtr xmlopt);
......
......@@ -1213,7 +1213,7 @@ xenParseXL(virConfPtr conf,
if (xenParseXLChannel(conf, def) < 0)
goto cleanup;
if (virDomainDefPostParse(def, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
if (virDomainDefPostParse(def, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
xmlopt, NULL) < 0)
goto cleanup;
......
......@@ -467,7 +467,7 @@ xenParseXM(virConfPtr conf,
if (xenParseXMInputDevs(conf, def) < 0)
goto cleanup;
if (virDomainDefPostParse(def, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
if (virDomainDefPostParse(def, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
xmlopt, NULL) < 0)
goto cleanup;
......
......@@ -1055,7 +1055,7 @@ lxcSetCapDrop(virDomainDefPtr def, virConfPtr properties)
virDomainDefPtr
lxcParseConfigString(const char *config,
virCapsPtr caps,
virCapsPtr caps G_GNUC_UNUSED,
virDomainXMLOptionPtr xmlopt)
{
virDomainDefPtr vmdef = NULL;
......@@ -1166,7 +1166,7 @@ lxcParseConfigString(const char *config,
/* lxc.cap.drop */
lxcSetCapDrop(vmdef, properties);
if (virDomainDefPostParse(vmdef, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
if (virDomainDefPostParse(vmdef, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
xmlopt, NULL) < 0)
goto error;
......
......@@ -8101,7 +8101,7 @@ qemuCheckDiskConfigAgainstDomain(const virDomainDef *def,
static int
qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
virDomainDeviceDefPtr dev,
virCapsPtr caps,
virCapsPtr caps G_GNUC_UNUSED,
virQEMUCapsPtr qemuCaps,
unsigned int parse_flags,
virDomainXMLOptionPtr xmlopt)
......@@ -8301,7 +8301,7 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
return -1;
}
if (virDomainDefPostParse(vmdef, caps, parse_flags, xmlopt, qemuCaps) < 0)
if (virDomainDefPostParse(vmdef, parse_flags, xmlopt, qemuCaps) < 0)
return -1;
return 0;
......@@ -8311,7 +8311,7 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
static int
qemuDomainDetachDeviceConfig(virDomainDefPtr vmdef,
virDomainDeviceDefPtr dev,
virCapsPtr caps,
virCapsPtr caps G_GNUC_UNUSED,
virQEMUCapsPtr qemuCaps,
unsigned int parse_flags,
virDomainXMLOptionPtr xmlopt)
......@@ -8504,7 +8504,7 @@ qemuDomainDetachDeviceConfig(virDomainDefPtr vmdef,
return -1;
}
if (virDomainDefPostParse(vmdef, caps, parse_flags, xmlopt, qemuCaps) < 0)
if (virDomainDefPostParse(vmdef, parse_flags, xmlopt, qemuCaps) < 0)
return -1;
return 0;
......@@ -8513,7 +8513,7 @@ qemuDomainDetachDeviceConfig(virDomainDefPtr vmdef,
static int
qemuDomainUpdateDeviceConfig(virDomainDefPtr vmdef,
virDomainDeviceDefPtr dev,
virCapsPtr caps,
virCapsPtr caps G_GNUC_UNUSED,
virQEMUCapsPtr qemuCaps,
unsigned int parse_flags,
virDomainXMLOptionPtr xmlopt)
......@@ -8612,7 +8612,7 @@ qemuDomainUpdateDeviceConfig(virDomainDefPtr vmdef,
return -1;
}
if (virDomainDefPostParse(vmdef, caps, parse_flags, xmlopt, qemuCaps) < 0)
if (virDomainDefPostParse(vmdef, parse_flags, xmlopt, qemuCaps) < 0)
return -1;
return 0;
......
......@@ -5382,7 +5382,7 @@ qemuProcessStartValidate(virQEMUDriverPtr driver,
* VM that was running before (migration, snapshots, save). It's more
* important to start such VM than keep the configuration clean */
if ((flags & VIR_QEMU_PROCESS_START_NEW) &&
virDomainDefValidate(vm->def, caps, 0, driver->xmlopt) < 0)
virDomainDefValidate(vm->def, 0, driver->xmlopt) < 0)
return -1;
if (qemuProcessStartValidateGraphics(vm) < 0)
......@@ -5581,7 +5581,7 @@ qemuProcessInit(virQEMUDriverPtr driver,
VIR_DEBUG("re-running the post parse callback");
/* we don't have the private copy of qemuCaps at this point */
if (virDomainDefPostParse(vm->def, caps, 0, driver->xmlopt, NULL) < 0)
if (virDomainDefPostParse(vm->def, 0, driver->xmlopt, NULL) < 0)
goto cleanup;
}
......
......@@ -1276,7 +1276,7 @@ virVMXConfigScanResultsCollector(const char* name,
virDomainDefPtr
virVMXParseConfig(virVMXContext *ctx,
virDomainXMLOptionPtr xmlopt,
virCapsPtr caps,
virCapsPtr caps G_GNUC_UNUSED,
const char *vmx)
{
bool success = false;
......@@ -1845,7 +1845,7 @@ virVMXParseConfig(virVMXContext *ctx,
}
}
if (virDomainDefPostParse(def, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
if (virDomainDefPostParse(def, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
xmlopt, NULL) < 0)
goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册