- 25 10月, 2011 3 次提交
-
-
由 Eric Blake 提交于
Detected by Coverity. virStoragePoolSourceFree does not free the actual passed-in pointer. A bigger patch would be to rename it virStoragePoolSourceClear to match behavior, or even split it into two functions depending on needed behavior; but this is the minimal fix to the one location out of eight that leaked memory. * src/storage/storage_backend_iscsi.c (virStorageBackendISCSIFindPoolSources): Free memory.
-
由 Eric Blake 提交于
Based on a report by Coverity. waitpid() can leak resources if it fails with EINTR, so it should never be used without checking return status. But we already have a helper function that does that, so use it in more places. * src/lxc/lxc_container.c (lxcContainerAvailable): Use safer virWaitPid. * daemon/libvirtd.c (daemonForkIntoBackground): Likewise. * tests/testutils.c (virtTestCaptureProgramOutput, virtTestMain): Likewise. * src/libvirt.c (virConnectAuthGainPolkit): Simplify with virCommand.
-
由 Eric Blake 提交于
Detected by Coverity. Both text and JSON monitors set only the bus and unit fields, which means driveAddr.controller spends life as garbage on the stack, and is then memcpy()'d into the in-memory representation which the user can see via dumpxml. * src/qemu/qemu_hotplug.c (qemuDomainAttachSCSIDisk): Only copy defined fields.
-
- 24 10月, 2011 1 次提交
-
-
由 Ryota Ozaki 提交于
We have a new vol type "dir" in addition to "file" and "block", but virsh doesn't know it. Fix it. Additionally, the patch lets virsh output "unknown" if not matched any of them.
-
- 21 10月, 2011 14 次提交
-
-
由 Ryota Ozaki 提交于
Commit 77791dc0 allows LXC to use a host block device as a guest filesystem, but it isn't documented yet.
-
由 David L Stevens 提交于
This patch adds support for "continue" and "return" actions in filter rules. Signed-off-by: NDavid L Stevens <dlstevens@us.ibm.com>
-
由 Eric Blake 提交于
More simplifications possible due to auto-indent. Also, <bandwidth> within <actual> was only using 6 instead of 8 spaces. * src/util/network.h (virVirtualPortProfileFormat) (virBandwidthDefFormat): Alter signature. * src/util/network.c (virVirtualPortProfileFormat) (virBandwidthDefFormat): Alter indentation. (virBandwidthChildDefFormat): Tweak to make use easier. * src/conf/network_conf.c (virPortGroupDefFormat) (virNetworkDefFormat): Adjust callers. * src/conf/domain_conf.c (virDomainNetDefFormat): Likewise. (virDomainActualNetDefFormat): Likewise, and fix bandwidth indentation.
-
由 Eric Blake 提交于
Auto-indent makes life a bit easier; this patch also drops unused arguments and replaces a misspelled flag name with two entry points instead, so that callers don't have to worry about how much spacing is present when embedding cpu elements. * src/conf/cpu_conf.h (virCPUFormatFlags): Delete. (virCPUDefFormat): Drop unused argument. (virCPUDefFormatBuf): Alter signature. (virCPUDefFormatBufFull): New prototype. * src/conf/cpu_conf.c (virCPUDefFormatBuf): Split... (virCPUDefFormatBufFull): ...into new function. (virCPUDefFormat): Adjust caller. * src/conf/domain_conf.c (virDomainDefFormatInternal): Likewise. * src/conf/capabilities.c (virCapabilitiesFormatXML): Likewise. * src/cpu/cpu.c (cpuBaselineXML): Likewise. * tests/cputest.c (cpuTestCompareXML): Likewise.
-
由 Eric Blake 提交于
The improvements to virBuffer, along with a paradigm shift to pass the original buffer through rather than creating a second buffer, allow us to shave off quite a few lines of code. * src/util/sysinfo.h (virSysinfoFormat): Alter signature. * src/util/sysinfo.c (virSysinfoFormat, virSysinfoBIOSFormat) (virSysinfoSystemFormat, virSysinfoProcessorFormat) (virSysinfoMemoryFormat): Change indentation parameter. * src/conf/domain_conf.c (virDomainSysinfoDefFormat): Adjust caller. * src/qemu/qemu_driver.c (qemuGetSysinfo): Likewise.
-
由 Eric Blake 提交于
Add a test for the simple parts of my indentation changes, and fix the fallout. * tests/domainsnapshotxml2xmltest.c: New test. * tests/Makefile.am (domainsnapshotxml2xmltest_SOURCES): Build it. * src/conf/domain_conf.c (virDomainSnapshotDefFormat): Avoid NULL deref, match documented order. * src/conf/domain_conf.h (virDomainSnapshotDefFormat): Add const. * tests/domainsnapshotxml2xmlout/all_parameters.xml: Tweak output. * tests/domainsnapshotxml2xmlout/disk_snapshot.xml: Likewise. * tests/domainsnapshotxml2xmlout/full_domain.xml: Likewise. * .gitignore: Exempt new binary.
-
由 Eric Blake 提交于
<domainsnapshot> is the first public instance of <domain> being used as a sub-element, although we have two other private uses (runtime state, and migration cookie). Although indentation has no effect on XML parsing, using it makes the output more consistent. This uses virBuffer auto-indentation to obtain the effect, for all but the portions of <domain> that are not generated a line at a time into the same virBuffer. Further patches will clean up the remaining problems. * src/conf/domain_conf.h (virDomainDefFormatInternal): New prototype. * src/conf/domain_conf.c (virDomainDefFormatInternal): Export. (virDomainObjFormat, virDomainSnapshotDefFormat): Update callers. * src/libvirt_private.syms (domain_conf.h): Add new export. * src/qemu/qemu_migration.c (qemuMigrationCookieXMLFormat): Use new function. (qemuMigrationCookieXMLFormatStr): Update caller.
-
由 Eric Blake 提交于
Rather than having to adjust all callers in a chain to deal with indentation, it is nicer to have virBuffer do auto-indentation. * src/util/buf.h (_virBuffer): Increase size. (virBufferAdjustIndent, virBufferGetIndent): New prototypes. * src/libvirt_private.syms (buf.h): Export new functions. * src/util/buf.c (virBufferAdjustIndent, virBufferGetIndent): New functions. (virBufferSetError, virBufferAdd, virBufferAddChar) (virBufferVasprintf, virBufferStrcat, virBufferURIEncodeString): Implement auto-indentation. * tests/virbuftest.c (testBufAutoIndent): Test it. (testBufInfiniteLoop): Don't rely on internals. Idea by Daniel P. Berrange.
-
由 Eric Blake 提交于
The next patch wants to add some sanity checking, which would be a different error than ENOMEM. Many existing callers blindly report OOM failure if virBuf reports an error, and this will be wrong in the (unlikely) case that they actually had a usage error instead; but since the most common error really is ENOMEM, I'm not going to fix all callers. Meanwhile, new discriminating callers can react differently depending on what failure happened. * src/util/buf.c (virBufferSetError): Add parameter. (virBufferGrow, virBufferVasprintf, virBufferEscapeString) (virBufferEscapeSexpr, virBufferEscapeShell): Adjust callers.
-
由 Eric Blake 提交于
I had some temporary test failures while working on virbuf improvements in later patches, with output that looked like: Expected [<] Actual [ <] which is pretty hard to figure out. Adding an Offset designation made it much easier to find which particular '<' was at the wrong indentation, to fix the right part of the code. * tests/testutils.c (virtTestDifference): Make it easier to diagnose test failures.
-
由 Eric Blake 提交于
Although the compiler wasn't complaining (since it was the pointer, rather than what was being pointed to, that was actually const), it looks quite suspicious to call a function with an argument labeled const when the nature of the pointer (virBufferPtr) is hidden behind a typedef. Dropping const makes the function declarations easier to read. * src/util/buf.h: Drop const from all functions that modify buffer argument. * src/util/buf.c (virBufferSetError, virBufferAdd) (virBufferContentAndReset, virBufferFreeAndReset) (virBufferAsprintf, virBufferVasprintf, virBufferEscapeString) (virBufferEscapeSexpr, virBufferEscape): Fix fallout.
-
由 Laine Stump 提交于
In a recent expansion of the documentation on network forward modes, I incorrectly stated that incoming sessions to guests on routed networks were blocked. This is true for guests on NATed networks, but not routed. This patch corrects that error, and adds a pointer to the nwfilter page for those who do want to restrict incoming sessions to hosts on routed networks.
-
由 tangchen 提交于
There is a little difference between the output of domxml-to-native and the actual commandline. No matter qemu is in control or readline mode, domxml-to-native always converts it to readline mode. That is because the parameter "monitor_json" for qemuBuildCommandLine() is always set to false in qemuDomainXMLToNative(). Signed-off-by: Ntangchen <tangchen@cn.fujitsu.com>
-
由 Eric Blake 提交于
Clarify some of the effects of managed passthrough <hostdev> devices; with recent changes (commit d0935478), a nodedev-reattach is only needed to pair up to an explicit nodedev-dettach (but beware that older virt-manager has a bug where it uses explicit nodedev-dettach under the hood when using the gui to hotplug a hostdev device). * docs/formatdomain.html.in: Mention reattach. * tools/virsh.pod (nodedev): Mention managed mode.
-
- 20 10月, 2011 4 次提交
-
-
由 Daniel P. Berrange 提交于
Stub out a complete impl of virFileOpenTty to avoid unused parameter warnings * src/util/util.c: Fix virFileOpenTty on Win32
-
由 Hu Tao 提交于
Adds two options, inbound and outbound, to attach-interface to set bandwidth when attaching interfaces
-
由 Serge E. Hallyn 提交于
The glibc ones (intentionally) cannot handle ptys opened in a devpts not mounted at /dev/pts. Drop the (un-exported, unused) virFileOpenTtyAt. Signed-off-by: NSerge Hallyn <serge.hallyn@canonical.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
* .gitignore: Add exemption.
-
- 19 10月, 2011 11 次提交
-
-
由 Philipp Hahn 提交于
Add test cases for parsing the qemu-name-space. This is based on qemuxml2argv{test,data/}, but can not reside in qemuxml2argv{test,data/} because ... 1. qemuxmlns-qemu-ns-domain.xml is not schema-valid and breaks domainschematest. The test is still important to detect xmlns:qemu bindings to a name-space other than http://libvirt.org/schemas/domain/qemu/1.0 2. they break qemuxml2xml, because the xmlns:qemu binding is moved to the top-level <domain> element when converting from argv to xml. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Philipp Hahn 提交于
The XML parser for the qemu specific extensions expects the qemu name-space to be bound to the 'qemu' prefix. This is too strict, since the name of the name-space-prefix is only meant as an internal lookup key. Only the associated URI is relevant. <domain>... <qemu:commandline xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0"> ...</qemu:commandline> </domain> <domain xmlns:ns0="http://libvirt.org/schemas/domain/qemu/1.0">... <ns0:commandline> ...</ns0:commandline> </domain> <domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0"> <qemu:commandline xmlns:qemu="urn:foo"> ...</qemu:commandline> </domain> Remove the test for checking the name-space binding on the top-level <domain> element. Registering the name-space with XPath is enough. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Xu He Jie 提交于
When I compile libvirt with gcc-4.6.1 in ubuntu 11.10, got error as below: CCLD libvirtd /usr/bin/ld: ../src/.libs/libvirt_driver_qemu.a(libvirt_driver_qemu_la-qemu_migration.o): undefined reference to symbol 'gnutls_x509_crt_get_dn@@GNUTLS_1_4' /usr/bin/ld: note: 'gnutls_x509_crt_get_dn@@GNUTLS_1_4' is defined in DSO /usr/lib/x86_64-linux-gnu/libgnutls.so so try adding it to the linker command line /usr/lib/x86_64-linux-gnu/libgnutls.so: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[3]: *** [libvirtd] Error 1 It can compile with gcc-4.5.2 in ubuntu 11.04, but it can not compile with gcc-4.6.1 in ubuntu 11.10. I didn't find reason. Does Anyone know the reason or the different between gcc-4.5.2 and gcc-4.6.1? I still provide a patch for this. Just make it is working now. Signed-off-by: Nsoulxu <soulxu@soulxu-ThinkPad-T410.(none)>
-
由 Daniel P. Berrange 提交于
The statement virBufferAdd(buf, "''", 2); triggers a syntax-check warning * src/util/buf.c: Replace virBufferAdd with virBufferAddLit
-
由 Philipp Hahn 提交于
Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Daniel P. Berrange 提交于
This adds support for a libvirt client configuration file either /etc/libvirt/libvirt.conf for privileged clients, or $HOME/.libvirt/libvirt.conf for unprivileged clients. It allows one parameter uri_aliases = [ "hail=qemu+ssh://root@hail.cloud.example.com/system", "sleet=qemu+ssh://root@sleet.cloud.example.com/system", ] Any call to virConnectOpen with a non-NULL URI will first attempt to match against the uri_aliases list. An application can disable this by using VIR_CONNECT_NO_ALIASES * docs/uri.html.in: Document URI aliases * include/libvirt/libvirt.h.in: Add VIR_CONNECT_NO_ALIASES * libvirt.spec.in, mingw32-libvirt.spec.in: Add /etc/libvirt/libvirt.conf * src/Makefile.am: Install default config file * src/libvirt.c: Add support for URI aliases * src/remote/remote_driver.c: Don't try to handle URIs with no scheme and which clearly are not paths * src/util/conf.c: Don't raise error on virConfFree(NULL) * src/xen/xen_driver.c: Don't raise error on URIs with no scheme
-
由 Daniel P. Berrange 提交于
We recently added support for VIR_DOMAIN_START_AUTODESTROY and an impl to the QEMU driver. It is very desirable to support in other drivers, so this adds it to LXC and UML * src/lxc/lxc_conf.h, src/lxc/lxc_driver.c, src/uml/uml_conf.h, src/uml/uml_driver.c: Wire up autodestroy functions
-
由 Guido Günther 提交于
-
由 Guido Günther 提交于
-
由 Guido Günther 提交于
Make the empty string return '' to match cmdEcho's behavior.
-
由 Eric Blake 提交于
Noticed when testing new libvirt against old qemu that lacked the snapshot_blkdev HMP command. Libvirt was mistakenly treating the command as successful, and re-writing the domain XML to use the just-created 0-byte file, rendering the domain broken on restart. * src/qemu/qemu_monitor_text.c (qemuMonitorTextDiskSnapshot): Notice another possible error message. * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateSingleDiskActive): Don't keep 0-byte file on failure.
-
- 18 10月, 2011 6 次提交
-
-
由 Guido Günther 提交于
When checking if we need to escape a single quote we were looking at the character after the quote instead of at the quote itself.
-
由 Xu He Jie 提交于
compile error: ./src/.libs/libvirt_driver_qemu.a(libvirt_driver_qemu_la-qemu_hostdev.o): In function `qemuPrepareHostdevPCIDevices': /home/soulxu/data/work-code/libvirt/src/qemu/qemu_hostdev.c:183: undefined reference to `pciDeviceListFind' /home/soulxu/data/work-code/libvirt/src/qemu/qemu_hostdev.c:230: undefined reference to `pciDeviceListFind' ./src/.libs/libvirt_driver_qemu.a(libvirt_driver_qemu_la-qemu_hostdev.o): In function `qemuGetActivePciHostDeviceList': /home/soulxu/data/work-code/libvirt/src/qemu/qemu_hostdev.c:102: undefined reference to `pciDeviceListFind' ./src/.libs/libvirt_driver_qemu.a(libvirt_driver_qemu_la-qemu_hostdev.o): In function `qemuDomainReAttachHostdevDevices': /home/soulxu/data/work-code/libvirt/src/qemu/qemu_hostdev.c:370: undefined reference to `pciDeviceListFind' Signed-off-by: NXu He Jie <xuhj@linux.vnet.ibm.com>
-
由 Osier Yang 提交于
Waiting for qemu-kvm cleaning up the PCI bar(s) mapping with long time while the device is not managed is just waste of time.
-
由 Jim Fehlig 提交于
Tested with multiple AHCI controllers and multiple disks attached to a controller. E.g., <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/test/disk0.raw'/> <target dev='sda' bus='sata'/> <address type='drive' controller='0' bus='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/test/disk1.raw'/> <target dev='sdb' bus='sata'/> <address type='drive' controller='0' bus='0' unit='1'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/test/disk2.raw'/> <target dev='sdc' bus='sata'/> <address type='drive' controller='1' bus='0' unit='0'/> </disk> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </controller> <controller type='sata' index='1'> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </controller>
-
由 Eric Blake 提交于
Relatively straight-forward filtering. * src/esx/esx_vi.h (esxVI_GetNumberOfSnapshotTrees) (esxVI_GetSnapshotTreeNames): Add parameter. * src/esx/esx_vi.c (esxVI_GetNumberOfSnapshotTrees) (esxVI_GetSnapshotTreeNames): Allow leaf filtering. * src/esx/esx_driver.c (esxDomainSnapshotNum) (esxDomainSnapshotListNames, esxDomainSnapshotNumChildren) (esxDomainSnapshotListChildrenNames): Pass new flag through.
-
由 Philipp Hahn 提交于
The referenced page does not exist, but locking.html has a section about sanlock. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 17 10月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
probes.h is generated in build directory; setting a dependency on probes.h from source directory doesn't work well in VPATH builds. Caused by commit 1afcfbdd
-