[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] vbox: Add support for VirtualBox 4.1

On 10/23/2011 08:10 AM, Matthias Bolte wrote:
Deal with the incompatible changes in the VirtualBox 4.1 API.

INetworkAdapter has its different AttachTo* method replaced by
a settable attachmentType property.

The maximum number of network adapters is now requestable per
chipset type.

The OpenMedium method got a bool parameter to request opening
a medium under a new IID.

This patch is compile-tested only and was created by fixing compile
errors and looking at the changelog between VirtualBox 4.0 and 4.1.

As I currently don't have VirtualBox 4.1 installed and don't have
time to upgrade my system and test this, it would be nice if someone
with VirtualBox 4.1 at hand could runtime test this patch.

Sounds like you got that:

The new vbox_CAPI_v4_1.h header file hase been edited out of this patch.
The full patch is attached packed.

  src/Makefile.am           |    3 +-
  src/vbox/vbox_CAPI_v4_1.h | 7882 +++++++++++++++++++++++++++++++++++++++++++++
  src/vbox/vbox_V4_1.c      |   13 +
  src/vbox/vbox_driver.c    |    8 +
  src/vbox/vbox_tmpl.c      |   88 +-
  5 files changed, 7983 insertions(+), 11 deletions(-)
  create mode 100644 src/vbox/vbox_CAPI_v4_1.h
  create mode 100644 src/vbox/vbox_V4_1.c

@@ -122,6 +125,11 @@ int vboxRegister(void) {
              driver        =&vbox40Driver;
              networkDriver =&vbox40NetworkDriver;
              storageDriver =&vbox40StorageDriver;
+        } else if (uVersion>= 4000051&&  uVersion<  4001051) {
+            VIR_DEBUG("VirtualBox API version: 4.1");
+            driver        =&vbox41Driver;
+            networkDriver =&vbox41NetworkDriver;
+            storageDriver =&vbox41StorageDriver;
          } else {
              VIR_DEBUG("Unsupport VirtualBox API version");

While you're here: s/Unsupport/Unsupported/

I couldn't do any better than your compile-testing, but it looks sane enough that I'm okay giving:


Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]