mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
Add support for VBox 3 and event callbacks on vbox
* src/vbox/vbox_driver.c: remove some old 2.5 switches and plug the 3.0 driver * src/vbox/vbox_V3_0.c src/vbox/vbox_CAPI_v3_0.h: the driver for VirtualBox 3.0 * src/vbox/vbox_tmpl.c: handle the new driver and add event support * src/Makefile.am: plug in the new module
This commit is contained in:
parent
1112330e46
commit
41e097e91a
@ -140,7 +140,8 @@ OPENVZ_DRIVER_SOURCES = \
|
||||
VBOX_DRIVER_SOURCES = \
|
||||
vbox/vbox_XPCOMCGlue.c vbox/vbox_XPCOMCGlue.h \
|
||||
vbox/vbox_driver.c vbox/vbox_driver.h \
|
||||
vbox/vbox_V2_2.c vbox/vbox_CAPI_v2_2.h
|
||||
vbox/vbox_V2_2.c vbox/vbox_CAPI_v2_2.h \
|
||||
vbox/vbox_V3_0.c vbox/vbox_CAPI_v3_0.h
|
||||
|
||||
VBOX_DRIVER_EXTRA_DIST = vbox/vbox_tmpl.c vbox/README
|
||||
|
||||
|
5342
src/vbox/vbox_CAPI_v3_0.h
Normal file
5342
src/vbox/vbox_CAPI_v3_0.h
Normal file
File diff suppressed because it is too large
Load Diff
37
src/vbox/vbox_V3_0.c
Normal file
37
src/vbox/vbox_V3_0.c
Normal file
@ -0,0 +1,37 @@
|
||||
/** @file vbox_V3_0.c
|
||||
* C file to include support for multiple versions of VirtualBox
|
||||
* at runtime.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2008-2009 Sun Microsystems, Inc.
|
||||
*
|
||||
* This file is part of a free software library; you can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License version 2.1 as published by the Free Software
|
||||
* Foundation and shipped in the "COPYING" file with this library.
|
||||
* The library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY of any kind.
|
||||
*
|
||||
* Sun LGPL Disclaimer: For the avoidance of doubt, except that if
|
||||
* any license choice other than GPL or LGPL is available it will
|
||||
* apply instead, Sun elects to use only the Lesser General Public
|
||||
* License version 2.1 (LGPLv2) at this time for any software where
|
||||
* a choice of LGPL license versions is made available with the
|
||||
* language indicating that LGPLv2 or any later version may be used,
|
||||
* or where a choice of which version of the LGPL is applied is
|
||||
* otherwise unspecified.
|
||||
*
|
||||
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
||||
* Clara, CA 95054 USA or visit http://www.sun.com if you need
|
||||
* additional information or have any questions.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/** The API Version */
|
||||
#define VBOX_API_VERSION 3000
|
||||
/** Version specific prefix. */
|
||||
#define NAME(name) vbox30##name
|
||||
|
||||
#include "vbox_tmpl.c"
|
@ -41,10 +41,8 @@
|
||||
|
||||
extern virDriver vbox22Driver;
|
||||
extern virNetworkDriver vbox22NetworkDriver;
|
||||
#if 0
|
||||
extern virDriver vbox25Driver;
|
||||
extern virNetworkDriver vbox25NetworkDriver;
|
||||
#endif
|
||||
extern virDriver vbox30Driver;
|
||||
extern virNetworkDriver vbox30NetworkDriver;
|
||||
|
||||
static virDriver vboxDriverDummy;
|
||||
|
||||
@ -85,12 +83,10 @@ int vboxRegister(void) {
|
||||
DEBUG0("VirtualBox API version: 2.2");
|
||||
driver = &vbox22Driver;
|
||||
networkDriver = &vbox22NetworkDriver;
|
||||
#if 0
|
||||
} else if (uVersion >= 2002051 && uVersion < 2005051) {
|
||||
DEBUG0("VirtualBox API version: 2.5");
|
||||
driver = &vbox25Driver;
|
||||
networkDriver = &vbox25NetworkDriver;
|
||||
#endif
|
||||
} else if (uVersion >= 2002051 && uVersion < 3000051) {
|
||||
DEBUG0("VirtualBox API version: 3.0");
|
||||
driver = &vbox30Driver;
|
||||
networkDriver = &vbox30NetworkDriver;
|
||||
} else {
|
||||
DEBUG0("Unsupport VirtualBox API version");
|
||||
}
|
||||
|
1302
src/vbox/vbox_tmpl.c
1302
src/vbox/vbox_tmpl.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user