- 10 11月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
Using automated replacement with sed and editing I have now replaced all occurrences of close() with VIR_(FORCE_)CLOSE() except for one, of course. Some replacements were straight forward, others I needed to pay attention. I hope I payed attention in all the right places... Please have a look. This should have at least solved one more double-close error.
-
- 09 11月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
Suggested by danpb, as it's not up-to-date anymore and lacks many functions that were added to libvirtd.
-
- 03 11月, 2010 1 次提交
-
-
由 Daniel Veillard 提交于
virPipeReadUntilEOF is used to read the stdout of exec'ed and this could fail to capture the full output and read only 1024 bytes. The problem is that this is based on a poll loop, and in the loop we read at most 1024 bytes per file descriptor, but we also note in the loop if poll indicates that the process won't output more than that on that fd by setting finished[i] = 1. The simplest way is that if we read a full buffer make sure finished[i] is still 0 because we will need another pass in the loop.
-
- 02 11月, 2010 1 次提交
-
-
由 Osier Yang 提交于
* src/util/util.h * src/util/util.c * src/libvirt_private.syms
-
- 28 10月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
Commit 9bd3cce0 added virFork and virDriverLoadModule to libvirt_private.syms, but virFork didn't have a body on Win32 and virDriverLoadModule was already correctly exported conditional via libvirt_driver_modules.syms.
-
- 23 9月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* .gnulib: Update to latest. * bootstrap.conf (gnulib_modules): Add new termios module. (gnulib_tool_option_extras): Make libtool usage explicit. * src/util/util.c (includes): Gnulib now guarantees termios.h. * bootstrap: Resync from gnulib.
-
- 31 8月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
virHexToBin will be used in the .vmx handling code.
-
- 13 8月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
This patch fixes a couple of complaints from valgrind when tickling libvirtd with SIGHUP. The first two files contain fixes for memory leaks. The 3rd one initializes an uninitialized variable. The 4th one is another memory leak.
-
- 10 8月, 2010 1 次提交
-
-
由 Soren Hansen 提交于
virDiskNameToIndex has a list of disk name prefixes that it uses in the process of finding the disk's index. This list is missing "ubd" which is the disk prefix used for UML domains. Signed-off-by: NSoren Hansen <soren@linux2go.dk>
-
- 22 7月, 2010 2 次提交
-
-
由 Laine Stump 提交于
virDirCreate also previously returned 0 on success and errno on failure. This makes it fit the recommended convention of returning 0 on success, -errno (ie a negative number) on failure.
-
由 Laine Stump 提交于
virFileOperation previously returned 0 on success, or the value of errno on failure. Although there are other functions in libvirt that use this convention, the preferred (and more common) convention is to return 0 on success and -errno (or simply -1 in some cases) on failure. This way the check for failure is always (ret < 0). * src/util/util.c - change virFileOperation and virFileOperationNoFork to return -errno on failure. * src/storage/storage_backend.c, src/qemu/qemu_driver.c - change the hook functions passed to virFileOperation to return -errno on failure.
-
- 02 7月, 2010 1 次提交
-
-
由 Cole Robinson 提交于
Any error message raised after the process has forked needs to be followed by virDispatchError, otherwise we have no chance of ever seeing it. This was selectively done for hook functions in the past, but really applies to all post-fork errors.
-
- 29 6月, 2010 1 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=608092 * src/util/util.c (virFileResolveLink): Use canonicalize_file_name, rather than areadlink.
-
- 11 6月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
Otherwise this will segfault if PATH is not defined. Reported by Emre Erenoglu
-
- 26 5月, 2010 2 次提交
-
-
由 Chris Lalancette 提交于
We've been running into a lot of situations where virGetHostname() is returning "localhost", where a plain gethostname() would have returned the correct thing. This is because virGetHostname() is *always* trying to canonicalize the name returned from gethostname(), even when it doesn't have to. This patch changes virGetHostname so that if the value returned from gethostname() is already FQDN or localhost, it returns that string directly. If the value returned from gethostname() is a shortened hostname, then we try to canonicalize it. If that succeeds, we returned the canonicalized hostname. If that fails, and/or returns "localhost", then we just return the original string we got from gethostname() and hope for the best. Note that after this patch it is up to clients to check whether "localhost" is an allowed return value. The only place where it's currently not is in qemu migration. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Cole Robinson 提交于
Spurious / in a pool target path makes life difficult for apps using the GetVolByPath, and doing other path based comparisons with pools. This has caused a few issues for virt-manager users: https://bugzilla.redhat.com/show_bug.cgi?id=494005 https://bugzilla.redhat.com/show_bug.cgi?id=593565 Add a new util API which removes spurious /, virFileSanitizePath. Sanitize target paths when parsing pool XML, and for paths passed to GetVolByPath. v2: Leading // must be preserved, properly sanitize path=/, sanitize away /./ -> / v3: Properly handle starting ./ and ending /. v4: Drop all '.' handling, just sanitize / for now.
-
- 21 5月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
Run this: git grep -l 'VIR_ERROR\s*("'|xargs perl -pi -e \ 's/(VIR_ERROR)\s*\((".*?"),/$1(_($2),/'
-
- 18 5月, 2010 1 次提交
-
-
由 Eric Blake 提交于
virFileResolveLink was returning a positive value on error, thus confusing callers that assumed failure was < 0. The confusion is further evidenced by callers that would have ended up calling virReportSystemError with a negative value instead of a valid errno. Fixes Red Hat BZ #591363. * src/util/util.c (virFileResolveLink): Live up to documentation. * src/qemu/qemu_security_dac.c (qemuSecurityDACRestoreSecurityFileLabel): Adjust callers. * src/security/security_selinux.c (SELinuxRestoreSecurityFileLabel): Likewise. * src/storage/storage_backend_disk.c (virStorageBackendDiskDeleteVol): Likewise.
-
- 07 5月, 2010 2 次提交
-
-
由 Eric Blake 提交于
* configure.ac: Drop sys/wait.h check. * src/libvirt.c (includes): Use header unconditionally. * src/remote/remote_driver.c (includes): Likewise. * src/storage/storage_backend.c (includes): Likewise. * src/util/ebtables.c (includes): Likewise. * src/util/hooks.c (includes): Likewise. * src/util/iptables.c (includes): Likewise. * src/util/util.c (includes): Likewise.
-
由 Eric Blake 提交于
Gnulib can guarantee that pthread.h exists, but for now, it is a dummy header with no support for most pthread_* functions. Modify our use of pthread to use function checks, rather than header checks, to determine how much pthread support is present. * bootstrap.conf (gnulib_modules): Add pthread. * configure.ac: Drop all pthread.h checks. Optimize function checks. Add check for pthread functions. * src/Makefile.am (libvirt_lxc_LDADD): Ensure proper link. * src/remote/remote_driver.c (remoteIOEventLoop): Depend on pthread_sigmask, now that gnulib guarantees pthread.h. * src/util/util.c (virFork): Likewise. * src/util/threads.c (threads-pthread.c): Depend on pthread_mutexattr_init, as a witness of full pthread support. * src/util/threads.h (threads-pthread.h): Likewise.
-
- 05 5月, 2010 1 次提交
-
-
由 Eric Blake 提交于
Detected by clang. POSIX requires that the second argument to va_start be the name of the last variable; and in some implementations, passing *path instead of path would dereference bogus memory instead of pulling arguments off the stack. * src/util/util.c (virBuildPathInternal): Use correct argument to va_start.
-
- 04 5月, 2010 2 次提交
-
-
由 Matthias Bolte 提交于
Add an empty body for virCondWaitUntil and move virPipeReadUntilEOF out of the '#ifndef WIN32' block, because it compiles fine with MinGW in combination with gnulib.
-
由 Eric Blake 提交于
Necessary on cygwin, where uid_t and gid_t are 4-byte long rather than int, causing gcc -Wformat warnings. * src/util/util.c (virFileOperationNoFork, virDirCreateNoFork) (virFileOperation, virDirCreate, virGetUserEnt): Cast uid_t and gid_t before passing to printf. * .gitignore: Ignore Windows executables.
-
- 30 4月, 2010 1 次提交
-
-
由 Daniel Veillard 提交于
* src/util/util.c: as it's used for checking things like .iso suffixes
-
- 24 4月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
Cygwin has mntent.h but lacks getmntent_r. Update preprocessor checks to catch this combination.
-
- 22 4月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 15 4月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
* src/util/util.c (virGetHostnameLocalhost): Add an sa_assert to tell clang it's ok to dereference "info" after a non-failing getaddrinfo call.
-
- 07 4月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
Reported by Paul Jenner
-
- 01 4月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
virParseVersionString uses virStrToLong_ui instead of sscanf. This also fixes a bug in the UML driver, that always returned 0 as version number. Introduce STRSKIP to check if a string has a certain prefix and to skip this prefix.
-
- 30 3月, 2010 1 次提交
-
-
由 Daniel Veillard 提交于
used to read the data from virExec stdout/err file descriptors * src/util/util.c src/util/util.h: not static anymore and export it * src/libvirt_private.syms: allow access internally
-
- 23 3月, 2010 5 次提交
-
-
由 Jim Meyering 提交于
* src/util/util.c (virDiskNameToIndex): Accept sda1, and map it to "sda". I.e., accept and ignore any string of trailing digits.
-
由 Matthias Bolte 提交于
virSetCloseExec and virExecDaemonize were missing a body on Windows.
-
由 Matthias Bolte 提交于
Correctly disable pthread related code if pthread is not avialable, in order to get it compile with MinGW on Windows.
-
由 Matthias Bolte 提交于
Even if gnulib can provide stubs, it won't help that much. So just replace affected util functions (virFileOperation and virDirCreate) with stubs on Windows. Both functions aren't used on libvirt's client side, so this is fine for MinGW builds.
-
由 Matthias Bolte 提交于
Add dummy bodies for HAVE_GETPWUID_R and HAVE_MNTENT_H dependent functions for MinGW builds.
-
- 10 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* global: patch created by running: for f in $(git ls-files '*.[ch]') ; do cppi $f > $f.t && mv $f.t $f done
-
- 08 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
Prior to this patch, there was an inconsistent mix between GNU and C99. For consistency, and potential portability to other compilers, stick with the C99 vararg macro syntax. * src/conf/cpu_conf.c (virCPUReportError): Use C99 rather than GNU vararg macro syntax. * src/conf/domain_conf.c (virDomainReportError): Likewise. * src/conf/domain_event.c (eventReportError): Likewise. * src/conf/interface_conf.c (virInterfaceReportError): Likewise. * src/conf/network_conf.c (virNetworkReportError): Likewise. * src/conf/node_device_conf.h (virNodeDeviceReportError): Likewise. * src/conf/secret_conf.h (virSecretReportError): Likewise. * src/conf/storage_conf.h (virStorageReportError): Likewise. * src/esx/esx_device_monitor.c (ESX_ERROR): Use C99 rather than GNU vararg macro syntax. * src/esx/esx_driver.c (ESX_ERROR): Likewise. * src/esx/esx_interface_driver.c (ESX_ERROR): Likewise. * src/esx/esx_network_driver.c (ESX_ERROR): Likewise. * src/esx/esx_secret_driver.c (ESX_ERROR): Likewise. * src/esx/esx_storage_driver.c (ESX_ERROR): Likewise. * src/esx/esx_util.c (ESX_ERROR): Likewise. * src/esx/esx_vi.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vi_methods.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vi_types.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vmx.c (ESX_ERROR): Likewise. * src/util/hostusb.c (usbReportError): Use C99 rather than GNU vararg macro syntax. * src/util/json.c (virJSONError): Likewise. * src/util/macvtap.c (ReportError): Likewise. * src/util/pci.c (pciReportError): Likewise. * src/util/stats_linux.c (virStatsError): Likewise. * src/util/util.c (virUtilError): Likewise. * src/util/xml.c (virXMLError): Likewise. * src/xen/proxy_internal.c (virProxyError): Use C99 rather than GNU vararg macro syntax. * src/xen/sexpr.c (virSexprError): Likewise. * src/xen/xen_driver.c (xenUnifiedError): Likewise. * src/xen/xen_hypervisor.c (virXenError): Likewise. * src/xen/xen_inotify.c (virXenInotifyError): Likewise. * src/xen/xend_internal.c (virXendError): Likewise. * src/xen/xm_internal.c (xenXMError): Likewise. * src/xen/xs_internal.c (virXenStoreError): Likewise. * src/cpu/cpu.h (virCPUReportError): Use C99 rather than GNU vararg macro syntax. * src/datatypes.c (virLibConnError): Likewise. * src/interface/netcf_driver.c (interfaceReportError): Likewise. * src/libvirt.c (virLibStreamError): Likewise. * src/lxc/lxc_conf.h (lxcError): Likewise. * src/network/bridge_driver.c (networkReportError): Likewise. * src/nodeinfo.c (nodeReportError): Likewise. * src/opennebula/one_conf.h (oneError): Likewise. * src/openvz/openvz_conf.h (openvzError): Likewise. * src/phyp/phyp_driver.c (PHYP_ERROR): Likewise. * src/qemu/qemu_conf.h (qemuReportError): Likewise. * src/remote/remote_driver.c (errorf): Likewise. * src/security/security_driver.h (virSecurityReportError): Likewise. * src/test/test_driver.c (testError): Likewise. * src/uml/uml_conf.h (umlReportError): Likewise. * src/vbox/vbox_driver.c (vboxError): Likewise. * src/vbox/vbox_tmpl.c (vboxError): Likewise.
-
- 06 3月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
to saferead_lim, which interprets it as a size_t. * src/util/util.c (virFileReadLimFD): Do not malfunction when maxlen < -1. Return -1,EINVAL in that case. Handle maxlen==0 in the same manner.
-
- 03 3月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
Various safezero() implementations used either -1, errno or -errno return values. This patch fixes them all to return -1 and set errno appropriately. There was also a bug in size parameter passed to safewrite() which could result in an attempt to write gigabytes out of a megabyte buffer. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 24 2月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
* src/util/util.c: Include "ignore-value.h". (virFork): We really do want to ignore pthread_sigmask failure.
-