[libvirt] [RFC PATCH 2/4] Add helpers qemuPrepareHostdevPCIDevices and qemuDomainReAttachHostdevDevices
Chris Wright
chrisw at redhat.com
Mon Jul 26 16:29:51 UTC 2010
* Daniel Veillard (veillard at redhat.com) wrote:
> On Fri, Jul 23, 2010 at 11:03:45PM -0700, Chris Wright wrote:
> > These new helpers take hostdev list and count directly rather than
> > getting them indirectly from domain definition. This will allow reuse
> > for the attach-device case.
>
> > +static int
> > +qemuPrepareHostPCIDevices(struct qemud_driver *driver,
> > + virDomainDefPtr def)
> > +{
> > + return qemuPrepareHostdevPCIDevices(driver, def->hostdevs, def->nhostdevs);
>
> Except for a tab here used for indenting, looks fine too
Thanks, that and two other similar bits showed up in make syntax-check
(thanks for the clue danpb).
With changes below, it's make syntax-check clean. I can resend with
those incorporated once testing is complete.
thanks,
-chris
---
src/qemu/qemu_driver.c | 4 ++--
src/util/pci.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 28be97f..5ede991 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3132,7 +3132,7 @@ static int
qemuPrepareHostPCIDevices(struct qemud_driver *driver,
virDomainDefPtr def)
{
- return qemuPrepareHostdevPCIDevices(driver, def->hostdevs, def->nhostdevs);
+ return qemuPrepareHostdevPCIDevices(driver, def->hostdevs, def->nhostdevs);
}
@@ -8017,7 +8017,7 @@ static int qemudDomainAttachHostPciDevice(struct qemud_driver *driver,
}
if (qemuPrepareHostdevPCIDevices(driver, &hostdev, 1))
- return -1;
+ return -1;
if (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) {
if (qemuAssignDeviceHostdevAlias(vm->def, hostdev, -1) < 0)
diff --git a/src/util/pci.c b/src/util/pci.c
index 94bffae..1c10067 100644
--- a/src/util/pci.c
+++ b/src/util/pci.c
@@ -644,7 +644,7 @@ pciInitDevice(pciDevice *dev)
int
pciResetDevice(pciDevice *dev,
pciDeviceList *activeDevs,
- pciDeviceList *inactiveDevs)
+ pciDeviceList *inactiveDevs)
{
int ret = -1;
More information about the libvir-list
mailing list