mirror of https://gitee.com/openkylin/libvirt.git
conf: drop 'def' from struct virDomainDefPostParseDeviceIteratorData
It's passed to all places along with the structure.
This commit is contained in:
parent
b394af162a
commit
0fc1fde20b
|
@ -4413,7 +4413,6 @@ virDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
|
||||||
|
|
||||||
|
|
||||||
struct virDomainDefPostParseDeviceIteratorData {
|
struct virDomainDefPostParseDeviceIteratorData {
|
||||||
virDomainDefPtr def;
|
|
||||||
virCapsPtr caps;
|
virCapsPtr caps;
|
||||||
virDomainXMLOptionPtr xmlopt;
|
virDomainXMLOptionPtr xmlopt;
|
||||||
unsigned int parseFlags;
|
unsigned int parseFlags;
|
||||||
|
@ -4421,13 +4420,13 @@ struct virDomainDefPostParseDeviceIteratorData {
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virDomainDefPostParseDeviceIterator(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
virDomainDefPostParseDeviceIterator(virDomainDefPtr def,
|
||||||
virDomainDeviceDefPtr dev,
|
virDomainDeviceDefPtr dev,
|
||||||
virDomainDeviceInfoPtr info ATTRIBUTE_UNUSED,
|
virDomainDeviceInfoPtr info ATTRIBUTE_UNUSED,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
struct virDomainDefPostParseDeviceIteratorData *data = opaque;
|
struct virDomainDefPostParseDeviceIteratorData *data = opaque;
|
||||||
return virDomainDeviceDefPostParse(dev, data->def, data->caps,
|
return virDomainDeviceDefPostParse(dev, def, data->caps,
|
||||||
data->parseFlags, data->xmlopt);
|
data->parseFlags, data->xmlopt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4470,7 +4469,7 @@ virDomainDefPostParseInternal(virDomainDefPtr def,
|
||||||
|
|
||||||
/* videos[0] might have been added in AddImplicitDevices, after we've
|
/* videos[0] might have been added in AddImplicitDevices, after we've
|
||||||
* done the per-device post-parse */
|
* done the per-device post-parse */
|
||||||
if (virDomainDefPostParseDeviceIterator(NULL, &device, NULL, data) < 0)
|
if (virDomainDefPostParseDeviceIterator(def, &device, NULL, data) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4489,7 +4488,6 @@ virDomainDefPostParse(virDomainDefPtr def,
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct virDomainDefPostParseDeviceIteratorData data = {
|
struct virDomainDefPostParseDeviceIteratorData data = {
|
||||||
.def = def,
|
|
||||||
.caps = caps,
|
.caps = caps,
|
||||||
.xmlopt = xmlopt,
|
.xmlopt = xmlopt,
|
||||||
.parseFlags = parseFlags,
|
.parseFlags = parseFlags,
|
||||||
|
|
Loading…
Reference in New Issue