mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
vbox: Add support for version 3.1
Also fixed serial port configuration which was broken due to recent change in virDomainChrDef where targetType was newly added. * src/Makefile.am: add new files * src/vbox/vbox_driver.c: add case for version 3.1 * src/vbox/vbox_tmpl.c: refactor common patterns into macros, support for version 3.1, serial port configuration fix * src/vbox/vbox_CAPI_v3_1.h, src/vbox/vbox_V3_1.c: generated code
This commit is contained in:
parent
63166a4e0c
commit
834d65471d
@ -178,7 +178,8 @@ 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_V3_0.c vbox/vbox_CAPI_v3_0.h
|
||||
vbox/vbox_V3_0.c vbox/vbox_CAPI_v3_0.h \
|
||||
vbox/vbox_V3_1.c vbox/vbox_CAPI_v3_1.h
|
||||
|
||||
VBOX_DRIVER_EXTRA_DIST = vbox/vbox_tmpl.c vbox/README
|
||||
|
||||
|
5273
src/vbox/vbox_CAPI_v3_1.h
Normal file
5273
src/vbox/vbox_CAPI_v3_1.h
Normal file
File diff suppressed because it is too large
Load Diff
37
src/vbox/vbox_V3_1.c
Normal file
37
src/vbox/vbox_V3_1.c
Normal file
@ -0,0 +1,37 @@
|
||||
/** @file vbox_V3_1.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 3001
|
||||
/** Version specific prefix. */
|
||||
#define NAME(name) vbox31##name
|
||||
|
||||
#include "vbox_tmpl.c"
|
@ -45,6 +45,9 @@ extern virStorageDriver vbox22StorageDriver;
|
||||
extern virDriver vbox30Driver;
|
||||
extern virNetworkDriver vbox30NetworkDriver;
|
||||
extern virStorageDriver vbox30StorageDriver;
|
||||
extern virDriver vbox31Driver;
|
||||
extern virNetworkDriver vbox31NetworkDriver;
|
||||
extern virStorageDriver vbox31StorageDriver;
|
||||
|
||||
static virDriver vboxDriverDummy;
|
||||
|
||||
@ -93,6 +96,11 @@ int vboxRegister(void) {
|
||||
driver = &vbox30Driver;
|
||||
networkDriver = &vbox30NetworkDriver;
|
||||
storageDriver = &vbox30StorageDriver;
|
||||
} else if (uVersion >= 3000051 && uVersion < 3001051) {
|
||||
DEBUG0("VirtualBox API version: 3.1");
|
||||
driver = &vbox31Driver;
|
||||
networkDriver = &vbox31NetworkDriver;
|
||||
storageDriver = &vbox31StorageDriver;
|
||||
} else {
|
||||
DEBUG0("Unsupport VirtualBox API version");
|
||||
}
|
||||
|
8538
src/vbox/vbox_tmpl.c
8538
src/vbox/vbox_tmpl.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user