[libvirt] PATCH: Fix build without MACVTAP

Hi Commit c31d23a78715f1144c73862c46ab0436de8b5e85 removed the "conn" parameter from qemuPhysIfaceConnect(), but it's still used if WITH_MACVTAP is false. Also, it's still mentioned in the comment above the function: /** * qemuPhysIfaceConnect: * @def: the definition of the VM (needed by 802.1Qbh and audit) * @conn: pointer to virConnect object * @driver: pointer to the qemud_driver * @net: pointer to he VM's interface description with direct device type * @qemuCaps: flags for qemu * * Returns a filedescriptor on success or -1 in case of error. */ int qemuPhysIfaceConnect(virDomainDefPtr def, struct qemud_driver *driver, virDomainNetDefPtr net, virBitmapPtr qemuCaps, enum virVMOperationType vmop) { int rc; #if WITH_MACVTAP [...] #else (void)def; (void)conn; (void)net; (void)qemuCaps; (void)driver; (void)vmop; qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("No support for macvtap device")); rc = -1; #endif return rc; } -- Michael Wood <esiotrot@gmail.com>

On 11/12/2011 06:39 AM, Michael Wood wrote:
Hi
Commit c31d23a78715f1144c73862c46ab0436de8b5e85 removed the "conn" parameter from qemuPhysIfaceConnect(), but it's still used if WITH_MACVTAP is false. Also, it's still mentioned in the comment above the function:
From f4fc43b4111a4c099395c55902e497b8965e2b53 Mon Sep 17 00:00:00 2001 From: Michael Wood <esiotrot@gmail.com> Date: Sat, 12 Nov 2011 13:37:53 +0200 Subject: [PATCH] Fix build without MACVTAP.
--- src/qemu/qemu_command.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b044050..2fbf691 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -126,10 +126,10 @@ uname_normalize (struct utsname *ut) /** * qemuPhysIfaceConnect: * @def: the definition of the VM (needed by 802.1Qbh and audit) - * @conn: pointer to virConnect object * @driver: pointer to the qemud_driver * @net: pointer to he VM's interface description with direct device type * @qemuCaps: flags for qemu + * @vmop: VM operation type * * Returns a filedescriptor on success or -1 in case of error. */ @@ -165,7 +165,6 @@ qemuPhysIfaceConnect(virDomainDefPtr def,
#else (void)def; - (void)conn; (void)net; (void)qemuCaps; (void)driver;
ACK. I'll push it and add you as an author. Stefan

On Mon, Nov 14, 2011 at 03:21:21PM -0500, Stefan Berger wrote:
On 11/12/2011 06:39 AM, Michael Wood wrote:
Hi
Commit c31d23a78715f1144c73862c46ab0436de8b5e85 removed the "conn" parameter from qemuPhysIfaceConnect(), but it's still used if WITH_MACVTAP is false. Also, it's still mentioned in the comment above the function:
From f4fc43b4111a4c099395c55902e497b8965e2b53 Mon Sep 17 00:00:00 2001 From: Michael Wood <esiotrot@gmail.com> Date: Sat, 12 Nov 2011 13:37:53 +0200 Subject: [PATCH] Fix build without MACVTAP.
--- src/qemu/qemu_command.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b044050..2fbf691 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -126,10 +126,10 @@ uname_normalize (struct utsname *ut) /** * qemuPhysIfaceConnect: * @def: the definition of the VM (needed by 802.1Qbh and audit) - * @conn: pointer to virConnect object * @driver: pointer to the qemud_driver * @net: pointer to he VM's interface description with direct device type * @qemuCaps: flags for qemu + * @vmop: VM operation type * * Returns a filedescriptor on success or -1 in case of error. */ @@ -165,7 +165,6 @@ qemuPhysIfaceConnect(virDomainDefPtr def,
#else (void)def; - (void)conn; (void)net; (void)qemuCaps; (void)driver;
ACK. I'll push it and add you as an author.
FWIW, this entire conditional goes away in a later patch in my series which I've not yet pushed. Fine to push this temporary fix though. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (3)
-
Daniel P. Berrange
-
Michael Wood
-
Stefan Berger