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) { if (xmlopt->config.assignAddressesCallback) {
ret = xmlopt->config.assignAddressesCallback(def, caps, parseFlags, ret = xmlopt->config.assignAddressesCallback(def, caps, parseFlags,
xmlopt->config.priv); xmlopt->config.priv,
parseOpaque);
if (ret < 0) if (ret < 0)
return ret; return ret;
} }

View File

@ -2382,11 +2382,15 @@ typedef int (*virDomainDeviceDefPostParseCallback)(virDomainDeviceDefPtr dev,
void *opaque, void *opaque,
void *parseOpaque); void *parseOpaque);
/* Drive callback for assigning device addresses, called at the end /* 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, typedef int (*virDomainDefAssignAddressesCallback)(virDomainDef *def,
virCapsPtr caps, virCapsPtr caps,
unsigned int parseFlags, unsigned int parseFlags,
void *opaque); void *opaque,
void *parseOpaque);
/* Called in appropriate places where the domain conf parser can return failure /* Called in appropriate places where the domain conf parser can return failure
* for configurations that were previously accepted. This shall not modify the * for configurations that were previously accepted. This shall not modify the

View File

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