- 25 11月, 2013 2 次提交
-
-
由 Ryota Ozaki 提交于
The USB-related code in vboxDomainGetXMLDesc is deeply nested and difficult to add new code. So flatten it. To do so, the code is pulled out from vboxDomainGetXMLDesc to make the function short and to leaverage early return and goto for error handling. Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
-
由 Ryota Ozaki 提交于
This cleanup flattens deeply nested code. Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
-
- 21 11月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Most of our code base uses space after comma but not before; fix the remaining uses before adding a syntax check. * src/vbox/vbox_tmpl.c: Consistently use commas. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 19 11月, 2013 1 次提交
-
-
由 Ryota Ozaki 提交于
A USB filter is stored in a hostdev. The original code doesn't allocate hostdev->info that is expected to be allocated with hostdev. So use virDomainHostdevDefAlloc() to allocate both as we expect. Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
-
- 08 11月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Currently we were storing domain feature flags in a bit field as the they were either enabled or disabled. New features such as paravirtual spinlocks however can be tri-state as the default option may depend on hypervisor version. To allow storing tri-state feature state in the same place instead of having to declare dedicated variables for each feature this patch refactors the bit field to an array.
-
- 21 10月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Most of the usage of getuid()/getgid() is in cases where we are considering what privileges we have. As such the code should be using the effective IDs, not real IDs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Unconditional use of getenv is not secure in setuid env. While not all libvirt code runs in a setuid env (since much of it only exists inside libvirtd) this is not always clear to developers. So make all the code paranoid, even if it only ever runs inside libvirtd. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 15 10月, 2013 2 次提交
-
-
由 Ryota Ozaki 提交于
VirtualBox has 'saved' state for VMs saved by the hypervisor. However, the state is treated as VIR_DOMAIN_NOSTATE by the vbox driver, resulting that virsh shows 'no state' for saved VMs. The fix treats the state as VIR_DOMAIN_SHUTOFF as same as other domains such as qemu. Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
-
由 Ryota Ozaki 提交于
The code for converting between virtualbox API states and libvirt states was duplicated in two places. Pull the code out into a shared helper method. Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 7月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 07 6月, 2013 1 次提交
-
-
由 ryan woodsmall 提交于
A few things have changed in the VirtualBox API - some small (capitalizations of things in function names like Ip to IP and Dhcp to DHCP) and some much larger (FindMedium is superceded by OpenMedium). The biggest change for the sake of this patch is the signature of CreateMachine is quite a bit different. Using the Oracle source as a guide, to spin up a VM with a given UUID, it looks like a text flag has to be passed in a new argument to CreateMachine. This flag is built in the VirtualBox 4.2 specific ifdefs and is kind of ugly but works. Additionally, there is now (unused) VM groups support in CreateMachine and the previous 'osTypeId' arg is currently set to nsnull as in the Oracle code. The FindMedium to OpenMedium changes were more straightforward and are pretty clear. The rest of the vbox template changes are basically spelling/capitalization changes from the looks of things. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 28 5月, 2013 1 次提交
-
-
由 Eric Blake 提交于
I noticed several unusual spacings in for loops, and decided to fix them up. See the next commit for the syntax check that found all of these. * examples/domsuspend/suspend.c (main): Fix spacing. * python/libvirt-override.c: Likewise. * src/conf/interface_conf.c: Likewise. * src/security/virt-aa-helper.c: Likewise. * src/util/virconf.c: Likewise. * src/util/virhook.c: Likewise. * src/util/virlog.c: Likewise. * src/util/virsocketaddr.c: Likewise. * src/util/virsysinfo.c: Likewise. * src/util/viruuid.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * tools/virsh-domain-monitor.c (vshDomainStateToString): Drop default case, to let compiler check us. * tools/virsh-domain.c (vshDomainVcpuStateToString): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 22 5月, 2013 1 次提交
-
- 21 5月, 2013 2 次提交
-
-
由 Osier Yang 提交于
-
由 Eric Blake 提交于
Now that COPYING no longer contains the text of the LGPL, modify the LGPLv2-only files from vbox to call out the correct file. * src/vbox/vbox_CAPI_v2_2.h: Refer to correct file. * src/vbox/vbox_CAPI_v3_0.h: Likewise. * src/vbox/vbox_CAPI_v3_1.h: Likewise. * src/vbox/vbox_CAPI_v3_2.h: Likewise. * src/vbox/vbox_CAPI_v4_0.h: Likewise. * src/vbox/vbox_CAPI_v4_1.h: Likewise. * src/vbox/vbox_V2_2.c: Likewise. * src/vbox/vbox_V3_0.c: Likewise. * src/vbox/vbox_V3_1.c: Likewise. * src/vbox/vbox_XPCOMCGlue.c: Likewise. * src/vbox/vbox_XPCOMCGlue.h: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/vbox/vbox_driver.h: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/vbox/vbox_V3_2.c: Copy license notice from vbox_V3_1.c. * src/vbox/vbox_V4_0.c: Likewise. * src/vbox/vbox_V4_1.c: Likewise. * src/vbox/README: Mention copyright issues; this particular file contains no code and therefore does not need LGPL. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 13 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 08 5月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
The individual hypervisor drivers were directly referencing APIs in src/nodeinfo.c in their virDriverPtr struct. Separate these methods, so there is always a wrapper in the hypervisor driver. This allows the unused virConnectPtr args to be removed from the nodeinfo.c file. Again this will ensure that ACL checks will only be performed on invocations that are directly associated with public API usage. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently the virGetHostname() API has a bogus virConnectPtr parameter. This is because virtualization drivers directly reference this API in their virDriverPtr tables, tieing its API design to the public virConnectGetHostname API design. This also causes problems for access control checks since these must only be done for invocations from the public API, not internal invocation. Remove the bogus virConnectPtr parameter, and make each hypervisor driver provide a dedicated function for the driver API impl. This will allow access control checks to be easily inserted later. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The source code base needs to be adapted as well. Some files include virutil.h just for the string related functions (here, the include is substituted to match the new file), some include virutil.h without any need (here, the include is removed), and some require both.
-
- 24 4月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
Ensure that all drivers implementing public APIs use a naming convention for their implementation that matches the public API name. eg for the public API virDomainCreate make sure QEMU uses qemuDomainCreate and not qemuDomainStart Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
It will simplify later work if the sub-drivers have dedicated APIs / field names. ie virNetworkDriver should have virDrvNetworkOpen and virDrvNetworkClose methods Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Ensure that the driver struct field names match the public API names. For an API virXXXX we must have a driver struct field xXXXX. ie strip the leading 'vir' and lowercase any leading uppercase letters. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 13 4月, 2013 1 次提交
-
-
由 Osier Yang 提交于
-
- 11 4月, 2013 1 次提交
-
-
由 Osier Yang 提交于
-
- 05 4月, 2013 5 次提交
-
-
由 Peter Krempa 提交于
This patch refactors various places to allow removing of the defaultConsoleTargetType callback from the virCaps structure. A new console character device target type is introduced - VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to mark that no type was specified in the XML. This type is at the end converted to the standard VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL. Other types that are different from this default have to be processed separately in the device post parse callback.
-
由 Peter Krempa 提交于
Use the virDomainXMLConf structure to hold this data and tweak the code to avoid semantic change. Without configuration the KVM mac prefix is used by default. I chose it as it's in the privately administered segment so it should be usable for any purposes.
-
由 Peter Krempa 提交于
Move the xmlopt and caps arguments to the end of the argument list.
-
由 Peter Krempa 提交于
This patch adds instrumentation that will allow hypervisor drivers to fill and validate domain and device definitions after parsed by the XML parser. With this patch, after the XML is parsed, a callback to the driver is issued requesting to fill and validate driver specific details of the configuration. This allows to use sensible defaults and checks on a per driver basis at the time the XML is parsed. Two callback pointers are stored in the new virDomainXMLConf object: * virDomainDeviceDefPostParseCallback (devicesPostParseCallback) - called for a single device parsed and for every single device in a domain config. A virDomainDeviceDefPtr is passed along with the domain definition and virCaps. * virDomainDefPostParseCallback, (domainPostParseCallback) - A callback that is meant to process the domain config after it's parsed. A virDomainDefPtr is passed along with virCaps. Both types of callbacks support arbitrary opaque data passed for the callback functions. Errors may be reported in those callbacks resulting in a XML parsing failure.
-
由 Peter Krempa 提交于
This patch is the result of running: for i in $(git ls-files | grep -v html | grep -v \.po$ ); do sed -i -e "s/virDomainXMLConf/virDomainXMLOption/g" -e "s/xmlconf/xmlopt/g" $i done and a few manual tweaks.
-
- 13 3月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
The virCaps structure gathered a ton of irrelevant data over time that. The original reason is that it was propagated to the XML parser functions. This patch aims to create a new data structure virDomainXMLConf that will contain immutable data that are used by the XML parser. This will allow two things we need: 1) Get rid of the stuff from virCaps 2) Allow us to add callbacks to check and add driver specific stuff after domain XML is parsed. This first attempt removes pointers to private data allocation functions to this new structure and update all callers and function that require them.
-
- 14 2月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 08 2月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
To enable virCapabilities instances to be reference counted, turn it into a virObject. All cases of virCapabilitiesFree turn into virObjectUnref Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 26 1月, 2013 2 次提交
-
-
由 John Ferlan 提交于
Adjust the macros to free memory allocated during various calls to perform the check if parameter is NULL prior to really freeing and to set the pointer to NULL after done freeing.
-
由 John Ferlan 提交于
Resolve a false positive from 'vboxIIDFromUUID_v2_x()'. The code sets 'iid->value = &iid->backing' unconditionally prior to calling 'nsIDFromChar()'. The 'vboxIIDUnalloc_v2_x()' checks iid->value to not be &iid->backing. The iid->backing is a static buffer within the initialized structure.
-
- 21 12月, 2012 5 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-