conf: Rename virDomainHostdevDefAlloc() to virDomainHostdevDefNew()

All other virDomain*Def follow this naming convention for
their allocation function.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Andrea Bolognani 2017-06-25 14:11:12 +02:00
parent e5a0579996
commit 1d0c6f59b6
10 changed files with 12 additions and 12 deletions

View File

@ -2432,7 +2432,7 @@ void virDomainVideoDefFree(virDomainVideoDefPtr def)
virDomainHostdevDefPtr virDomainHostdevDefPtr
virDomainHostdevDefAlloc(virDomainXMLOptionPtr xmlopt) virDomainHostdevDefNew(virDomainXMLOptionPtr xmlopt)
{ {
virDomainHostdevDefPtr def = NULL; virDomainHostdevDefPtr def = NULL;
@ -13903,7 +13903,7 @@ virDomainHostdevDefParseXML(virDomainXMLOptionPtr xmlopt,
ctxt->node = node; ctxt->node = node;
if (!(def = virDomainHostdevDefAlloc(xmlopt))) if (!(def = virDomainHostdevDefNew(xmlopt)))
goto error; goto error;
if (mode) { if (mode) {

View File

@ -2699,7 +2699,7 @@ void virDomainMemballoonDefFree(virDomainMemballoonDefPtr def);
void virDomainNVRAMDefFree(virDomainNVRAMDefPtr def); void virDomainNVRAMDefFree(virDomainNVRAMDefPtr def);
void virDomainWatchdogDefFree(virDomainWatchdogDefPtr def); void virDomainWatchdogDefFree(virDomainWatchdogDefPtr def);
void virDomainVideoDefFree(virDomainVideoDefPtr def); void virDomainVideoDefFree(virDomainVideoDefPtr def);
virDomainHostdevDefPtr virDomainHostdevDefAlloc(virDomainXMLOptionPtr xmlopt); virDomainHostdevDefPtr virDomainHostdevDefNew(virDomainXMLOptionPtr xmlopt);
void virDomainHostdevDefClear(virDomainHostdevDefPtr def); void virDomainHostdevDefClear(virDomainHostdevDefPtr def);
void virDomainHostdevDefFree(virDomainHostdevDefPtr def); void virDomainHostdevDefFree(virDomainHostdevDefPtr def);
void virDomainHubDefFree(virDomainHubDefPtr def); void virDomainHubDefFree(virDomainHubDefPtr def);

View File

@ -367,9 +367,9 @@ virDomainGraphicsVNCSharePolicyTypeFromString;
virDomainGraphicsVNCSharePolicyTypeToString; virDomainGraphicsVNCSharePolicyTypeToString;
virDomainHasNet; virDomainHasNet;
virDomainHostdevCapsTypeToString; virDomainHostdevCapsTypeToString;
virDomainHostdevDefAlloc;
virDomainHostdevDefClear; virDomainHostdevDefClear;
virDomainHostdevDefFree; virDomainHostdevDefFree;
virDomainHostdevDefNew;
virDomainHostdevFind; virDomainHostdevFind;
virDomainHostdevInsert; virDomainHostdevInsert;
virDomainHostdevModeTypeToString; virDomainHostdevModeTypeToString;

View File

@ -394,7 +394,7 @@ lxcCreateNetDef(const char *type,
static virDomainHostdevDefPtr static virDomainHostdevDefPtr
lxcCreateHostdevDef(int mode, int type, const char *data) lxcCreateHostdevDef(int mode, int type, const char *data)
{ {
virDomainHostdevDefPtr hostdev = virDomainHostdevDefAlloc(NULL); virDomainHostdevDefPtr hostdev = virDomainHostdevDefNew(NULL);
if (!hostdev) if (!hostdev)
return NULL; return NULL;

View File

@ -1162,7 +1162,7 @@ qemuParseCommandLinePCI(const char *val)
int bus = 0, slot = 0, func = 0; int bus = 0, slot = 0, func = 0;
const char *start; const char *start;
char *end; char *end;
virDomainHostdevDefPtr def = virDomainHostdevDefAlloc(NULL); virDomainHostdevDefPtr def = virDomainHostdevDefNew(NULL);
if (!def) if (!def)
goto error; goto error;
@ -1212,7 +1212,7 @@ qemuParseCommandLinePCI(const char *val)
static virDomainHostdevDefPtr static virDomainHostdevDefPtr
qemuParseCommandLineUSB(const char *val) qemuParseCommandLineUSB(const char *val)
{ {
virDomainHostdevDefPtr def = virDomainHostdevDefAlloc(NULL); virDomainHostdevDefPtr def = virDomainHostdevDefNew(NULL);
virDomainHostdevSubsysUSBPtr usbsrc; virDomainHostdevSubsysUSBPtr usbsrc;
int first = 0, second = 0; int first = 0, second = 0;
const char *start; const char *start;

View File

@ -2989,7 +2989,7 @@ vboxHostDeviceGetXMLDesc(vboxDriverPtr data, virDomainDefPtr def, IMachine *mach
goto release_filters; goto release_filters;
for (i = 0; i < def->nhostdevs; i++) { for (i = 0; i < def->nhostdevs; i++) {
def->hostdevs[i] = virDomainHostdevDefAlloc(NULL); def->hostdevs[i] = virDomainHostdevDefNew(NULL);
if (!def->hostdevs[i]) if (!def->hostdevs[i])
goto release_hostdevs; goto release_hostdevs;
} }

View File

@ -458,7 +458,7 @@ xenParsePCI(virConfPtr conf, virDomainDefPtr def)
goto skippci; goto skippci;
if (virStrToLong_i(func, NULL, 16, &funcID) < 0) if (virStrToLong_i(func, NULL, 16, &funcID) < 0)
goto skippci; goto skippci;
if (!(hostdev = virDomainHostdevDefAlloc(NULL))) if (!(hostdev = virDomainHostdevDefNew(NULL)))
return -1; return -1;
hostdev->managed = false; hostdev->managed = false;

View File

@ -1110,7 +1110,7 @@ xenParseSxprPCI(virDomainDefPtr def,
goto error; goto error;
} }
if (!(dev = virDomainHostdevDefAlloc(NULL))) if (!(dev = virDomainHostdevDefNew(NULL)))
goto error; goto error;
dev->mode = VIR_DOMAIN_HOSTDEV_MODE_SUBSYS; dev->mode = VIR_DOMAIN_HOSTDEV_MODE_SUBSYS;

View File

@ -733,7 +733,7 @@ xenParseXLUSB(virConfPtr conf, virDomainDefPtr def)
goto skipusb; goto skipusb;
if (virStrToLong_i(device, NULL, 16, &devNum) < 0) if (virStrToLong_i(device, NULL, 16, &devNum) < 0)
goto skipusb; goto skipusb;
if (!(hostdev = virDomainHostdevDefAlloc(NULL))) if (!(hostdev = virDomainHostdevDefNew(NULL)))
return -1; return -1;
hostdev->managed = false; hostdev->managed = false;

View File

@ -87,7 +87,7 @@ myInit(void)
for (i = 0; i < nhostdevs; i++) { for (i = 0; i < nhostdevs; i++) {
virDomainHostdevSubsys subsys; virDomainHostdevSubsys subsys;
hostdevs[i] = virDomainHostdevDefAlloc(NULL); hostdevs[i] = virDomainHostdevDefNew(NULL);
if (!hostdevs[i]) if (!hostdevs[i])
goto cleanup; goto cleanup;
hostdevs[i]->mode = VIR_DOMAIN_HOSTDEV_MODE_SUBSYS; hostdevs[i]->mode = VIR_DOMAIN_HOSTDEV_MODE_SUBSYS;