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

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

 



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:
https://www.redhat.com/archives/libvirt-users/2011-October/msg00080.html


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:

ACK.

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]