mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
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:
parent
e5a0579996
commit
1d0c6f59b6
@ -2432,7 +2432,7 @@ void virDomainVideoDefFree(virDomainVideoDefPtr def)
|
||||
|
||||
|
||||
virDomainHostdevDefPtr
|
||||
virDomainHostdevDefAlloc(virDomainXMLOptionPtr xmlopt)
|
||||
virDomainHostdevDefNew(virDomainXMLOptionPtr xmlopt)
|
||||
{
|
||||
virDomainHostdevDefPtr def = NULL;
|
||||
|
||||
@ -13903,7 +13903,7 @@ virDomainHostdevDefParseXML(virDomainXMLOptionPtr xmlopt,
|
||||
|
||||
ctxt->node = node;
|
||||
|
||||
if (!(def = virDomainHostdevDefAlloc(xmlopt)))
|
||||
if (!(def = virDomainHostdevDefNew(xmlopt)))
|
||||
goto error;
|
||||
|
||||
if (mode) {
|
||||
|
@ -2699,7 +2699,7 @@ void virDomainMemballoonDefFree(virDomainMemballoonDefPtr def);
|
||||
void virDomainNVRAMDefFree(virDomainNVRAMDefPtr def);
|
||||
void virDomainWatchdogDefFree(virDomainWatchdogDefPtr def);
|
||||
void virDomainVideoDefFree(virDomainVideoDefPtr def);
|
||||
virDomainHostdevDefPtr virDomainHostdevDefAlloc(virDomainXMLOptionPtr xmlopt);
|
||||
virDomainHostdevDefPtr virDomainHostdevDefNew(virDomainXMLOptionPtr xmlopt);
|
||||
void virDomainHostdevDefClear(virDomainHostdevDefPtr def);
|
||||
void virDomainHostdevDefFree(virDomainHostdevDefPtr def);
|
||||
void virDomainHubDefFree(virDomainHubDefPtr def);
|
||||
|
@ -367,9 +367,9 @@ virDomainGraphicsVNCSharePolicyTypeFromString;
|
||||
virDomainGraphicsVNCSharePolicyTypeToString;
|
||||
virDomainHasNet;
|
||||
virDomainHostdevCapsTypeToString;
|
||||
virDomainHostdevDefAlloc;
|
||||
virDomainHostdevDefClear;
|
||||
virDomainHostdevDefFree;
|
||||
virDomainHostdevDefNew;
|
||||
virDomainHostdevFind;
|
||||
virDomainHostdevInsert;
|
||||
virDomainHostdevModeTypeToString;
|
||||
|
@ -394,7 +394,7 @@ lxcCreateNetDef(const char *type,
|
||||
static virDomainHostdevDefPtr
|
||||
lxcCreateHostdevDef(int mode, int type, const char *data)
|
||||
{
|
||||
virDomainHostdevDefPtr hostdev = virDomainHostdevDefAlloc(NULL);
|
||||
virDomainHostdevDefPtr hostdev = virDomainHostdevDefNew(NULL);
|
||||
|
||||
if (!hostdev)
|
||||
return NULL;
|
||||
|
@ -1162,7 +1162,7 @@ qemuParseCommandLinePCI(const char *val)
|
||||
int bus = 0, slot = 0, func = 0;
|
||||
const char *start;
|
||||
char *end;
|
||||
virDomainHostdevDefPtr def = virDomainHostdevDefAlloc(NULL);
|
||||
virDomainHostdevDefPtr def = virDomainHostdevDefNew(NULL);
|
||||
|
||||
if (!def)
|
||||
goto error;
|
||||
@ -1212,7 +1212,7 @@ qemuParseCommandLinePCI(const char *val)
|
||||
static virDomainHostdevDefPtr
|
||||
qemuParseCommandLineUSB(const char *val)
|
||||
{
|
||||
virDomainHostdevDefPtr def = virDomainHostdevDefAlloc(NULL);
|
||||
virDomainHostdevDefPtr def = virDomainHostdevDefNew(NULL);
|
||||
virDomainHostdevSubsysUSBPtr usbsrc;
|
||||
int first = 0, second = 0;
|
||||
const char *start;
|
||||
|
@ -2989,7 +2989,7 @@ vboxHostDeviceGetXMLDesc(vboxDriverPtr data, virDomainDefPtr def, IMachine *mach
|
||||
goto release_filters;
|
||||
|
||||
for (i = 0; i < def->nhostdevs; i++) {
|
||||
def->hostdevs[i] = virDomainHostdevDefAlloc(NULL);
|
||||
def->hostdevs[i] = virDomainHostdevDefNew(NULL);
|
||||
if (!def->hostdevs[i])
|
||||
goto release_hostdevs;
|
||||
}
|
||||
|
@ -458,7 +458,7 @@ xenParsePCI(virConfPtr conf, virDomainDefPtr def)
|
||||
goto skippci;
|
||||
if (virStrToLong_i(func, NULL, 16, &funcID) < 0)
|
||||
goto skippci;
|
||||
if (!(hostdev = virDomainHostdevDefAlloc(NULL)))
|
||||
if (!(hostdev = virDomainHostdevDefNew(NULL)))
|
||||
return -1;
|
||||
|
||||
hostdev->managed = false;
|
||||
|
@ -1110,7 +1110,7 @@ xenParseSxprPCI(virDomainDefPtr def,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!(dev = virDomainHostdevDefAlloc(NULL)))
|
||||
if (!(dev = virDomainHostdevDefNew(NULL)))
|
||||
goto error;
|
||||
|
||||
dev->mode = VIR_DOMAIN_HOSTDEV_MODE_SUBSYS;
|
||||
|
@ -733,7 +733,7 @@ xenParseXLUSB(virConfPtr conf, virDomainDefPtr def)
|
||||
goto skipusb;
|
||||
if (virStrToLong_i(device, NULL, 16, &devNum) < 0)
|
||||
goto skipusb;
|
||||
if (!(hostdev = virDomainHostdevDefAlloc(NULL)))
|
||||
if (!(hostdev = virDomainHostdevDefNew(NULL)))
|
||||
return -1;
|
||||
|
||||
hostdev->managed = false;
|
||||
|
@ -87,7 +87,7 @@ myInit(void)
|
||||
|
||||
for (i = 0; i < nhostdevs; i++) {
|
||||
virDomainHostdevSubsys subsys;
|
||||
hostdevs[i] = virDomainHostdevDefAlloc(NULL);
|
||||
hostdevs[i] = virDomainHostdevDefNew(NULL);
|
||||
if (!hostdevs[i])
|
||||
goto cleanup;
|
||||
hostdevs[i]->mode = VIR_DOMAIN_HOSTDEV_MODE_SUBSYS;
|
||||
|
Loading…
Reference in New Issue
Block a user