- 10 11月, 2011 3 次提交
-
-
由 Daniel P. Berrange 提交于
The existing brXXX APIs in src/util/bridge.h are renamed to follow one of three different conventions - virNetDevXXX - operations for any type of interface - virNetDevBridgeXXX - operations for bridge interfaces - virNetDevTapXXX - operations for tap interfaces * src/util/bridge.h, src/util/bridge.c: Rename all APIs * src/lxc/lxc_driver.c, src/network/bridge_driver.c, src/qemu/qemu_command.c, src/uml/uml_conf.c, src/uml/uml_driver.c: Update for API renaming
-
由 Daniel P. Berrange 提交于
Currently every caller of the brXXX APIs has to store the returned errno value and then raise an error message. This results in inconsistent error messages across drivers, additional burden on the callers and makes the error reporting inaccurate since it is hard to distinguish different scenarios from 1 errno value. * src/util/bridge.c: Raise errors instead of returning errnos * src/lxc/lxc_driver.c, src/network/bridge_driver.c, src/qemu/qemu_command.c, src/uml/uml_conf.c, src/uml/uml_driver.c: Remove error reporting code
-
由 Daniel P. Berrange 提交于
The bridge management APIs in src/util/bridge.c require a brControl object to be passed around. This holds the file descriptor for the control socket. This extra object complicates use of the API for only a minor efficiency gain, which is in turn entirely offset by the need to fork/exec the brctl command for STP configuration. This patch removes the 'brControl' object entirely, instead opening the control socket & closing it again within the scope of each method. The parameter names for the APIs are also made to consistently use 'brname' for bridge device name, and 'ifname' for an interface device name. Finally annotations are added for non-NULL parameters and return check validation * src/util/bridge.c, src/util/bridge.h: Remove brControl object and update API parameter names & annotations. * src/lxc/lxc_driver.c, src/network/bridge_driver.c, src/uml/uml_conf.h, src/uml/uml_conf.c, src/uml/uml_driver.c, src/qemu/qemu_command.c, src/qemu/qemu_conf.h, src/qemu/qemu_driver.c: Remove reference to 'brControl' object
-
- 03 11月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
To allow virDomainOpenConsole to access non-primary consoles, device aliases are required to be set. Until now only the QEMU driver has done this. Update LXC & UML to set aliases for any console devices * src/lxc/lxc_driver.c, src/uml/uml_driver.c: Set aliases for console devices
-
由 Daniel P. Berrange 提交于
While Xen only has a single paravirt console, UML, and QEMU both support multiple paravirt consoles. The LXC driver can also be trivially made to support multiple consoles. This patch extends the XML to allow multiple <console> elements in the XML. It also makes the UML and QEMU drivers support this config. * src/conf/domain_conf.c, src/conf/domain_conf.h: Allow multiple <console> devices * src/lxc/lxc_driver.c, src/xen/xen_driver.c, src/xenxs/xen_sxpr.c, src/xenxs/xen_xm.c: Update for internal API changes * src/security/security_selinux.c, src/security/virt-aa-helper.c: Only label consoles that aren't a copy of the serial device * src/qemu/qemu_command.c, src/qemu/qemu_driver.c, src/qemu/qemu_process.c, src/uml/uml_conf.c, src/uml/uml_driver.c: Support multiple console devices * tests/qemuxml2xmltest.c, tests/qemuxml2argvtest.c: Extra tests for multiple virtio consoles. Set QEMU_CAPS_CHARDEV for all console /channel tests * tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.args, tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.args tests/qemuxml2argvdata/qemuxml2argv-console-virtio.args: Update for correct chardev syntax * tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.args, tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.xml: New test file
-
- 19 10月, 2011 1 次提交
-
-
由 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
-
- 16 9月, 2011 1 次提交
-
-
由 Peter Krempa 提交于
/usr/lib/stdlib.h in Mac OS X and probably also in BSD's exports this symbol :(
-
- 05 9月, 2011 1 次提交
-
-
由 Eric Blake 提交于
I got confused when 'virsh domblkinfo dom disk' required the path to a disk (which can be ambiguous, since a single file can back multiple disks), rather than the unambiguous target device name that I was using in disk snapshots. So, in true developer fashion, I went for the best of both worlds - all interfaces that operate on a disk (aka block) now accept either the target name or the unambiguous path to the backing file used by the disk. * src/conf/domain_conf.h (virDomainDiskIndexByName): Add parameter. (virDomainDiskPathByName): New prototype. * src/libvirt_private.syms (domain_conf.h): Export it. * src/conf/domain_conf.c (virDomainDiskIndexByName): Also allow searching by path, and decide whether ambiguity is okay. (virDomainDiskPathByName): New function. (virDomainDiskRemoveByName, virDomainSnapshotAlignDisks): Update callers. * src/qemu/qemu_driver.c (qemudDomainBlockPeek) (qemuDomainAttachDeviceConfig, qemuDomainUpdateDeviceConfig) (qemuDomainGetBlockInfo, qemuDiskPathToAlias): Likewise. * src/qemu/qemu_process.c (qemuProcessFindDomainDiskByPath): Likewise. * src/libxl/libxl_driver.c (libxlDomainAttachDeviceDiskLive) (libxlDomainDetachDeviceDiskLive, libxlDomainAttachDeviceConfig) (libxlDomainUpdateDeviceConfig): Likewise. * src/uml/uml_driver.c (umlDomainBlockPeek): Likewise. * src/xen/xend_internal.c (xenDaemonDomainBlockPeek): Likewise. * docs/formatsnapshot.html.in: Update documentation. * tools/virsh.pod (domblkstat, domblkinfo): Likewise. * docs/schemas/domaincommon.rng (diskTarget): Tighten pattern on disk targets. * docs/schemas/domainsnapshot.rng (disksnapshot): Update to match. * tests/domainsnapshotxml2xmlin/disk_snapshot.xml: Update test.
-
- 19 8月, 2011 1 次提交
-
-
由 Osier Yang 提交于
-
- 03 8月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Revert 6a1f5f56. Now that libvirt_iohelper takes fds by inheritance rather than by open() (commit 1eb66479), there is no longer a race where the parent can unlink() a file prior to the iohelper open()ing the same file. From there, it makes more sense to have the callers both create and unlink, rather than the caller create and the stream unlink, since the latter was only needed when iohelper had to do the unlink. * src/fdstream.h (virFDStreamOpenFile, virFDStreamCreateFile): Callers are responsible for deletion. * src/fdstream.c (virFDStreamOpenFileInternal): Don't leak created file on failure. (virFDStreamOpenFile, virFDStreamCreateFile): Drop parameter. * src/lxc/lxc_driver.c (lxcDomainOpenConsole): Update callers. * src/qemu/qemu_driver.c (qemuDomainScreenshot) (qemuDomainOpenConsole): Likewise. * src/storage/storage_driver.c (storageVolumeDownload) (storageVolumeUpload): Likewise. * src/uml/uml_driver.c (umlDomainOpenConsole): Likewise. * src/vbox/vbox_tmpl.c (vboxDomainScreenshot): Likewise. * src/xen/xen_driver.c (xenUnifiedDomainOpenConsole): Likewise.
-
- 22 7月, 2011 2 次提交
-
-
由 Michal Privoznik 提交于
-
由 Eric Blake 提交于
In preparation for a future patch adding new virFile APIs. * src/util/files.h, src/util/files.c: Move... * src/util/virfile.h, src/util/virfile.c: ...here, and rename functions to virFile prefix. Macro names are intentionally left alone. * *.c: All '#include "files.h"' uses changed. * src/Makefile.am (UTIL_SOURCES): Reflect rename. * cfg.mk (exclude_file_name_regexp--sc_prohibit_close): Likewise. * src/libvirt_private.syms: Likewise. * docs/hacking.html.in: Likewise. * HACKING: Regenerate.
-
- 20 7月, 2011 1 次提交
-
-
由 Osier Yang 提交于
-
- 16 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
The previous patches only cleaned up ATTRIBUTE_UNUSED flags cases; auditing the drivers found other places where flags was being used but not validated. In particular, domainGetXMLDesc had issues with clients accepting a different set of flags than the common virDomainDefFormat helper function. * src/conf/domain_conf.c (virDomainDefFormat): Add common flag check. * src/uml/uml_driver.c (umlDomainAttachDeviceFlags) (umlDomainDetachDeviceFlags): Reject unknown flags. * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc) (vboxDomainAttachDeviceFlags) (vboxDomainDetachDeviceFlags): Likewise. * src/qemu/qemu_driver.c (qemudDomainMemoryPeek): Likewise. (qemuDomainGetXMLDesc): Document common flag handling. * src/libxl/libxl_driver.c (libxlDomainGetXMLDesc): Likewise. * src/lxc/lxc_driver.c (lxcDomainGetXMLDesc): Likewise. * src/openvz/openvz_driver.c (openvzDomainGetXMLDesc): Likewise. * src/phyp/phyp_driver.c (phypDomainGetXMLDesc): Likewise. * src/test/test_driver.c (testDomainGetXMLDesc): Likewise. * src/vmware/vmware_driver.c (vmwareDomainGetXMLDesc): Likewise. * src/xenapi/xenapi_driver.c (xenapiDomainGetXMLDesc): Likewise.
-
- 15 7月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/uml_conf.h: Add queue for dispatch of domain events * src/uml_driver.c: Trigger domain events upon important lifecycle transitions
-
- 14 7月, 2011 2 次提交
-
-
由 Eric Blake 提交于
No need to repeat common code. * bootstrap.conf (gnulib_modules): Import calloc-posix. * src/util/bridge.c (brInit): Use virSetCloseExec. (brSetInterfaceUp): Adjust flags name. * src/uml/uml_driver.c (umlSetCloseExec): Delete. (umlStartVMDaemon): Use util version instead.
-
由 Eric Blake 提交于
* src/uml/uml_driver.c (umlOpen, umlDomainGetXMLDesc) (umlDomainBlockPeek): Reject unknown flags.
-
- 13 7月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
The UML inotify handler would kill off guests when certain conditions arise, but it forgot to remove transient guests from the list of domains * src/uml/uml_driver.c: Cleanup transient guests
-
由 Daniel P. Berrange 提交于
* src/uml/uml_driver.c: Add audit hooks
-
- 12 7月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
The drivers were accepting domain configs without checking if those were actually meant for them. For example the LXC driver happily accepts configs with type QEMU. Add a check for the expected domain types to the virDomainDefParse* functions.
-
- 08 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Now that the public APIs always use unsigned flags, the internal driver callbacks might as well do likewise. * src/driver.h (vrDrvOpen, virDrvDomainCoreDump) (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc) (virDrvNWFilterGetXMLDesc): Update type. * src/remote/remote_protocol.x (remote_open_args) (remote_domain_core_dump_args, remote_domain_get_xml_desc_args) (remote_network_get_xml_desc_args) (remote_nwfilter_get_xml_desc_args): Likewise. * src/test/test_driver.c: Update clients. * src/remote/remote_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * src/xen/xend_internal.h: Likewise. * src/xen/xm_internal.c: Likewise. * src/xen/xm_internal.h: Likewise. * src/xen/xs_internal.c: Likewise. * src/xen/xs_internal.h: Likewise. * src/xen/xen_inotify.c: Likewise. * src/xen/xen_inotify.h: Likewise. * src/phyp/phyp_driver.c: Likewise. * src/openvz/openvz_driver.c: Likewise. * src/vmware/vmware_driver.c: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/esx/esx_interface_driver.c: Likewise. * src/esx/esx_network_driver.c: Likewise. * src/esx/esx_storage_driver.c: Likewise. * src/esx/esx_device_monitor.c: Likewise. * src/esx/esx_secret_driver.c: Likewise. * src/esx/esx_nwfilter_driver.c: Likewise. * src/interface/netcf_driver.c: Likewise. * src/nwfilter/nwfilter_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/uml/uml_driver.c: Likewise. * src/network/bridge_driver.c: Likewise. * src/secret/secret_driver.c: Likewise. * src/storage/storage_driver.c: Likewise. * src/node_device/node_device_hal.c: Likewise. * src/node_device/node_device_udev.c: Likewise. * src/remote_protocol-structs: Likewise.
-
- 06 7月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Some callers expected virFileMakePath to set errno, some expected it to return an errno value. Unify this to return 0 on success and -1 on error. Set errno to report detailed error information. Also optimize virFileMakePath if stat fails with an errno different from ENOENT.
-
- 02 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
To avoid regressions, we let callers specify whether to require a minor and micro version. Callers that were parsing uname() output benefit from defaulting to 0, whereas callers that were parsing version strings from other sources should not change in behavior. * src/util/util.c (virParseVersionString): Allow caller to choose whether to fail if minor or micro is missing. * src/util/util.h (virParseVersionString): Update signature. * src/esx/esx_driver.c (esxGetVersion): Update callers. * src/lxc/lxc_driver.c (lxcVersion): Likewise. * src/openvz/openvz_conf.c (openvzExtractVersionInfo): Likewise. * src/uml/uml_driver.c (umlGetVersion): Likewise. * src/vbox/vbox_MSCOMGlue.c (vboxLookupVersionInRegistry): Likewise. * src/vbox/vbox_tmpl.c (vboxExtractVersion): Likewise. * src/vmware/vmware_conf.c (vmwareExtractVersion): Likewise. * src/xenapi/xenapi_driver.c (xenapiGetVersion): Likewise. Reported by Matthias Bolte.
-
- 21 6月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
Since we virEventRegisterDefaultImpl is now a public API, callers need a way to invoke the default registered Handle and Timeout functions. We already have general functions for these internally, so promote them to the public API. v2: Actually add APIs to libvirt.h
-
- 15 6月, 2011 2 次提交
-
-
由 Minoru Usui 提交于
Signed-off-by: NMinoru Usui <usui@mxm.nes.nec.co.jp>
-
由 Minoru Usui 提交于
Signed-off-by: NMinoru Usui <usui@mxm.nes.nec.co.jp>
-
- 14 6月, 2011 1 次提交
-
-
由 Hu Tao 提交于
This patch deprecates following enums: VIR_DOMAIN_MEM_CURRENT VIR_DOMAIN_MEM_LIVE VIR_DOMAIN_MEM_CONFIG VIR_DOMAIN_VCPU_LIVE VIR_DOMAIN_VCPU_CONFIG VIR_DOMAIN_DEVICE_MODIFY_CURRENT VIR_DOMAIN_DEVICE_MODIFY_LIVE VIR_DOMAIN_DEVICE_MODIFY_CONFIG And modify internal codes to use virDomainModificationImpact.
-
- 16 5月, 2011 6 次提交
-
-
由 Daniel P. Berrange 提交于
Add many version number annotations to the internal driver tables, to allow hvsupport.html to display more accurate information
-
由 Daniel P. Berrange 提交于
Change all the driver struct initializers to use the C99 style, leaving out unused fields. This will make it possible to add new APIs without changing every driver. eg change: qemudDomainResume, /* domainResume */ qemudDomainShutdown, /* domainShutdown */ NULL, /* domainReboot */ qemudDomainDestroy, /* domainDestroy */ to .domainResume = qemudDomainResume, .domainShutdown = qemudDomainShutdown, .domainDestroy = qemudDomainDestroy, And get rid of any existing C99 style initializersr which set NULL, eg change .listPools = vboxStorageListPools, .numOfDefinedPools = NULL, .listDefinedPools = NULL, .findPoolSources = NULL, .poolLookupByName = vboxStoragePoolLookupByName, to .listPools = vboxStorageListPools, .poolLookupByName = vboxStoragePoolLookupByName,
-
由 Daniel P. Berrange 提交于
Fix some driver names: s/virDrvCPUCompare/virDrvCompareCPU/ s/virDrvCPUBaseline/virDrvBaselineCPU/ s/virDrvQemuDomainMonitorCommand/virDrvDomainQemuMonitorCommand/ s/virDrvSecretNumOfSecrets/virDrvNumOfSecrets/ s/virDrvSecretListSecrets/virDrvListSecrets/ And some driver struct field names: s/getFreeMemory/nodeGetFreeMemory/
-
由 Jiri Denemark 提交于
Only in drivers which use virDomainObj, drivers that query hypervisor for domain status need to be updated separately in case their hypervisor supports this functionality. The reason is also saved into domain state XML so if a domain is not running (i.e., no state XML exists) the reason will be lost by libvirtd restart. I think this is an acceptable limitation.
-
由 Jiri Denemark 提交于
Reason is currently always set to 0 (i.e., *_UNKNOWN).
-
由 Jiri Denemark 提交于
-
- 13 5月, 2011 2 次提交
-
-
由 Michal Privoznik 提交于
This is needed if we want to transfer a temporary file. If the transfer is done with iohelper, we might run into a race condition, where we unlink() file before iohelper is executed. * src/fdstream.c, src/fdstream.h, src/util/iohelper.c: Add new option * src/lxc/lxc_driver.c, src/qemu/qemu_driver.c, src/storage/storage_driver.c, src/uml/uml_driver.c, src/xen/xen_driver.c: Expand existing function calls
-
由 Michal Privoznik 提交于
* src/driver.h: Stub code for new API * src/esx/esx_driver.c, src/libxl/libxl_driver.c, src/lxc/lxc_driver.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/qemu/qemu_driver.c, rc/remote/remote_driver.c, rc/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/vmware/vmware_driver.c, src/xen/xen_driver.c, src/xen/xen_driver.h, src/xen/xen_hypervisor.c, src/xen/xen_inotify.c, src/xen/xend_internal.c, src/xen/xm_internal.c, src/xen/xs_internal.c, src/xenapi/xenapi_driver.c: Add dummy entries in driver table for new APIs
-
- 12 5月, 2011 1 次提交
-
-
由 Lai Jiangshan 提交于
These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead. How do these coversions works? The magic is using the gcc extension of ##. When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to avoid compile error. example: origin after CPP high_level_api("%d", a_int) low_level_api("%d", a_int) high_level_api("a string") low_level_api("a string") About 400 conversions. 8 special conversions: VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal) (for security) 6 conversions Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
- 11 5月, 2011 2 次提交
-
-
由 Matthias Bolte 提交于
This matches the public API and helps to get rid of some special case code in the remote generator. Rename driver API functions and XDR protocol structs. No functional change included outside of the remote generator.
-
由 Lai Jiangshan 提交于
-
- 05 4月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 29 3月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The O_NONBLOCK flag doesn't work as desired on plain files or block devices. Introduce an I/O helper program that does the blocking I/O operations, communicating over a pipe that can support O_NONBLOCK * src/fdstream.c, src/fdstream.h: Add non-blocking I/O on plain files/block devices * src/Makefile.am, src/util/iohelper.c: I/O helper program * src/qemu/qemu_driver.c, src/lxc/lxc_driver.c, src/uml/uml_driver.c, src/xen/xen_driver.c: Update for streams API change
-