aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaine Stump <laine@laine.org>2012-02-23 12:59:21 -0500
committerLaine Stump <laine@laine.org>2012-03-05 23:23:31 -0500
commit37038d5c0b94c0c0c7c504e42eb16ab1d603ccf6 (patch)
tree2d7492c5638d1c6edb81175624d145e89224cb33 /src
parentconf: reorder static functions in domain_conf.c (diff)
downloadlibvirt-37038d5c0b94c0c0c7c504e42eb16ab1d603ccf6.tar.gz
libvirt-37038d5c0b94c0c0c7c504e42eb16ab1d603ccf6.tar.bz2
libvirt-37038d5c0b94c0c0c7c504e42eb16ab1d603ccf6.zip
qemu: rename virDomainDeviceInfoPtr variables to avoid confusion
The virDomainDeviceInfoPtrs in qemuCollectPCIAddress and qemuComparePCIDevice are named "dev" and "dev1", but those functions will be changed (in order to match a change in the args sent to virDomainDeviceInfoIterate() callback args) to contain a virDomainDeviceDefPtr device. This patch renames "dev" to "info" (and "dev[n]" to "info[n]") to avoid later confusion.
Diffstat (limited to 'src')
-rw-r--r--src/qemu/qemu_command.c18
-rw-r--r--src/qemu/qemu_hotplug.c12
2 files changed, 15 insertions, 15 deletions
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index cddd6aa0a..cb9b6ae57 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -833,22 +833,22 @@ static char *qemuPCIAddressAsString(virDomainDeviceInfoPtr dev)
static int qemuCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
- virDomainDeviceInfoPtr dev,
+ virDomainDeviceInfoPtr info,
void *opaque)
{
int ret = -1;
char *addr = NULL;
qemuDomainPCIAddressSetPtr addrs = opaque;
- if (dev->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI)
+ if (info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI)
return 0;
- addr = qemuPCIAddressAsString(dev);
+ addr = qemuPCIAddressAsString(info);
if (!addr)
goto cleanup;
if (virHashLookup(addrs->used, addr)) {
- if (dev->addr.pci.function != 0) {
+ if (info->addr.pci.function != 0) {
qemuReportError(VIR_ERR_XML_ERROR,
_("Attempted double use of PCI Address '%s' "
"(may need \"multifunction='on'\" for device on function 0"),
@@ -865,15 +865,15 @@ static int qemuCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
goto cleanup;
addr = NULL;
- if ((dev->addr.pci.function == 0) &&
- (dev->addr.pci.multi != VIR_DOMAIN_DEVICE_ADDRESS_PCI_MULTI_ON)) {
+ if ((info->addr.pci.function == 0) &&
+ (info->addr.pci.multi != VIR_DOMAIN_DEVICE_ADDRESS_PCI_MULTI_ON)) {
/* a function 0 w/o multifunction=on must reserve the entire slot */
int function;
- virDomainDeviceInfo temp_dev = *dev;
+ virDomainDeviceInfo temp_info = *info;
for (function = 1; function < QEMU_PCI_ADDRESS_LAST_FUNCTION; function++) {
- temp_dev.addr.pci.function = function;
- addr = qemuPCIAddressAsString(&temp_dev);
+ temp_info.addr.pci.function = function;
+ addr = qemuPCIAddressAsString(&temp_info);
if (!addr)
goto cleanup;
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 5c64dbebf..0ca31861f 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1481,17 +1481,17 @@ static inline int qemuFindDisk(virDomainDefPtr def, const char *dst)
}
static int qemuComparePCIDevice(virDomainDefPtr def ATTRIBUTE_UNUSED,
- virDomainDeviceInfoPtr dev1,
+ virDomainDeviceInfoPtr info1,
void *opaque)
{
- virDomainDeviceInfoPtr dev2 = opaque;
+ virDomainDeviceInfoPtr info2 = opaque;
- if (dev1->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI ||
- dev2->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI)
+ if (info1->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI ||
+ info2->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI)
return 0;
- if (dev1->addr.pci.slot == dev2->addr.pci.slot &&
- dev1->addr.pci.function != dev2->addr.pci.function)
+ if (info1->addr.pci.slot == info2->addr.pci.slot &&
+ info1->addr.pci.function != info2->addr.pci.function)
return -1;
return 0;
}