- 21 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
https://www.gnu.org/licenses/gpl-howto.html recommends that the 'If not, see <url>.' phrase be a separate sentence. * tests/securityselinuxhelper.c: Remove doubled line. * tests/securityselinuxtest.c: Likewise. * globally: s/; If/. If/
-
- 19 9月, 2012 3 次提交
-
-
由 Eric Blake 提交于
The path was freed before printing the error message, resulting in: error : virSysinfoRead:773 : internal error Failed to execute command (null) But virCommandRun already gives a better error message. * src/util/sysinfo.c (virSysinfoRead): Avoid overwriting error.
-
由 Eric Blake 提交于
Commit ee3d3893 missed the fact that (unsigned char)<<(int) is truncated to int, and therefore failed for any bitmap data longer than four bytes. Also, I failed to run 'make syntax-check' on my commit 4bba6579; for whatever odd reason, ffs lives in a different header than ffsl. * src/util/bitmap.c (virBitmapNewData): Use correct shift type. (includes): Glibc (and therefore gnulib) decided ffs is in <strings.h>, but ffsl is in <string.h>. * tests/virbitmaptest.c (test5): Test it.
-
由 Eric Blake 提交于
Commit 0fc89098 used functions only available on glibc, completely botched 32-bit environments, and risked SIGBUS due to unaligned memory access on platforms that aren't as forgiving as x86_64. * bootstrap.conf (gnulib_modules): Import ffsl. * src/util/bitmap.c (includes): Use <strings.h> for ffsl. (virBitmapNewData, virBitmapToData): Avoid 64-bit assumptions and non-portable functions.
-
- 18 9月, 2012 5 次提交
-
-
由 Martin Kletzander 提交于
Two changes are introduced in this patch: - The first change removes ATTRIBUTE_RETURN_CHECK from virNetDevBandwidthClear, because it was called with ignore_value always, anyway. The function is used even when it's not necessary to call it, just for cleanup purposes. - The second change is added ignoring of the command's exit status, since it may report an error even when run just as "to be sure we clean up" function. No libvirt errors are suppresed by this.
-
由 Osier Yang 提交于
Validates the wwn while parsing, error out if it's malformed. * src/util/util.h: Declare virValidateWWN * src/util/util.c: Implement virValidateWWN * src/libvirt_private.syms: Export virValidateWWN. * src/conf/domain_conf.h: New member 'wwn' for disk def. * src/conf/domain_conf.c: Parse and format disk <wwn>
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
In many places we store bitmap info in a chunk of data (pointed to by a char *), and have redundant codes to set/unset bits. This patch extends virBitmap, and convert those codes to use virBitmap in subsequent patches.
-
由 Hu Tao 提交于
Add a new member variable map_len to store map len of bitmap. and rename size to max_bit accordingly. rename virBitmapAlloc to virBitmapNew.
-
- 13 9月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Add an API allowing flags from one virBitmapPtr to be copied into another instance. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 07 9月, 2012 3 次提交
-
-
由 Daniel P. Berrange 提交于
The introduction of /sys/fs/cgroup came in fairly recent kernels. Prior to that time distros would pick a custom directory like /cgroup or /dev/cgroup. We need to auto-detect where this is, rather than hardcoding it Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Peter Krempa 提交于
This patch adds a helper to deal with assigning values to virTypedParameter structures from strings. The helper parses the value from the string and assigns it to the corresponding union value.
-
由 Eric Blake 提交于
FreeBSD and OpenBSD have a <net/if.h> that is not self-contained; and mingw lacks the header altogether. But gnulib has just taken care of that for us, so we might as well simplify our code. In the process, I got a syntax-check failure if we don't also take the gnulib execinfo module. * .gnulib: Update to latest, for execinfo and net_if. * bootstrap.conf (gnulib_modules): Add execinfo and net_if modules. * configure.ac: Let gnulib check for headers. Simplify check for 'struct ifreq', while also including enough prereq headers. * src/internal.h (IF_NAMESIZE): Drop, now that gnulib guarantees it. * src/nwfilter/nwfilter_learnipaddr.h: Use correct header for IF_NAMESIZE. * src/util/virnetdev.c (includes): Assume <net/if.h> exists. * src/util/virnetdevbridge.c (includes): Likewise. * src/util/virnetdevtap.c (includes): Likewise. * src/util/logging.c (includes): Assume <execinfo.h> exists. (virLogStackTraceToFd): Handle gnulib's fallback implementation.
-
- 06 9月, 2012 1 次提交
-
-
由 Laine Stump 提交于
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=852984 If a network or interface is configured to use Open vSwitch, but ovs-vswitchd (the Open vSwitch database service) isn't running, the ovs-vsctl add-port/del-port commands will hang indefinitely rather than returning an error. There is a --nowait option, but that appears to have no effect on add-port and del-port commands, so instead we add a --timeout=5 to the commands - they will retry for up to 5 seconds, then fail if there is no response.
-
- 05 9月, 2012 2 次提交
-
-
由 Eric Blake 提交于
On OpenBSD, clock_gettime() exists in libc rather than librt, and blindly linking with -lrt made the build fail. Gnulib already did the work for determining which libraries to use, so we should reuse that work rather than doing it ourselves. * bootstrap.conf (gnulib_modules): Pull in clock-time. * configure.ac (RT_LIBS): Drop. * src/Makefile.am (libvirt_util_la_LIBADD): Use gnulib variable instead. * src/util/virtime.c (includes): Simplify.
-
-
- 31 8月, 2012 6 次提交
-
-
由 Eric Blake 提交于
Without this patch, logged command executions can be ambiguous if the command contained any shell metacharacters. This has caused more than one person to attempt to patch clients to add unnecessary quoting, without realizing that the command itself was run with correct args, and only the logged output was ambiguous. * src/util/command.c (virCommandToString): Add shell escapes. * tests/commandtest.c (test16): Test new behavior. * tests/commanddata/test16.log: Update expected output. * tests/qemuxml2argvdata/qemuxml2argv-*.args: Likewise. * tests/networkxml2argvdata/*.argv: Likewise.
-
由 Osier Yang 提交于
The codes were updated to allow to reset the device as long as there is no devices/functions behind the same bus. However, the comments were kept without touched.
-
由 Guannan Ren 提交于
On NUMA machine, the length of string got from file cpuacct.usage_percpu is quite large, so expand the limit of 1024 bytes. errors like: Failed to read file \ '/cgroup/cpuacct/libvirt/qemu/rhel6q/cpuacct.usage_percpu': \ Value too large for defined data type
-
由 Stefan Berger 提交于
Add function for testing for Ethernet broadcast address
-
由 Kyle Mestery 提交于
The introduction of the new VLAN code, along with the fix from 5e465df6, caused the addition of OVS ports to fail with the following message: ovs-vsctl: 00002|vsctl|ERR|: missing column name This fix takes into account the VLAN arguments are optional, and correctly sets up the command line to run the "ovs-vsctl" command to add ports to the OVS bridge. Signed-off-by: NKyle Mestery <kmestery@cisco.com> CC: Eric Blake <eblake@redhat.com>
-
由 Nishank Trivedi 提交于
If a 8021.Qbh network device supports SRIOV and its VF is being used in pci passthrough mode, when the guest is shutdown or destroyed, the PF inteface is also brought down. qemuDomainHostdevNetConfigRestore() finds out the PF for provided hostdev (which is VF) and passes it to virNetDevPortProfileDisassociate() as linkdev. Later, linkdev gets passed to virNetDevSetOnline() where the interface is brought down by clearing IFF_UP flag. Bringing down a PF, when only VF is being brought down is not expected behavior. This patch adds a check so that virNetDevSetOnline() is called only for PF and not if device is a VF. Signed-off-by: NNishank Trivedi <nistrive@cisco.com>
-
- 30 8月, 2012 2 次提交
-
-
由 Daniel Veillard 提交于
As pointed by Eric Blake
-
由 Kyle Mestery 提交于
Fixup buffer usage when handling VLANs. Also fix the logic used to determine if the virNetDevVlanPtr is valid or not. Fixes crashes in the latest code when using Open vSwitch virtualports. Signed-off-by: NKyle Mestery <kmestery@cisco.com>
-
- 29 8月, 2012 2 次提交
-
-
由 Alex Jia 提交于
* src/util/virnetdevopenvswitch.c (virNetDevOpenvswitchAddPort): avoid libvirtd crash due to derefing a NULL virtVlan->tag. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=852383Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Peter Krempa 提交于
getpwuid_r returns success but sets the return structure to NULL when it fails to deliver data about the requested uid. In our helper code this created following strange error messages: " ... cannot getpwuid_r(1234): Success" This patch creates a more helpful message: " ... getpwuid_r failed to retrieve data for uid '1234'"
-
- 28 8月, 2012 3 次提交
-
-
由 Michal Privoznik 提交于
Previous commit 0b4b53bb defined 'inline' to prevent broken build on systems with libnl1 headers. However, it broke build on systems with libnl3 headers. Therefore we must make that fix conditional.
-
由 Eric Blake 提交于
Ubuntu 10.04 shipped with out-of-the-box libnl1 headers, which assumed the old gcc semantics of 'extern inline' as a C89 extension: the function will _always_ be inline if it is used, and that it may be declared extern inline in headers without a definition, as long as the definition occurs before any use. But when C99 added 'extern inline' as a mandatory feature of the language, with slightly different semantics than gcc (the function MUST have external linkage, and the inline definition MUST be present alongside any declaration, where the compiler can then choose which of the two versions to use), this rendered the use of 'inline' in libnl's header obsolete. Most distros already solved this by removing 'inline' (the resulting 'extern' is correct, regardless of gcc semantics), and libnl-3 does not have the problem (where it has switched to 'static inline' instead, again with the definition present, and again, our hack will result in plain 'static' with no ill effects). But for the case of building out of the box, we hack around the broken Ubuntu header. * src/util/virnetlink.h: Work around libnl issue.
-
由 Michal Privoznik 提交于
Currently, when guest agent is configured but not responsive (e.g. due to appropriate service not running in the guest) we return VIR_ERR_INTERNAL_ERROR. Both are wrong. Therefore we need to introduce new error code to reflect this case.
-
- 24 8月, 2012 1 次提交
-
-
由 Laine Stump 提交于
libvirt's network config documents that a bridge's STP "forward delay" (called "delay" in the XML) should be specified in seconds, but virNetDevBridgeSetSTPDelay() assumes that it is given a delay in milliseconds (although the comment at the top of the function incorrectly says "seconds". This fixes the comment, and converts the delay to milliseconds before calling virNetDevBridgeSetSTPDelay().
-
- 23 8月, 2012 2 次提交
-
-
由 Laine Stump 提交于
Several VIR_DEBUG()'s were changed to VIR_WARN() while I was testing the firewalld support patch, and I neglected to change them back before I pushed. In the meantime I've decided that it would be useful to have them be VIR_INFO(), just so there will be logged evidence of which method is being used (firewall-cmd vs. (eb|ip)tables) without needing to crank logging to 11. (at most this adds 2 lines to libvirtd's logs per libvirtd start).
-
由 Yuri Chornoivan 提交于
-
- 22 8月, 2012 8 次提交
-
-
由 Daniel P. Berrange 提交于
The virNetlinkEventAddClient / virNetlinkEventRemoveClient stub impls had syntax errors in their parameter lists, using a ')' after the second-to-last parameter instead of a ',' Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Tang Chen 提交于
This patch introduce virNetlinkEventServiceStopAll() to stop all the monitors to receive netlink messages for libvirtd. Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com>
-
由 Tang Chen 提交于
This patch improve all the API in virnetlink.c to support all kinds of netlink protocols, and make all netlink sockets be able to join in groups. Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com>
-
由 Hu Tao 提交于
vcpu threads pin are implemented using sched_setaffinity(), but not controlled by cgroup. This patch does the following things: 1) enable cpuset cgroup 2) reflect all the vcpu threads pin info to cgroup Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com> Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
-
由 Hu Tao 提交于
Introduce a new API to move tasks of one controller from a cgroup to another cgroup Signed-off-by: NWen Congyang <wency@cn.fujitsu.com> Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com> Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
-
由 Wen Congyang 提交于
Introduce the function virCgroupForEmulator() to create sub directory for simulator thread(include I/O thread, vhost-net thread) Signed-off-by: NWen Congyang <wency@cn.fujitsu.com> Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com> Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
-
由 Eric Blake 提交于
-
由 Eric Blake 提交于
When gcc atomic intrinsics are not available (such as on RHEL 5 with gcc 4.1.2), we were getting link errors due to multiple definitions: ./.libs/libvirt_util.a(libvirt_util_la-virobject.o): In function `virAtomicIntXor': /home/dummy/l,ibvirt/src/util/viratomoic.h:404: multiple definition of `virAtomicIntXor' ./.libs/libvirt_util.a(libvirt_util_la-viratomic.o):/home/dummy/libvirt/src/util/viratomic.h:404: first defined here Solve this by conditionally marking the functions static (the condition avoids falling foul of gcc warnings about unused static function declarations). * src/util/viratomic.h: When not using gcc intrinsics, use static functions to avoid linker errors on duplicate functions.
-