- 08 12月, 2010 7 次提交
-
-
由 Eric Blake 提交于
Guarantee that outbuf/errbuf are allocated on success, even if to the empty string. Caller always has to free the result, and empty output check requires checking if *outbuf=='\0'. Makes the API easier to use safely. Failure is best effort allocation (some paths, like out-of-memory, cannot allocate a buffer, but most do), so caller must free buffer on failure. * docs/internals/command.html.in: Update documentation. * src/util/command.c (virCommandSetOutputBuffer) (virCommandSetErrorBuffer, virCommandProcessIO) Guarantee empty string on no output. * tests/commandtest.c (test17): New test.
-
由 Eric Blake 提交于
* docs/internals/command.html.in: Better documentation of buffer vs. fd considerations. * src/util/command.c (virCommandRunAsync): Reject raw execution with string io. (virCommandRun): Reject execution with user-specified fds not visiting a regular file.
-
由 Jiri Denemark 提交于
-
由 Eric Blake 提交于
Most leaks could only occur on error cleanup paths.
-
由 Eric Blake 提交于
* src/util/command.c (virCommandAddEnvString): Remove duplicate code. (virCommandToString, virCommandRun, virCommandRunAsync) (virCommandWait): Report NULL command as ENOMEM, not invalid usage. Reported by Jiri Denemark.
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
- 07 12月, 2010 9 次提交
-
-
由 Eric Blake 提交于
* src/conf/domain_conf.c (virDomainDefParseXML): Prefer sysinfo uuid over generating one, and if both uuids are present, require them to be identical. * src/qemu/qemu_conf.c (qemuBuildSmbiosSystemStr): Allow skipping the uuid. (qemudBuildCommandLine): Adjust caller; <smbios mode=host/> must not use host uuid in place of guest uuid.
-
由 Eric Blake 提交于
* docs/schemas/domain.rng (sysinf-value): Expand pattern. * tests/qemuxml2argvdata/qemuxml2argv-smbios.xml: Prefer '' over "" for attribute values. Copy real hardware values. * tests/qemuxml2argvdata/qemuxml2argv-smbios.args: Likewise.
-
由 Eric Blake 提交于
* docs/schemas/domain.rng (sysinfo-system-name): Also allow family. * src/util/sysinfo.h (struct _virSysinfoDef): Add system_family. * src/conf/domain_conf.c (virSysinfoParseXML) (virDomainSysinfoDefFormat): Support it. * src/util/sysinfo.c (virSysinfoDefFree, virSysinfoRead): Likewise. * src/qemu/qemu_conf.c (qemuBuildSmbiosSystemStr): Likewise. * tests/qemuxml2argvdata/qemuxml2argv-smbios.xml: Adjust test. * tests/qemuxml2argvdata/qemuxml2argv-smbios.args: Likewise.
-
由 Eric Blake 提交于
The log lists things like -smbios type=1,vendor="Red Hat", which is great for shell parsing, but not so great when you realize that execve() then passes those literal "" on as part of the command line argument, such that qemu sets SMBIOS with extra literal quotes. The eventual addition of virCommand is needed before we have the API to shell-quote a string representation of a command line, so that the log can still be pasted into a shell, but without inserting extra bytes into the execve() arguments. * src/qemu/qemu_conf.c (qemuBuildSmbiosBiosStr) (qemuBuildSmbiosSystemStr): Qemu doesn't like quotes around uuid arguments, and the remaining quotes are passed literally to smbios, making <smbios mode='host'/> inaccurate. Removing the quotes makes the log harder to parse, but that can be fixed later with virCommand improvements. * tests/qemuxml2argvdata/qemuxml2argv-smbios.args: 'Fix' test; it will need fixing again once virCommand learns how to shell-quote a potential command line.
-
由 Osier Yang 提交于
"echo" is already in group "virsh", "freecell" and "hostname" are already in group "host", so remove them from group "domain" * tools/virsh.c
-
由 Dan Kenigsberg 提交于
Humans consider January as month #1, while gmtime_r(3) calls it month #0. While fixing it, render qemu's rtc parameter with leading zeros, as is more commonplace. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=660194
-
由 Laurent Léonard 提交于
When libvirt-guests is being stopped, I get the following message: $Running guests on default URI: test-vm $Suspending guests on default URI... $Suspending test-vm: /etc/init.d/libvirt-guests: 340: Syntax error: Bad fd number
-
由 Eric Blake 提交于
* src/util/threads.h (virThreadID): New prototype. * src/util/threads-pthread.c (virThreadID): New function. * src/util/threads-win32.c (virThreadID): Likewise. * src/libvirt_private.syms (threads.h): Export it. * daemon/event.c (virEventInterruptLocked): Use it to avoid warning on BSD systems.
-
由 Osier Yang 提交于
"virCommandRun": if "cmd->outbuf" or "cmd->errbuf" is NULL, libvirtd will be crashed when trying to start a qemu domain (which invokes "virCommandRun"), it caused by we try to use "*cmd->outbuf" and "*cmd->errbuf" regardless of cmd->outbuf or cmd->errbuf is NULL. * src/util/command.c (virCommandRun)
-
- 06 12月, 2010 4 次提交
-
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
Two more calls to remote libvirtd have to be surrounded by qemuDomainObjEnterRemoteWithDriver() and qemuDomainObjExitRemoteWithDriver() to prevent possible deadlock between two communicating libvirt daemons. See commit f0c8e1cb for further details.
-
由 Jiri Denemark 提交于
virDrvSupportsFeature API is allowed to return -1 on error while all but one uses of VIR_DRV_SUPPORTS_FEATURE only check for (non)zero return value. Let's make this macro return zero on error, which is what everyone expects anyway.
-
- 05 12月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 04 12月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
As this symbols are exported independent from WITH_MACVTAP.
-
- 03 12月, 2010 13 次提交
-
-
由 Eric Blake 提交于
* tools/virsh.c (cmdRunConsole, cmdConsole): Rename problematic symbol. Reported by Justin Clift.
-
由 Osier Yang 提交于
Remove the optional option "group", as cmdHelp should accepts only one option ("virsh help" supports both command and command group now, and user rarely uses the options, so it doesn't matter much for it being longer, :-) * tools/virsh.c
-
由 Jean-Baptiste Rouault 提交于
This patch adds a mode_t parameter to virFileWriteStr(). If mode is different from 0, virFileWriteStr() will try to create the file if it doesn't exist. * src/util/util.h (virFileWriteStr): Alter signature. * src/util/util.c (virFileWriteStr): Allow file creation. * src/network/bridge_driver.c (networkEnableIpForwarding) (networkDisableIPV6): Adjust clients. * src/node_device/node_device_driver.c (nodeDeviceVportCreateDelete): Likewise. * src/util/cgroup.c (virCgroupSetValueStr): Likewise. * src/util/pci.c (pciBindDeviceToStub, pciUnBindDeviceFromStub): Likewise.
-
由 Justin Clift 提交于
Now includes information on keyword usage, and provides examples.
-
由 Osier Yang 提交于
* tools/virsh.c (find-storage-pool-sources-as and find-storage-pool-sources should't be in command group "Domain Management", move them to group "Storage Pool".
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
* src/uml/uml_conf.c (umlBuildCommandLineChr) (umlBuildCommandLine): Rewrite with virCommand. * src/uml/uml_conf.h (umlBuildCommandLine): Update signature. * src/uml/uml_driver.c (umlStartVMDaemon): Adjust caller.
-
由 Eric Blake 提交于
* src/qemu/qemu_conf.c (qemudExtractVersionInfo): Check for file before executing it here, rather than in callers. (qemudBuildCommandLine): Rewrite with virCommand. * src/qemu/qemu_conf.h (qemudBuildCommandLine): Update signature. * src/qemu/qemu_driver.c (qemuAssignPCIAddresses) (qemudStartVMDaemon, qemuDomainXMLToNative): Adjust callers.
-
由 Daniel P. Berrange 提交于
This proof of concept shows how two existing uses of virExec and virRun can be ported to the new virCommand APIs, and how much simpler the code becomes
-
由 Daniel P. Berrange 提交于
* docs/internals/command.html.in: New file. * docs/Makefile.am: Build new docs. * docs/subsite.xsl: New glue file. * docs/internals.html.in, docs/sitemap.html.in: Update glue.
-
由 Daniel P. Berrange 提交于
This introduces a new set of APIs in src/util/command.h to use for invoking commands. This is intended to replace all current usage of virRun and virExec variants, with a more flexible and less error prone API. * src/util/command.c: New file. * src/util/command.h: New header. * src/Makefile.am (UTIL_SOURCES): Build it. * src/libvirt_private.syms: Export symbols internally. * tests/commandtest.c: New test. * tests/Makefile.am (check_PROGRAMS): Run it. * tests/commandhelper.c: Auxiliary program. * tests/commanddata/test2.log - test15.log: New expected outputs. * cfg.mk (useless_free_options): Add virCommandFree. (msg_gen_function): Add virCommandError. * po/POTFILES.in: New translation. * .x-sc_avoid_write: Add exemption. * tests/.gitignore: Ignore new built file.
-
由 Eric Blake 提交于
* src/util/util.h (virVasprintf): New declaration. * src/util/util.c (virVasprintf): New function. (virAsprintf): Use it. * src/util/virtaudit.c (virAuditSend): Likewise. * src/libvirt_private.syms: Export it. * cfg.mk (sc_prohibit_asprintf): Also prohibit vasprintf. * .x-sc_prohibit_asprintf: Add exemption.
-
由 Eric Blake 提交于
* src/util/util.c (saferead): Fix return type. (safewrite): Fix indentation.
-
- 02 12月, 2010 5 次提交
-
-
由 Daniel P. Berrange 提交于
* daemon/event.c: Include errno in debug info upon poll() failure
-
由 Daniel P. Berrange 提交于
The logging setup requires const char * strings, but the virLogSetFromEnv() strdup's the env variables, thus causing a memory leak * src/util/logging.c: Avoid strdup'ing env variables
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
This patch allows for using custom scripts instead of /usr/bin/qemu emulator in domain XML. To do so, one would specify relative path to the custom script in <emulator/>. The path needs to be relative to qemuxml2argvdata directory and it will be transparently made absolute in runtime. The expected command line needs to contain the exact relative path as was used in domain XML. The problem is RelaxNG schema for domain XML only allows for absolute path within <emulator/>. To workaround it, an extra '/' must be added at the beginning of the path. That is, instead of "./qemu.sh" or "../emulator/qemu.sh" one would use "/./qemu.sh" or "/../emulator/qemu.sh". The extra slash is removed before further processing. I don't like this workaround, it's very ugly but it's the best option I was able to come up with. Relaxing domain XML schema is not an option IMO.
-
由 Jiri Denemark 提交于
Both vendor and topology elements are optional.
-