|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: rename is_assigned to is_pcidev_in_array
# HG changeset patch
# User Doug Magee <djmagee@xxxxxxxxxxxx>
# Date 1327419379 0
# Node ID 4cd3560aec0bf8975905b1633392cdd97db195bb
# Parent b7936bee33bf3e41dd79a8bb5a4e3f72809945a0
libxl: rename is_assigned to is_pcidev_in_array
All this function does is check to see if a device is in an array of
pcidevs passed by the caller. The function name can be misleading if
ever used to check against a list of devices other than those assigned
to a domain.
Signed-off-by: Doug Magee <djmagee@xxxxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
diff -r b7936bee33bf -r 4cd3560aec0b tools/libxl/libxl_pci.c
--- a/tools/libxl/libxl_pci.c Tue Jan 24 15:33:36 2012 +0000
+++ b/tools/libxl/libxl_pci.c Tue Jan 24 15:36:19 2012 +0000
@@ -447,7 +447,7 @@
return 0;
}
-static int is_assigned(libxl_device_pci *assigned, int num_assigned,
+static int is_pcidev_in_array(libxl_device_pci *assigned, int num_assigned,
int dom, int bus, int dev, int func)
{
int i;
@@ -496,7 +496,7 @@
if ( sscanf(de->d_name, PCI_BDF, &dom, &bus, &dev, &func) != 4 )
continue;
- if ( is_assigned(assigned, num_assigned, dom, bus, dev, func) )
+ if ( is_pcidev_in_array(assigned, num_assigned, dom, bus, dev, func) )
continue;
new = realloc(pcidevs, ((*num) + 1) * sizeof(*new));
@@ -788,7 +788,7 @@
LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "cannot determine if device is
assigned, refusing to continue");
goto out;
}
- if ( is_assigned(assigned, num_assigned, pcidev->domain,
+ if ( is_pcidev_in_array(assigned, num_assigned, pcidev->domain,
pcidev->bus, pcidev->dev, pcidev->func) ) {
LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "PCI device already attached to a
domain");
rc = ERROR_FAIL;
@@ -892,7 +892,7 @@
return ERROR_FAIL;
rc = ERROR_INVAL;
- if ( !is_assigned(assigned, num, pcidev->domain,
+ if ( !is_pcidev_in_array(assigned, num, pcidev->domain,
pcidev->bus, pcidev->dev, pcidev->func) ) {
LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "PCI device not attached to this
domain");
goto out_fail;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |