qemu: hostdev: Unify naming for qemuHostdevPrepare*Devices()

Adopt the same names used for virHostdevPrepare*Devices() for
consistency's sake and to make it easier to jump between the two.

No functional changes.
This commit is contained in:
Andrea Bolognani 2015-10-20 14:10:16 +02:00
parent 2ab52f4af7
commit c074a64251
4 changed files with 37 additions and 37 deletions

View File

@ -156,9 +156,9 @@ qemuHostdevHostSupportsPassthroughLegacy(void)
static bool
qemuPrepareHostdevPCICheckSupport(virDomainHostdevDefPtr *hostdevs,
size_t nhostdevs,
virQEMUCapsPtr qemuCaps)
qemuHostdevPreparePCIDevicesCheckSupport(virDomainHostdevDefPtr *hostdevs,
size_t nhostdevs,
virQEMUCapsPtr qemuCaps)
{
bool supportsPassthroughKVM = qemuHostdevHostSupportsPassthroughLegacy();
bool supportsPassthroughVFIO = qemuHostdevHostSupportsPassthroughVFIO();
@ -219,7 +219,7 @@ qemuPrepareHostdevPCICheckSupport(virDomainHostdevDefPtr *hostdevs,
}
int
qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
qemuHostdevPreparePCIDevices(virQEMUDriverPtr driver,
const char *name,
const unsigned char *uuid,
virDomainHostdevDefPtr *hostdevs,
@ -230,7 +230,7 @@ qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
int ret = -1;
virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr;
if (!qemuPrepareHostdevPCICheckSupport(hostdevs, nhostdevs, qemuCaps))
if (!qemuHostdevPreparePCIDevicesCheckSupport(hostdevs, nhostdevs, qemuCaps))
goto out;
ret = virHostdevPreparePCIDevices(hostdev_mgr, QEMU_DRIVER_NAME,
@ -241,11 +241,11 @@ qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
}
int
qemuPrepareHostUSBDevices(virQEMUDriverPtr driver,
const char *name,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs,
unsigned int flags)
qemuHostdevPrepareUSBDevices(virQEMUDriverPtr driver,
const char *name,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs,
unsigned int flags)
{
virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr;
@ -254,7 +254,7 @@ qemuPrepareHostUSBDevices(virQEMUDriverPtr driver,
}
int
qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver,
qemuHostdevPrepareSCSIDevices(virQEMUDriverPtr driver,
const char *name,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs)
@ -284,24 +284,24 @@ qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver,
int
qemuPrepareHostDevices(virQEMUDriverPtr driver,
virDomainDefPtr def,
virQEMUCapsPtr qemuCaps,
unsigned int flags)
qemuHostdevPrepareDomainDevices(virQEMUDriverPtr driver,
virDomainDefPtr def,
virQEMUCapsPtr qemuCaps,
unsigned int flags)
{
if (!def->nhostdevs)
return 0;
if (qemuPrepareHostdevPCIDevices(driver, def->name, def->uuid,
if (qemuHostdevPreparePCIDevices(driver, def->name, def->uuid,
def->hostdevs, def->nhostdevs,
qemuCaps, flags) < 0)
return -1;
if (qemuPrepareHostUSBDevices(driver, def->name,
def->hostdevs, def->nhostdevs, flags) < 0)
if (qemuHostdevPrepareUSBDevices(driver, def->name,
def->hostdevs, def->nhostdevs, flags) < 0)
return -1;
if (qemuPrepareHostdevSCSIDevices(driver, def->name,
if (qemuHostdevPrepareSCSIDevices(driver, def->name,
def->hostdevs, def->nhostdevs) < 0)
return -1;

View File

@ -35,27 +35,27 @@ int qemuUpdateActiveSCSIHostdevs(virQEMUDriverPtr driver,
virDomainDefPtr def);
bool qemuHostdevHostSupportsPassthroughLegacy(void);
bool qemuHostdevHostSupportsPassthroughVFIO(void);
int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
int qemuHostdevPreparePCIDevices(virQEMUDriverPtr driver,
const char *name,
const unsigned char *uuid,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs,
virQEMUCapsPtr qemuCaps,
unsigned int flags);
int
qemuPrepareHostUSBDevices(virQEMUDriverPtr driver,
const char *name,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs,
unsigned int flags);
int qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver,
int qemuHostdevPrepareUSBDevices(virQEMUDriverPtr driver,
const char *name,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs,
unsigned int flags);
int qemuHostdevPrepareSCSIDevices(virQEMUDriverPtr driver,
const char *name,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs);
int qemuPrepareHostDevices(virQEMUDriverPtr driver,
virDomainDefPtr def,
virQEMUCapsPtr qemuCaps,
unsigned int flags);
int qemuHostdevPrepareDomainDevices(virQEMUDriverPtr driver,
virDomainDefPtr def,
virQEMUCapsPtr qemuCaps,
unsigned int flags);
void
qemuDomainReAttachHostUSBDevices(virQEMUDriverPtr driver,
const char *name,

View File

@ -1263,11 +1263,11 @@ qemuDomainAttachHostPCIDevice(virQEMUDriverPtr driver,
if (!cfg->relaxedACS)
flags |= VIR_HOSTDEV_STRICT_ACS_CHECK;
if (qemuPrepareHostdevPCIDevices(driver, vm->def->name, vm->def->uuid,
if (qemuHostdevPreparePCIDevices(driver, vm->def->name, vm->def->uuid,
&hostdev, 1, priv->qemuCaps, flags) < 0)
goto cleanup;
/* this could have been changed by qemuPrepareHostdevPCIDevices */
/* this could have been changed by qemuHostdevPreparePCIDevices */
backend = hostdev->source.subsys.u.pci.backend;
switch ((virDomainHostdevSubsysPCIBackendType) backend) {
@ -1885,7 +1885,7 @@ qemuDomainAttachHostUSBDevice(virQEMUDriverPtr driver,
bool teardownlabel = false;
int ret = -1;
if (qemuPrepareHostUSBDevices(driver, vm->def->name, &hostdev, 1, 0) < 0)
if (qemuHostdevPrepareUSBDevices(driver, vm->def->name, &hostdev, 1, 0) < 0)
goto cleanup;
added = true;
@ -1968,7 +1968,7 @@ qemuDomainAttachHostSCSIDevice(virConnectPtr conn,
if (!cont)
return -1;
if (qemuPrepareHostdevSCSIDevices(driver, vm->def->name,
if (qemuHostdevPrepareSCSIDevices(driver, vm->def->name,
&hostdev, 1)) {
virDomainHostdevSubsysSCSIPtr scsisrc = &hostdev->source.subsys.u.scsi;
if (scsisrc->protocol == VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI) {

View File

@ -4490,8 +4490,8 @@ int qemuProcessStart(virConnectPtr conn,
hostdev_flags |= VIR_HOSTDEV_STRICT_ACS_CHECK;
if (!migrateFrom)
hostdev_flags |= VIR_HOSTDEV_COLD_BOOT;
if (qemuPrepareHostDevices(driver, vm->def, priv->qemuCaps,
hostdev_flags) < 0)
if (qemuHostdevPrepareDomainDevices(driver, vm->def, priv->qemuCaps,
hostdev_flags) < 0)
goto cleanup;
VIR_DEBUG("Preparing chr devices");