- 24 11月, 2016 1 次提交
-
-
由 Dawid Zamirski 提交于
* add vboxDriver object to serve as a singleton global object that holds references to IVirtualBox and ISession to be shared among multiple connections. The vbox_driver is instantiated only once in the first call vboxGetDriverConnection function that is guarded by a mutex. * call vbox API initialize only when the first connection is established, and likewise uninitialize when last connection disconnects. The prevents each subsequent connection from overwriting IVirtualBox/ISession instances of any other active connection that led to libvirtd segfaults. The virConnectOpen and virConnectClose implementations are guarded by mutex on the global vbox_driver_lock where the global vbox_driver object counts connectios and decides when it's safe to call vbox's init/uninit routines. * add IVirutalBoxClient to vboxDriver and use it to in tandem with newer pfnClientInitialize/pfnClientUninitalize APIs for vbox versions that support it, to avoid usage of the old pfnComInitialize/Uninitialize.
-
- 08 11月, 2016 1 次提交
-
-
由 Dawid Zamirski 提交于
-
- 24 6月, 2016 1 次提交
-
-
由 Martin Pietsch 提交于
-
- 08 3月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
If the stars are in the right position and you're building with VBox >= 4.2.0 it will happen that compiler thinks an array allocated on the stack may be unbounded: In file included from vbox/vbox_V4_2.c:13:0: vbox/vbox_tmpl.c: In function '_virtualboxCreateMachine': vbox/vbox_tmpl.c:2811:1: error: stack usage might be unbounded [-Werror=stack-usage=] _virtualboxCreateMachine(vboxGlobalData *data, virDomainDefPtr def, IMachine **machine, char *uuidstr ATTRIBUTE_UNUSED) ^ Well, given how the variable is declared, I had some hard time seeing it is actually bounded. Surprisingly compiler does not complain because of -Wframe-larger-than. This is because variable length arrays do not count into that warning. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 03 3月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
While trying to build with -Os couple of compile errors showed up. conf/domain_conf.c: In function 'virDomainChrRemove': conf/domain_conf.c:13666:24: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] virDomainChrDefPtr ret, **arrPtr = NULL; ^ Compiler fails to see that @ret is used only if set in the loop, but whatever, there's no harm in initializing the variable. In vboxAttachDrivesNew and _vboxAttachDrivesOld compiler thinks that @rc may be used uninitialized. Well, not directly, but maybe after some optimization. Yet again, no harm in initializing a variable. In file included from ./util/virthread.h:26:0, from ./datatypes.h:28, from vbox/vbox_tmpl.c:43, from vbox/vbox_V3_1.c:37: vbox/vbox_tmpl.c: In function '_vboxAttachDrivesOld': ./util/virerror.h:181:5: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized] virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \ ^ In file included from vbox/vbox_V3_1.c:37:0: vbox/vbox_tmpl.c:1041:14: note: 'rc' was declared here nsresult rc; ^ Yet again, one uninitialized variable: qemu/qemu_driver.c: In function 'qemuDomainBlockCommit': qemu/qemu_driver.c:17194:9: error: 'baseSource' may be used uninitialized in this function [-Werror=maybe-uninitialized] qemuDomainPrepareDiskChainElement(driver, vm, baseSource, ^ And another one: storage/storage_backend_logical.c: In function 'virStorageBackendLogicalMatchPoolSource.isra.2': storage/storage_backend_logical.c:618:33: error: 'thisSource' may be used uninitialized in this function [-Werror=maybe-uninitialized] thisSource->devices[j].path)) ^ Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 11 2月, 2016 4 次提交
- 15 5月, 2015 1 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 08 4月, 2015 1 次提交
-
-
由 Dawid Zamirski 提交于
The IKeyboard COM object is needed to implement virDomainSendKey and is available in all supported VBOX versions.
-
- 19 11月, 2014 1 次提交
-
-
由 Yohan BELLEGUIC 提交于
This function returned non-inactive domains instead of active domains. This broke virConnectNumOfDefinedDomains() and virConnectListDefinedDomains() functions.
-
- 15 11月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 29 10月, 2014 18 次提交
-
-
由 Eric Blake 提交于
C guarantees that static variables are zero-initialized. Some older compilers (and also gcc -fno-zero-initialized-in-bss) create larger binaries if you explicitly zero-initialize a static variable. * src/libxl/libxl_driver.c: Fix initialization. * src/lxc/lxc_controller.c: Likewise. * src/openvz/openvz_util.c (openvzKBPerPages): Likewise. * src/phyp/phyp_driver.c: Likewise. * src/remote/remote_driver.c: Likewise. * src/test/test_driver.c: Likewise. * src/uml/uml_driver.c: Likewise. * src/vbox/vbox_XPCOMCGlue.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Taowei Luo 提交于
After rewriting the whole driver, Only version specified code is remained in vbox_tmpl.c. So, this patch removes those unused macros header files in vbox_tmpl.c.
-
由 Taowei Luo 提交于
This patch provides the new stroage driver for vbox. The work is similar with patch 87dea4fc and the next b4022de3.
-
由 Taowei Luo 提交于
-
由 Taowei Luo 提交于
-
由 Taowei Luo 提交于
-
由 Taowei Luo 提交于
The API on IHardDiskAttachment is merged into IMediumAttachment. So, we don't need it anymore.
-
由 Taowei Luo 提交于
The GetMedium will always return a IHardDisk object them. In 2.2 and 3.0, it is what GetHardDisk exactly do. In 3.1 and later, The IMedium is same as IHardDisk.
-
由 Taowei Luo 提交于
If the <path> in target element is not given, libvirt will put the new volume in ~/.VirtualBox by default.
-
由 Taowei Luo 提交于
The CreateHardDiskMedium only support create HardDisk for medium type, and it only works when vbox version >= 3.1. This patch make the function workable with all vbox versions and rename it as CreateHardDisk. In vbox 2.2 and 3.0 this function will create a IHardDisk object. In vbox later than 3.0, this function will create a IMedium object.
-
由 Taowei Luo 提交于
-
由 Taowei Luo 提交于
In old version, function FindMedium in UIVirtualBox doesn't work for vbox2.2 and 3.0. We assume it will not be used when vbox in these versions. But when rewriting vboxStorageVolLookupByPath, we found it was compatibe to use FindMedium to get a IHardDisk object, even in vbox old versions. To achieve this, first make FindMedium call FindHardDisk when VBOX_API_VERSION < 4000000. Then change the argument type **IMedium to **IHardDisk. (As the rules in heriachy, we can't transfer a IHardDisk to match IMedium in output) In vbox 2.2 and 3.0, the caller must be aware that they will get a IHardDisk object in return.
-
由 Taowei Luo 提交于
-
由 Taowei Luo 提交于
-
由 Taowei Luo 提交于
-
由 Taowei Luo 提交于
We use typedef IMedium IHardDisk to make IHardDisk hierachy from IMedium (Actually it did on vbox 2.2 and 3.0's C++ API). So when calling VBOX_MEDIUM_FUNC_ARG*(IHardDisk, func, args) we can directly replace it to gVBoxAPI.UIMedium.func(IHardDisk, args) When dealing with this two types, we get some rules from it's hierachy relationship. When using IHardDisk and IMedium as input, we can't transfer a IMedium to IHardDisk. Like: gVBoxAPI.UIHardDisk.func(IHardDisk *hardDisk, args) Here, we can't put a *IMedium as a argument. When using IHardDisk and IMedium as output, we can't transfer a IHardDisk to IMedium. Like: gVBoxAPI.UIMachine.GetMedium(IMedium **out) Here, we can't put a **IHardDisk as a argument. If this case do happen, we either change the API to GetHardDisk or write a new one.
-
由 Taowei Luo 提交于
This patch rewrites the following functions *vboxStorageOpen *vboxStorageClose *vboxConnectNumOfStoragePools *vboxConnectListStoragePools *vboxStoragePoolLookupByName These functions do not call any vbox API, so I directly move it from vbox_tmpl.c to vbox_storage.c A small improvement is made on vboxConnectListStoragePools. The if condition nnames == 1 is modified to nnames > 0. So if the caller put more than one slot to get active storage pools, the new function will return exactly one, while the old one would only return 0.
-
由 Taowei Luo 提交于
We should follow the rules that CHECK macro only do checking works. But this VBOX_OBJECT_CHECK and VBOX_OBJECT_HOST_CHECK declared some varibles at the same time, which broke the rule. So the patch removed this macros and dispatched it in source code. The storage driver is still not rewriten at this point. So, I remains the VBOX_OBJECT_CHECK macro in vbox_tmpl.c. But this will finally be removed in patch 'vbox: Remove unused things in vbox_tmpl.c'
-
- 23 10月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
To prepare for introducing a single global driver, rename the virDriver struct to virHypervisorDriver and the registration API to virRegisterHypervisorDriver()
-
- 03 10月, 2014 8 次提交
-
-
由 Taowei 提交于
This patch seperate the domain driver and the network driver. libvirt_driver_vbox_impl.la has been linked in the network driver. So that the version specified codes in vbox_V*.c would only be compiled once. The vboxGetNetworkDriver provides a simple interface to get vbox network driver.
-
由 Taowei 提交于
-
由 Taowei 提交于
-
由 Taowei 提交于
This patch rewrites two public APIs. They are vboxNetworkUndefine and vboxNetworkDestroy. They use the same core function vboxNetworkUndefineDestroy. I merged it in one patch.
-
由 Taowei 提交于
This patch actually contains two public API, virNetworkDefineXML and virNetworkCreateXML. They use the same core function vboxNetworkDefineCreateXML. So I merged it together.
-
由 Taowei 提交于
-
由 Taowei 提交于
-
由 Taowei 提交于
-