- 15 2月, 2011 2 次提交
-
-
由 Eric Blake 提交于
clang complained that STREQ(group->controllers[i].mountPoint,...) was a NULL dereference when i==VIR_CGROUP_CONTROLLER_CPUSET, because it assumes the worst about virCgroupPathOfController. Marking the argument const doesn't yet have an effect, per this clang bug: http://llvm.org/bugs/show_bug.cgi?id=7758 So, we use sa_assert, which was designed to shut up false positives from tools like clang. * src/util/cgroup.c (virCgroupMakeGroup): Teach clang that there is no NULL dereference.
-
由 Eric Blake 提交于
Detected by clang. * src/util/xml.c (virXPathStringLimit): Use %zd, not obsolete %Zd.
-
- 14 2月, 2011 1 次提交
-
-
由 Christophe Fergeau 提交于
* src/util/hash.c: virHashAddEntry and virHashUpdateEntry were missing NULL checks on strdup * AUTHORS: add Christophe Fergeau
-
- 12 2月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Building the 0.8.8 release candidate on cygwin produced this compiler warning, which is indicative of catastrophic failure on any attempt to print an error message with errno turned to a string: CC strerror_r.lo strerror_r.c: In function 'rpl_strerror_r': strerror_r.c:67: warning: assignment makes integer from pointer without a cast This has been fixed in gnulib. * .gnulib: Update to latest, for strerror_r fix. * src/util/memory.c (includes): Satisfy 'make syntax-check'.
-
- 11 2月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The logging functions are enhanced so that immediately prior to the first log message being printed to any output channel, the libvirt package version will be printed. eg $ LIBVIRT_DEBUG=1 virsh 18:13:28.013: 17536: info : libvirt version: 0.8.7 18:13:28.013: 17536: debug : virInitialize:361 : register drivers ... The 'configure' script gains two new arguments which can be used as --with-packager="Fedora Project, x86-01.phx2.fedoraproject.org, 01-27-2011-18:00:10" --with-packager-version="1.fc14" to allow distros to append a custom string with package specific data. The RPM specfile is modified so that it appends the RPM version, the build host, the build date and the packager name. eg $ LIBVIRT_DEBUG=1 virsh 18:14:52.086: 17551: info : libvirt version: 0.8.7, package: 1.fc13 (Fedora Project, x86-01.phx2.fedoraproject.org, 01-27-2011-18:00:10) 18:14:52.086: 17551: debug : virInitialize:361 : register drivers Thus when distro packagers receive bug reports they can clearly see what version was in use, even if the bug reporter mistakenly or intentionally lies about version/builds * src/util/logging.c: Output version data prior to first log message * libvirt.spec.in: Include RPM release, date, hostname & packager * configure.ac: Add --with-packager & --with-packager-version args
-
- 10 2月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
To ensure child processes will log all error messages, reset the logging filter function when forking * src/util/util.c: Reset log filter in fork
-
由 Daniel P. Berrange 提交于
Some functionality run in virExec hooks may do I/O which can trigger SIGPIPE. Renable SIGPIPE blocking around the hook function * src/util/util.c: Block SIGPIPE around hooks
-
- 09 2月, 2011 3 次提交
-
-
由 Eric Blake 提交于
* src/util/sysinfo.h (virSysinfoFormat): New prototype. * src/conf/domain_conf.c (virDomainSysinfoDefFormat): Move guts... * src/util/sysinfo.c (virSysinfoFormat): ...into new function. * src/libvirt_private.syms: Export it.
-
由 Gui Jianfeng 提交于
Implement blkio.weight tuning API. Acked-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
-
由 Gui Jianfeng 提交于
Enable cgroup hierarchy for blkio cgroup Acked-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
-
- 04 2月, 2011 1 次提交
-
-
由 Stefan Berger 提交于
This patch fixes 2 occurrences of nla_put expression with a '!' in front of them that basically prevented the detection that the buffer is too small. However, code further below would then detect that the buffer is too small when further parts are added to the netlink message.
-
- 03 2月, 2011 1 次提交
-
-
由 Davidlohr Bueso 提交于
When compiling libvirt with GCC 3.4.6 the following warning is being triggered quite a lot: util/memory.h:60: warning: declaration of 'remove' shadows a global declaration /usr/include/stdio.h:175: warning: shadowed declaration is here Fix this by renaming the parameter to 'toremove'.
-
- 02 2月, 2011 1 次提交
-
-
由 Stefan Berger 提交于
This patch fixes a variable in the debugging output.
-
- 30 1月, 2011 2 次提交
-
-
由 Eric Blake 提交于
commit f1fe9671 was supposed to make sure we use files.h macros to avoid double close, but it didn't work. Meanwhile, virCommand is vastly superior to system(), fork(), and popen() (also to virExec, but we haven't completed that conversion), so enforce that, too. * cfg.mk (sc_prohibit_close): Fix typo that excluded close, and add pclose. (sc_prohibit_fork_wrappers): New rule, for fork, system, and popen. * .x-sc_prohibit_close: More exemptions. * .x-sc_prohibit_fork_wrappers: New file. * Makefile.am (syntax_check_exceptions): Ship new file. * src/datatypes.c (virReleaseConnect): Tweak comment to avoid false positive. * src/util/files.h (VIR_CLOSE): Likewise.
-
由 Eric Blake 提交于
* src/fdstream.c (virFDStreamOpenFile, virFDStreamCreateFile): Use VIR_FORCE_CLOSE instead of close. * tests/commandtest.c (mymain): Likewise. * tools/virsh.c (editFile): Use virCommand instead of system. * src/util/util.c (__virExec): Special case preservation of std file descriptors to child.
-
- 29 1月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Pure cosmetic change.
-
- 26 1月, 2011 3 次提交
-
-
由 Daniel P. Berrange 提交于
Add a hook to the error reporting APIs to allow specific error messages to be filtered out. Wire up libvirtd to remove VIR_ERR_NO_DOMAIN & similar error codes from the logs. They are still logged at DEBUG level. * daemon/libvirtd.c: Filter VIR_ERR_NO_DOMAIN and friends * src/libvirt_private.syms, src/util/virterror.c, src/util/virterror_internal.h: Hook for changing error reporting level
-
由 Daniel P. Berrange 提交于
This reverts the additions in commit abff683f taking us back to state where all errors are fully logged in both libvirtd and normal clients. THe intent was to stop VIR_ERR_NO_DOMAIN (No such domain with UUID XXXX) messages from client apps polluting syslog The change affected all error codes, but more seriously, it also impacted errors from internal libvirtd infrastructure For example guest autostart no longer logged errors. The libvirtd network code no longer logged some errors. This makes debugging incredibly hard * daemon/libvirtd.c: Remove error log priority filter * src/util/virterror.c, src/util/virterror_internal.h: Remove callback for overriding log priority
-
由 Daniel P. Berrange 提交于
Remove use of brackets around following return statement. Fix indentation of two switch statements
-
- 19 1月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* .gnulib: Update to latest, for sigpipe and sigaction modules. * bootstrap.conf (gnulib_modules): Add siaction, sigpipe, strerror_r. * tools/virsh.c (vshSetupSignals) [!SIGPIPE]: Delete, now that gnulib guarantees it. (SA_SIGINFO): Define for mingw fallback. * src/util/virterror.c (virStrerror): Simplify, now that gnulib guarantees the POSIX interface. * configure.ac (AC_CHECK_FUNCS_ONCE): Drop redundant check. (AM_PROG_CC_STDC): Move earlier, to keep autoconf happy.
-
- 15 1月, 2011 1 次提交
-
-
由 Nikunj A. Dadhania 提交于
Display or set unlimited values for memory parameters. Unlimited is represented by INT64_MAX in memory cgroup. Signed-off-by: NNikunj A. Dadhania <nikunj@linux.vnet.ibm.com> Reported-by: NJustin Clift <jclift@redhat.com>
-
- 14 1月, 2011 1 次提交
-
-
由 Eric Blake 提交于
It was awkward having only int conversion in the virStrToLong family, but only long conversion in the virXPath family. Make both families support both types. * src/util/util.h (virStrToLong_l, virStrToLong_ul): New prototypes. * src/util/xml.h (virXPathInt, virXPathUInt): Likewise. * src/util/util.c (virStrToLong_l, virStrToLong_ul): New functions. * src/util/xml.c (virXPathInt, virXPathUInt): Likewise. * src/libvirt_private.syms (util.h, xml.h): Export them.
-
- 13 1月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Without this patch, at least tests/daemon-conf (which sticks $builddir/src in the PATH) tries to execute the directory $builddir/src/qemu rather than a real qemu binary. * src/util/util.h (virFileExists): Adjust prototype. (virFileIsExecutable): New prototype. * src/util/util.c (virFindFileInPath): Reject non-executables and directories. Avoid huge stack allocation. (virFileExists): Use lighter-weight syscall. (virFileIsExecutable): New function. * src/libvirt_private.syms (util.h): Export new function.
-
- 11 1月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* src/util/network.c (virSocketAddrMask): Zero out port, so that iptables can initialize just the netmask then call virSocketFormatAddr without an uninitialized read in getnameinfo.
-
- 06 1月, 2011 1 次提交
-
-
由 Laine Stump 提交于
Although the upper-layer code protected against it, it was possible to call iptablesForwardMasquerade() with an IPv6 address and have it attempt to add a rule to the MASQUERADE chain of ip6tables (which doesn't exist). This patch changes that function to check the protocol of the given address, generate an error log if it's not IPv4 (AF_INET), and finally hardcodes all the family parameters sent down to lower-level functions.
-
- 04 1月, 2011 2 次提交
-
-
由 Eric Blake 提交于
Detected on cygwin: util/util.c: In function 'virSetUIDGID': util/util.c:2824: warning: format '%d' expects type 'int', but argument 7 has type 'gid_t' [-Wformat] (and three other lines) * src/util/util.c (virSetUIDGID): Cast, as is done elsewhere in this file, to avoid printf type mismatch warnings.
-
由 Hu Tao 提交于
Don't require non-null jobdata to virThreadPoolSendJob().
-
- 01 1月, 2011 4 次提交
-
-
由 Eric Blake 提交于
As pointed out in https://bugzilla.redhat.com/show_bug.cgi?id=659855#c9, commit c3568ec2 introduced a regression where we no longer close any fd's beyond FD_SETSIZE. * src/util/util.c (__virExec): Continue to close fd's beyond keepfd range. Reported by Stefan Praszalowicz.
-
由 Laine Stump 提交于
The original version of these functions would modify the address sent in, meaning that the caller would usually need to copy the address first. This change makes the original a const, and puts the resulting masked address into a new arg (which could point to the same virSocketAddr as the original, if the caller really wants to modify it). This also makes the API consistent with virSocketAddrBroadcast[ByPrefix].
-
由 Laine Stump 提交于
Previously we used ioctl() to set the IP address and netmask of the bridges used for virtual networks, and apparently the SIOCSIFNETMASK ioctl implicitly set the broadcast address for the interface. The new method of using the "ip" command requires broadcast address to be explicitly specified though.
-
由 Laine Stump 提交于
These functions work only for IPv4, becasue IPv6 doesn't have the same concept of "broadcast address" as IPv4. They merely OR the inverse of the netmask with the given host address, thus turning on all the host bits.
-
- 24 12月, 2010 7 次提交
-
-
由 Jiri Denemark 提交于
-
由 Laine Stump 提交于
virSetUIDGID() sets both the real and effective group and user of the process, and additionally calls initgroups() to assure that the process joins all the auxiliary groups that the given uid is a member of.
-
由 Laine Stump 提交于
There are cases when we want log an error message, and possibly free some memory as part of the cleanup, while still preserving errno for a caller, but the functions that log errors, and virFree (VIR_FREE) make system calls that will clear errno. This patch preserves errno during those most basic functions (corresponding to virReportSystemError(), virReportOOMError(), networkReportError(), etc, as well as virStrError()). It does *not preserve errno across calls to higher level items such as virDispatchError(), as it's assumed the caller is all finished with any need for errno by the time it dispatches the error.
-
由 Laine Stump 提交于
All of the iptables functions eventually call down to a single bottom-level function, and fortunately, ip6tables syntax (for all the args that we use) is identical to iptables format (except the addresses), so all we need to do is: 1) Get an address family down to the lowest level function in each case, either implied through an address, or explicitly when no address is in the parameter list, and 2) At the lowest level, just decide whether to call "iptables" or "ip6tables" based on the family. The location of the ip6tables binary is determined at build time by autoconf. If a particular target system happens to not have ip6tables installed, any attempts to run it will generate an error, but that won't happen unless someone tries to define an IPv6 address for a network. This is identical behavior to IPv4 addresses and iptables.
-
由 Laine Stump 提交于
brSetInetAddress can only set a single IP address on the bridge, and uses a method (ioctl(SIOCSETIFADDR)) that only works for IPv4. Replace it and brSetInetNetmask with a single function that uses the external "ip addr add" command to add an address/prefix to the interface - this supports IPv6, and allows adding multiple addresses to the interface. Although it isn't currently used in the code, we also add a brDelInetAddress for completeness' sake. Also, while we're modifying bridge.c, we change brSetForwardDelay and brSetEnableSTP to use the new virCommand API rather than the deprecated virRun, and also log an error message in bridge_driver.c if either of those fail (previously the failure would be completely silent).
-
由 Laine Stump 提交于
IPv6 will use prefix exclusively, and IPv4 will also optionally be able to use it, and the iptables functions really need a prefix anyway, so use the new virNetworkDefPrefix() function to send prefixes into iptables functions instead of netmasks. Also, in a couple places where a netmask is actually needed, use the new private API function for it rather than getting it directly. This will allow for cases where no netmask or prefix is specified (it returns the default for the current class of network.)
-
由 Laine Stump 提交于
virSocketPrefixToNetmask: Given a 'prefix', which is the number of 1 bits in a netmask, fill in a virSocketAddr object with a netmask as an IP address (IPv6 or IPv4). virSocketAddrMask: Mask off the host bits in one virSocketAddr according to the netmask in another virSocketAddr. virSocketAddrMaskByPrefix, Mask off the host bits in a virSocketAddr according to a prefix (number of 1 bits in netmask). VIR_SOCKET_FAMILY: return the family of a virSocketAddr
-
- 23 12月, 2010 1 次提交
-
-
由 Jim Fehlig 提交于
I began noticing a race when reserving VNC ports as described here https://www.redhat.com/archives/libvir-list/2010-November/msg00379.html Turns out that we were not initializing the size field of bitmap struct when allocating the bitmap. This subsequently caused virBitmapSetBit() to fail since bitmap->size is 0, hence we never actually reserved the port.
-
- 22 12月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* src/util/command.c (virCommandRun): Don't capture output on daemons. * tests/commandtest.c (test18): Expose the bug. Reported by Laine Stump.
-