Signed-off-by: Chunyan Liu <cyliu@xxxxxxxx> --- src/libvirt_private.syms | 8 ++++---- src/qemu/qemu_hostdev.c | 16 +++++++-------- src/util/virhostdev.c | 52 ++++++++++++++++++++++++------------------------ src/util/virhostdev.h | 40 ++++++++++++++++++------------------- 4 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 5bb529c..e7d9d56 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1297,10 +1297,10 @@ virHostdevManagerGetDefault; virHostdevPciNodeDeviceDetach; virHostdevPciNodeDeviceReAttach; virHostdevPciNodeDeviceReset; -virHostdevPreparePCIDevices; -virHostdevPrepareSCSIDevices; -virHostdevPrepareUSBDevices; -virHostdevReAttachPCIDevices; +virHostdevPreparePciHostdevs; +virHostdevPrepareScsiHostdevs; +virHostdevPrepareUsbHostdevs; +virHostdevReAttachPciHostdevs; virHostdevReAttachScsiHostdevs; virHostdevReAttachUsbHostdevs; virHostdevUpdateActivePciHostdevs; diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index c83b95d..6648b71 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu_hostdev.c @@ -225,8 +225,8 @@ qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver, if (!qemuPrepareHostdevPCICheckSupport(hostdevs, nhostdevs, qemuCaps)) goto out; - ret = virHostdevPreparePCIDevices(hostdev_mgr, QEMU_DRIVER_NAME, - name, uuid, hostdevs, + ret = virHostdevPreparePciHostdevs(hostdev_mgr, QEMU_DRIVER_NAME, + name, uuid, hostdevs, nhostdevs, flags); out: return ret; @@ -241,8 +241,8 @@ qemuPrepareHostUSBDevices(virQEMUDriverPtr driver, { virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr; - return virHostdevPrepareUSBDevices(hostdev_mgr, QEMU_DRIVER_NAME, name, - hostdevs, nhostdevs, flags); + return virHostdevPrepareUsbHostdevs(hostdev_mgr, QEMU_DRIVER_NAME, name, + hostdevs, nhostdevs, flags); } int @@ -270,8 +270,8 @@ qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver, return -1; } - return virHostdevPrepareSCSIDevices(hostdev_mgr, QEMU_DRIVER_NAME, - name, hostdevs, nhostdevs); + return virHostdevPrepareScsiHostdevs(hostdev_mgr, QEMU_DRIVER_NAME, + name, hostdevs, nhostdevs); } @@ -310,8 +310,8 @@ qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver, char *oldStateDir = cfg->stateDir; virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr; - virHostdevReAttachPCIDevices(hostdev_mgr, QEMU_DRIVER_NAME, name, - hostdevs, nhostdevs, oldStateDir); + virHostdevReAttachPciHostdevs(hostdev_mgr, QEMU_DRIVER_NAME, name, + hostdevs, nhostdevs, oldStateDir); virObjectUnref(cfg); } diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 2c8bdf9..ab36e1f 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -455,13 +455,13 @@ virHostdevNetConfigRestore(virDomainHostdevDefPtr hostdev, } int -virHostdevPreparePCIDevices(virHostdevManagerPtr hostdev_mgr, - const char *drv_name, - const char *dom_name, - const unsigned char *uuid, - virDomainHostdevDefPtr *hostdevs, - int nhostdevs, - unsigned int flags) +virHostdevPreparePciHostdevs(virHostdevManagerPtr hostdev_mgr, + const char *drv_name, + const char *dom_name, + const unsigned char *uuid, + virDomainHostdevDefPtr *hostdevs, + int nhostdevs, + unsigned int flags) { virPCIDeviceListPtr pcidevs = NULL; int last_processed_hostdev_vf = -1; @@ -692,12 +692,12 @@ virHostdevReattachPciDevice(virPCIDevicePtr dev, virHostdevManagerPtr mgr) * For upgrade purpose: see virHostdevNetConfigRestore */ void -virHostdevReAttachPCIDevices(virHostdevManagerPtr hostdev_mgr, - const char *drv_name, - const char *dom_name, - virDomainHostdevDefPtr *hostdevs, - int nhostdevs, - char *oldStateDir) +virHostdevReAttachPciHostdevs(virHostdevManagerPtr hostdev_mgr, + const char *drv_name, + const char *dom_name, + virDomainHostdevDefPtr *hostdevs, + int nhostdevs, + char *oldStateDir) { virPCIDeviceListPtr pcidevs; size_t i; @@ -1075,12 +1075,12 @@ out: } int -virHostdevPrepareUSBDevices(virHostdevManagerPtr hostdev_mgr, - const char *drv_name, - const char *dom_name, - virDomainHostdevDefPtr *hostdevs, - int nhostdevs, - unsigned int flags) +virHostdevPrepareUsbHostdevs(virHostdevManagerPtr hostdev_mgr, + const char *drv_name, + const char *dom_name, + virDomainHostdevDefPtr *hostdevs, + int nhostdevs, + unsigned int flags) { size_t i; int ret = -1; @@ -1091,7 +1091,7 @@ virHostdevPrepareUSBDevices(virHostdevManagerPtr hostdev_mgr, /* To prevent situation where USB device is assigned to two domains * we need to keep a list of currently assigned USB devices. * This is done in several loops which cannot be joined into one big - * loop. See virHostdevPreparePCIDevices() + * loop. See virHostdevPreparePciHostdevs() */ if (!(list = virUSBDeviceListNew())) goto cleanup; @@ -1146,11 +1146,11 @@ cleanup: } int -virHostdevPrepareSCSIDevices(virHostdevManagerPtr hostdev_mgr, - const char *drv_name, - const char *dom_name, - virDomainHostdevDefPtr *hostdevs, - int nhostdevs) +virHostdevPrepareScsiHostdevs(virHostdevManagerPtr hostdev_mgr, + const char *drv_name, + const char *dom_name, + virDomainHostdevDefPtr *hostdevs, + int nhostdevs) { size_t i, j; int count; @@ -1160,7 +1160,7 @@ virHostdevPrepareSCSIDevices(virHostdevManagerPtr hostdev_mgr, /* To prevent situation where SCSI device is assigned to two domains * we need to keep a list of currently assigned SCSI devices. * This is done in several loops which cannot be joined into one big - * loop. See virHostdevPreparePCIDevices() + * loop. See virHostdevPreparePciHostdevs() */ if (!(list = virSCSIDeviceListNew())) goto cleanup; diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h index d28fb15..3fd38b5 100644 --- a/src/util/virhostdev.h +++ b/src/util/virhostdev.h @@ -51,33 +51,33 @@ struct _virHostdevManager { virHostdevManagerPtr virHostdevManagerGetDefault(void); int -virHostdevPreparePCIDevices(virHostdevManagerPtr hostdev_mgr, - const char *drv_name, - const char *dom_name, - const unsigned char *uuid, - virDomainHostdevDefPtr *hostdevs, - int nhostdevs, - unsigned int flags); -int -virHostdevPrepareUSBDevices(virHostdevManagerPtr hostdev_mgr, - const char *drv_name, - const char *dom_name, - virDomainHostdevDefPtr *hostdevs, - int nhostdevs, - unsigned int flags); -int -virHostdevPrepareSCSIDevices(virHostdevManagerPtr hostdev_mgr, +virHostdevPreparePciHostdevs(virHostdevManagerPtr hostdev_mgr, const char *drv_name, const char *dom_name, + const unsigned char *uuid, virDomainHostdevDefPtr *hostdevs, - int nhostdevs); -void -virHostdevReAttachPCIDevices(virHostdevManagerPtr hostdev_mgr, + int nhostdevs, + unsigned int flags); +int +virHostdevPrepareUsbHostdevs(virHostdevManagerPtr hostdev_mgr, const char *drv_name, const char *dom_name, virDomainHostdevDefPtr *hostdevs, int nhostdevs, - char *oldStateDir); + unsigned int flags); +int +virHostdevPrepareScsiHostdevs(virHostdevManagerPtr hostdev_mgr, + const char *drv_name, + const char *dom_name, + virDomainHostdevDefPtr *hostdevs, + int nhostdevs); +void +virHostdevReAttachPciHostdevs(virHostdevManagerPtr hostdev_mgr, + const char *drv_name, + const char *dom_name, + virDomainHostdevDefPtr *hostdevs, + int nhostdevs, + char *oldStateDir); void virHostdevReAttachUsbHostdevs(virHostdevManagerPtr hostdev_mgr, const char *drv_name, -- 1.9.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list