domain_conf.c: rename virDomainDeviceInfoIterateInternal()

Next patch will move virDomainDefValidateAliases() to domain_validate.c,
which uses virDomainDeviceInfoIterateInternal(), meaning that this
function will be made public. Rename it now to remove the 'Internal'
of its name.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
Daniel Henrique Barboza 2020-12-10 16:10:33 -03:00
parent f774ea1a96
commit b47b87e873

View File

@ -4223,10 +4223,10 @@ enum {
* behaviour can be altered with virDomainDeviceIterateFlags. * behaviour can be altered with virDomainDeviceIterateFlags.
*/ */
static int static int
virDomainDeviceInfoIterateInternal(virDomainDefPtr def, virDomainDeviceInfoIterateFlags(virDomainDefPtr def,
virDomainDeviceInfoCallback cb, virDomainDeviceInfoCallback cb,
unsigned int iteratorFlags, unsigned int iteratorFlags,
void *opaque) void *opaque)
{ {
size_t i; size_t i;
int rc; int rc;
@ -4452,7 +4452,7 @@ virDomainDeviceInfoIterate(virDomainDefPtr def,
virDomainDeviceInfoCallback cb, virDomainDeviceInfoCallback cb,
void *opaque) void *opaque)
{ {
return virDomainDeviceInfoIterateInternal(def, cb, 0, opaque); return virDomainDeviceInfoIterateFlags(def, cb, 0, opaque);
} }
@ -4460,10 +4460,10 @@ bool
virDomainDefHasDeviceAddress(virDomainDefPtr def, virDomainDefHasDeviceAddress(virDomainDefPtr def,
virDomainDeviceInfoPtr info) virDomainDeviceInfoPtr info)
{ {
if (virDomainDeviceInfoIterateInternal(def, if (virDomainDeviceInfoIterateFlags(def,
virDomainDefHasDeviceAddressIterator, virDomainDefHasDeviceAddressIterator,
DOMAIN_DEVICE_ITERATE_ALL_CONSOLES, DOMAIN_DEVICE_ITERATE_ALL_CONSOLES,
info) < 0) info) < 0)
return true; return true;
return false; return false;
@ -6007,11 +6007,11 @@ virDomainDefPostParse(virDomainDefPtr def,
} }
/* iterate the devices */ /* iterate the devices */
ret = virDomainDeviceInfoIterateInternal(def, ret = virDomainDeviceInfoIterateFlags(def,
virDomainDefPostParseDeviceIterator, virDomainDefPostParseDeviceIterator,
DOMAIN_DEVICE_ITERATE_ALL_CONSOLES | DOMAIN_DEVICE_ITERATE_ALL_CONSOLES |
DOMAIN_DEVICE_ITERATE_MISSING_INFO, DOMAIN_DEVICE_ITERATE_MISSING_INFO,
&data); &data);
if (virDomainDefPostParseCheckFailure(def, parseFlags, ret) < 0) if (virDomainDefPostParseCheckFailure(def, parseFlags, ret) < 0)
goto cleanup; goto cleanup;
@ -6496,10 +6496,10 @@ virDomainDefValidateAliases(const virDomainDef *def,
if (!(data.aliases = virHashNew(NULL))) if (!(data.aliases = virHashNew(NULL)))
goto cleanup; goto cleanup;
if (virDomainDeviceInfoIterateInternal((virDomainDefPtr) def, if (virDomainDeviceInfoIterateFlags((virDomainDefPtr) def,
virDomainDeviceDefValidateAliasesIterator, virDomainDeviceDefValidateAliasesIterator,
DOMAIN_DEVICE_ITERATE_ALL_CONSOLES, DOMAIN_DEVICE_ITERATE_ALL_CONSOLES,
&data) < 0) &data) < 0)
goto cleanup; goto cleanup;
if (aliases) if (aliases)
@ -6874,11 +6874,11 @@ virDomainDefValidate(virDomainDefPtr def,
return -1; return -1;
/* iterate the devices */ /* iterate the devices */
if (virDomainDeviceInfoIterateInternal(def, if (virDomainDeviceInfoIterateFlags(def,
virDomainDefValidateDeviceIterator, virDomainDefValidateDeviceIterator,
(DOMAIN_DEVICE_ITERATE_ALL_CONSOLES | (DOMAIN_DEVICE_ITERATE_ALL_CONSOLES |
DOMAIN_DEVICE_ITERATE_MISSING_INFO), DOMAIN_DEVICE_ITERATE_MISSING_INFO),
&data) < 0) &data) < 0)
return -1; return -1;
if (virDomainDefValidateInternal(def, xmlopt) < 0) if (virDomainDefValidateInternal(def, xmlopt) < 0)
@ -30846,9 +30846,9 @@ virDomainDefFindDevice(virDomainDefPtr def,
virDomainDefFindDeviceCallbackData data = { devAlias, dev }; virDomainDefFindDeviceCallbackData data = { devAlias, dev };
dev->type = VIR_DOMAIN_DEVICE_NONE; dev->type = VIR_DOMAIN_DEVICE_NONE;
virDomainDeviceInfoIterateInternal(def, virDomainDefFindDeviceCallback, virDomainDeviceInfoIterateFlags(def, virDomainDefFindDeviceCallback,
DOMAIN_DEVICE_ITERATE_ALL_CONSOLES, DOMAIN_DEVICE_ITERATE_ALL_CONSOLES,
&data); &data);
if (dev->type == VIR_DOMAIN_DEVICE_NONE) { if (dev->type == VIR_DOMAIN_DEVICE_NONE) {
if (reportError) { if (reportError) {