conf: Extend virDomainDefAssignAddressesCallback for parseOpaque

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2016-09-23 11:04:39 +02:00
parent 78ab5dcea0
commit cf198684a8
3 changed files with 10 additions and 4 deletions

View File

@ -4604,7 +4604,8 @@ virDomainDefPostParse(virDomainDefPtr def,
if (xmlopt->config.assignAddressesCallback) {
ret = xmlopt->config.assignAddressesCallback(def, caps, parseFlags,
xmlopt->config.priv);
xmlopt->config.priv,
parseOpaque);
if (ret < 0)
return ret;
}

View File

@ -2382,11 +2382,15 @@ typedef int (*virDomainDeviceDefPostParseCallback)(virDomainDeviceDefPtr dev,
void *opaque,
void *parseOpaque);
/* Drive callback for assigning device addresses, called at the end
* of parsing, after all defaults and implicit devices have been added. */
* of parsing, after all defaults and implicit devices have been added.
* @parseOpaque is opaque data passed by virDomainDefParse* caller,
* @opaque is opaque data set by driver (usually pointer to driver
* private data). */
typedef int (*virDomainDefAssignAddressesCallback)(virDomainDef *def,
virCapsPtr caps,
unsigned int parseFlags,
void *opaque);
void *opaque,
void *parseOpaque);
/* Called in appropriate places where the domain conf parser can return failure
* for configurations that were previously accepted. This shall not modify the

View File

@ -2765,7 +2765,8 @@ static int
qemuDomainDefAssignAddresses(virDomainDef *def,
virCapsPtr caps,
unsigned int parseFlags ATTRIBUTE_UNUSED,
void *opaque)
void *opaque,
void *parseOpaque ATTRIBUTE_UNUSED)
{
virQEMUDriverPtr driver = opaque;
virQEMUCapsPtr qemuCaps = NULL;