mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
domain_conf: Unexport virDomainDefPostParseDeviceIteratorData
The virDomainDefPostParseDeviceIteratorData struct is exported in domain_conf.h because it's used in both domain_conf.c and domain_validate.c. However, the latter usage is not warranted, it's just a shortcut so that we don't have to introduce a similar struct just for domain_validate.c. Well, do the extra step and introduce a separate structure for domain_validate.c. This allows us to move post parse code later on. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
89c16bf9dd
commit
531b62950f
@ -6031,6 +6031,13 @@ virDomainDeviceDefPostParseOne(virDomainDeviceDef *dev,
|
||||
}
|
||||
|
||||
|
||||
struct virDomainDefPostParseDeviceIteratorData {
|
||||
virDomainXMLOption *xmlopt;
|
||||
void *parseOpaque;
|
||||
unsigned int parseFlags;
|
||||
};
|
||||
|
||||
|
||||
static int
|
||||
virDomainDefPostParseDeviceIterator(virDomainDef *def,
|
||||
virDomainDeviceDef *dev,
|
||||
|
@ -3302,12 +3302,6 @@ struct _virDomainXMLOption {
|
||||
};
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainXMLOption, virObjectUnref);
|
||||
|
||||
struct virDomainDefPostParseDeviceIteratorData {
|
||||
virDomainXMLOption *xmlopt;
|
||||
void *parseOpaque;
|
||||
unsigned int parseFlags;
|
||||
};
|
||||
|
||||
bool
|
||||
virDomainSCSIDriveAddressIsUsed(const virDomainDef *def,
|
||||
const virDomainDeviceDriveAddress *addr);
|
||||
|
@ -1889,13 +1889,20 @@ virDomainDefValidateInternal(const virDomainDef *def,
|
||||
}
|
||||
|
||||
|
||||
struct virDomainDefValidateDeviceIteratorData {
|
||||
virDomainXMLOption *xmlopt;
|
||||
void *parseOpaque;
|
||||
unsigned int parseFlags;
|
||||
};
|
||||
|
||||
|
||||
static int
|
||||
virDomainDefValidateDeviceIterator(virDomainDef *def,
|
||||
virDomainDeviceDef *dev,
|
||||
virDomainDeviceInfo *info G_GNUC_UNUSED,
|
||||
void *opaque)
|
||||
{
|
||||
struct virDomainDefPostParseDeviceIteratorData *data = opaque;
|
||||
struct virDomainDefValidateDeviceIteratorData *data = opaque;
|
||||
return virDomainDeviceDefValidate(dev, def,
|
||||
data->parseFlags, data->xmlopt,
|
||||
data->parseOpaque);
|
||||
@ -1924,7 +1931,7 @@ virDomainDefValidate(virDomainDef *def,
|
||||
virDomainXMLOption *xmlopt,
|
||||
void *parseOpaque)
|
||||
{
|
||||
struct virDomainDefPostParseDeviceIteratorData data = {
|
||||
struct virDomainDefValidateDeviceIteratorData data = {
|
||||
.xmlopt = xmlopt,
|
||||
.parseFlags = parseFlags,
|
||||
.parseOpaque = parseOpaque,
|
||||
|
Loading…
x
Reference in New Issue
Block a user