- 04 5月, 2011 13 次提交
-
-
由 Eric Blake 提交于
Clang warned about a dead assignment. In the process, I noticed that we are only using the function for a bool value. I audited all other callers in qemu_{migration,cgroup,driver,hotplug), and all were making the call in a bool context. Also, do bounds checking on the argument. * src/qemu/qemu_cgroup.c (qemuSetupCgroup): Delete dead assignment. (qemuCgroupControllerActive): Change return type to bool. * src/qemu/qemu_cgroup.h (qemuCgroupControllerActive): Likewise.
-
由 Eric Blake 提交于
Clang complained about this, and it was easy enough to fix. * src/util/util.c (virFileOpenAs): Drop dead assignment.
-
由 Eric Blake 提交于
Clang noticed a dead assignment, which turned out to be the use of the wrong variable. rc starts life as -1, and is only ever assigned to 0 just before a successful cleanup. * src/lxc/lxc_driver.c (lxcSetupInterfaces): Don't call virReportSystemError(-1).
-
由 Eric Blake 提交于
Detected by gcc: libxl/libxl_driver.c: In function 'libxlDomainDestroy': libxl/libxl_drier.c:1351:30: error: variable 'priv' set but not used [-Werror=unused-but-set-variable] * src/libxl/libxl_driver.c (libxlDomainDestroy): Delete unused variable.
-
由 Eric Blake 提交于
Detected by clang. * src/qemu/qemu_migration.c (qemuMigrationToFile): Nothing later uses is_reg.
-
由 Eric Blake 提交于
clang didn't like the last increment to nargs. But why even track nargs ourselves, when virCommand does it for us? * src/storage/storage_backend_iscsi.c (virStorageBackendISCSIConnection): Switch to virCommand to avoid a dead-store warning on nargs.
-
由 Eric Blake 提交于
Clang detected a dead store to rc. It turns out that in fixing this, I also found a FILE* leak. This is a subtle change in behavior, although unlikely to hit. The pidfile is a kernel file, so we've probably got more serious problems under foot if we fail to parse one. However, the previous behavior was that even if one pid file failed to parse, we tried others, whereas now we give up on the first failure. Either way, though, the function returns -1, so the caller will know that something is going wrong, and that not all pids were necessarily reaped. Besides, there were other instances already in the code where failure in the inner loop aborted the outer loop. * src/util/cgroup.c (virCgroupKillInternal): Abort rather than resuming loop on fscanf failure, and cleanup file on error.
-
由 Eric Blake 提交于
Clang 2.8 wasn't quite able to follow that persistentDef was assigned earlier if (flags & VIR_DOMAIN_MEM_CONFIG) is true. Silence this false positive, to make clang analysis easier to use. * src/qemu/qemu_driver.c (qemudDomainSetMemoryFlags): Add an annotation to silence clang's claim of a NULL dereference.
-
由 Eric Blake 提交于
Clang detected that vol-download will call unlink(NULL) if there is a parse error during option parsing. Also, mingw doesn't like unlinking an open file. * tools/virsh.c (cmdVolDownload): Only unlink file if created.
-
由 Eric Blake 提交于
Clang detected a null-pointer dereference regression, introduced in commit 4e8969eb. Without this patch, a device with unbind_from_stub set to false would eventually try to call virFileExists on uncomputed drvdir. * src/util/pci.c (pciUnbindDeviceFromStub): Ensure drvdir is set before use.
-
由 Eric Blake 提交于
This code has had problems historically. As originally written, in commit 6bcf2501 (Jun 08), it could call unlink on a random string, nuking an unrelated file. Then commit 182a80b9 (Sep 09), the code was rewritten to allocate tmp, with both a use-after-free bug and a chance to call unlink(NULL). Commit e206946d (Mar 11) fixed the use-after-free, but not the NULL dereference. Thanks to clang for catching this! * src/qemu/qemu_driver.c (qemudDomainMemoryPeek): Don't call unlink on NULL.
-
由 Eric Blake 提交于
Unlikely to hit in real life, but clang noticed it. * tests/commandtest.c (checkoutput, test4, test18): Avoid unlink(NULL) on OOM.
-
由 Eric Blake 提交于
This reverts commit 0e7f7f85. From the mailing list: > So, AFAICT, this patch means we will never reconnect to any LXC > VMs now. > > The correct solution, is to refactor LXC driver startup to work > the same way as the QEMU driver startup. > > - Load all the live state XML files (to pick up running VMs) > - Reconnect to all VMs > - Load all the persistent config XML files (to pick up any additional > inactive guets) But that solution is invasive enough to be post-0.9.1.
-
- 03 5月, 2011 4 次提交
-
-
由 Eric Blake 提交于
* tests/.valgrind.supp: Consolidate bash suppressions. Ignore more libnl issues.
-
由 Michal Privoznik 提交于
The patch which moved libpciaccess initialization to one place caused regression - we were not able to run on system with no PCI bus, like s390(x).
-
由 Osier Yang 提交于
Otherwise if there are inactive lxc domains, lxcStartup will try to reconnect to sockets of these domains, which results in errors in libvirtd log.
-
由 Eric Blake 提交于
../../tests/xmconfigtest.c: In function 'testCompareParseXML': ../../tests/xmconfigtest.c:49:19: error: 'conn' may be used uninitialized in this function [-Wuninitialized] * tests/xmconfigtest.c (testCompareParseXML): Initialize variable.
-
- 02 5月, 2011 2 次提交
-
-
由 Christophe Fergeau 提交于
This commit fixes qemu/qemu_driver.c: In function 'qemuDomainModifyDeviceFlags': qemu/qemu_driver.c:4041:8: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] qemu/qemu_driver.c:4013:9: note: 'ret' was declared here The variable is set to -1 so that the error paths are taken when the code to set it didn't get a chance to run. Without initializing it, we could return some an undefined value from this function. While I was at it, I made a trivial whitespace change in the same function to improve readability.
-
由 Gerhard Stenzel 提交于
For IEEE 802.1Qbg, it is necessary to use a VLAN interface. vepa itself does not require a VLAN interface. Signed-off-by: Gerhard Stenzel <stenzel at de.ibm.com>
-
- 01 5月, 2011 3 次提交
-
-
由 Matthias Bolte 提交于
Make virtTestLoadFile allocate the buffer to read the file into. Fix logic error in virtTestLoadFile, stop reading on the first empty line. Use virFileReadLimFD in virtTestCaptureProgramOutput to avoid manual buffer handling.
-
由 Matthias Bolte 提交于
-
由 Supriya Kannery 提交于
Commit 36deff04 introduced a regression due to which virsh is not able to log to a file - msg_buf was changed from an array to a pointer without corresponding change to usage of "sizeof()". Fix regression in virsh logging Signed-off-by: NSupriya Kannery <supriyak@in.ibm.com>
-
- 30 4月, 2011 7 次提交
-
-
由 Matthias Bolte 提交于
Call shutdown functions for all subcomponents in nwfilterDriverShutdown. Make sure that this shutdown functions can safely be called multiple times and independent from the actual subcomponents state.
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
Commit e0d014f2 made binary potentially allocated on the heap. It was freed in the parent in the error path, but not in the success path that doesn't goto the cleanup label. Found by 'make -C tests valgrind'.
-
由 Eric Blake 提交于
Commit 1671d1dc introduced a memory leak in virHashFree, and wholesale table corruption in virHashRemoveSet (elements not requested to be freed are lost). * src/util/hash.c (virHashFree): Free bucket array. (virHashRemoveSet): Don't lose elements. * tests/hashtest.c (testHashCheckForEachCount): New method. (testHashCheckCount): Expose the bug.
-
由 Cole Robinson 提交于
Tried to dredge through old changelogs and commits to come up with it, so may not be completely accurate. v2: Drop ambiguous 'containers' Use same mail archive for all links
-
由 Eric Blake 提交于
* bootstrap.conf (gnulib_modules): Add getcwd-lgpl. * tests/commandtest.c (checkoutput): Drop unused cwd. * tests/commandhelper.c (main): Let getcwd malloc. * tests/testutils.c (virTestMain): Likewise. * tools/virsh.c (cmdPwd): Likewise. (virshCmds): Expose cmdPwd and cmdCd on mingw.
-
由 Eric Blake 提交于
A few of the tests were missing basic sanity checks, while most of them were doing copy-and-paste initialization (in fact, some of them pasted the argc > 1 check more than once!). It's much nicer to do things in one common place, and minimizes the size of the next patch that fixes getcwd usage. * tests/testutils.h (EXIT_AM_HARDFAIL): New define. (progname, abs_srcdir): Define for all tests. (VIRT_TEST_MAIN): Change callback signature. * tests/testutils.c (virtTestMain): Do more common init. * tests/commandtest.c (mymain): Simplify. * tests/cputest.c (mymain): Likewise. * tests/esxutilstest.c (mymain): Likewise. * tests/eventtest.c (mymain): Likewise. * tests/hashtest.c (mymain): Likewise. * tests/networkxml2xmltest.c (mymain): Likewise. * tests/nodedevxml2xmltest.c (myname): Likewise. * tests/nodeinfotest.c (mymain): Likewise. * tests/nwfilterxml2xmltest.c (mymain): Likewise. * tests/qemuargv2xmltest.c (mymain): Likewise. * tests/qemuhelptest.c (mymain): Likewise. * tests/qemuxml2argvtest.c (mymain): Likewise. * tests/qemuxml2xmltest.c (mymain): Likewise. * tests/qparamtest.c (mymain): Likewise. * tests/sexpr2xmltest.c (mymain): Likewise. * tests/sockettest.c (mymain): Likewise. * tests/statstest.c (mymain): Likewise. * tests/storagepoolxml2xmltest.c (mymain): Likewise. * tests/storagevolxml2xmltest.c (mymain): Likewise. * tests/virbuftest.c (mymain): Likewise. * tests/virshtest.c (mymain): Likewise. * tests/vmx2xmltest.c (mymain): Likewise. * tests/xencapstest.c (mymain): Likewise. * tests/xmconfigtest.c (mymain): Likewise. * tests/xml2sexprtest.c (mymain): Likewise. * tests/xml2vmxtest.c (mymain): Likewise.
-
- 29 4月, 2011 5 次提交
-
-
由 Eric Blake 提交于
* .gnulib: Update to latest, for getaddrinfo fixes. Reported by Matthias Bolte.
-
由 Eric Blake 提交于
We don't use gnulib's sanitizations for vfprintf, but vshDebug was used with %zu, which means that it would fail on mingw. Thank goodness the compiler indirectly caught this for us :) virsh.c: In function 'vshDebug': virsh.c:12105:5: warning: function might be possible candidate for 'ms_printf' format attribute [-Wmissing-format-attribute] since mingw <stdio.h> hasn't yet added gcc attributes to vfprintf. * tools/virsh.c (vshDebug): Avoid vfprintf. (vshPrintExtra): Use lighter-weight fputs. Reported by Matthias Bolte.
-
由 KAMEZAWA Hiroyuki 提交于
Support update of disks by MODIFY_CONFIG This patch includes changes for qemu's disk to support virDomainUpdateDeviceFlags() with VIR_DOMAIN_DEVICE_MODIFY_CONFIG. This patch adds support for CDROM/foppy disk types. Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> * src/qemu/qemu_driver.c (qemuDomainUpdateDeviceConfig): support cdrom/floppy.
-
由 Jim Fehlig 提交于
V2: Use virAsprintf instead of snprintf/strdup The xend driver will generate a virDomainNetDef ifname if one is not specified in xend sexpr, even if domain is inactive. The result is network interface XML containing 'vif-1.Y' on dev attribute of target element, e.g. <interface type='bridge'> <target dev='vif-1.0'/> ... This patch changes the behavior to only generate the ifname if not specified in xend sexpr *and* domain is not inactive (id != -1).
-
由 Yufang Zhang 提交于
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=664059 Reattaching pci device back to host without destroying guest or detaching device from guest would cause host to crash. This patch adds a check before doing device reattach. If the device is being assigned to guest, libvirt refuses to reattach device to host. The patch only works for Xen, for it just checks xenstore to get pci device information. Signed-off-by: NYufang Zhang <yuzhang@redhat.com>
-
- 28 4月, 2011 6 次提交
-
-
由 Laine Stump 提交于
The lone caller to hostsFileWrite (and the callers for at least 3 levels up the return stack) assume that the return value will be < 0 on failure. However, hostsFileWrite returns 0 on success, and a positive errno on failure. This patch changes hostsFileWrite to return -errno on failure.
-
由 Eric Blake 提交于
* src/esx/esx_driver.c: Fix spelling of 'relative'. * src/util/util.c: Likewise.
-
由 Jiri Denemark 提交于
Currently the build fails if /usr/local/include does not exist since its use is hardcoded in configure.ac
-
由 Jiri Denemark 提交于
Check for audit_encode_nv_string in libaudit so that ancient audit library is ignored rather than trying to compile with libaudit support and failing.
-
由 Osier Yang 提交于
We support to initialize the hooks at daemon reload if there is no hooks script is defined, we should also support initialize the hooks at daemon shutdown if no hooks is defined. To address bz: https://bugzilla.redhat.com/show_bug.cgi?id=688859
-
由 Wen Congyang 提交于
This patch does the following things: 1. The return value of cmdSchedInfoUpdate() can be -1, 0 and 1. So the type of return value should be int not bool.(This function is not a entry of a virsh command, but the name of this function likes cmdXXX) 2. The type of cmdSchedinfo()'s, cmdFreecell()'s, cmdPoolList()'s and cmdVolList()'s return value is bool not int, so change the type of variable ret_val, func_ret and functionReturn. 3. Add a variable functionReturn for cmdMigrate(), cmdAttachInterface(), cmdDetachInterface(), cmdAttachDisk() and cmdDetachDisk() to save the return value. 4. Change the type of variable ret in the function cmdAttachDevice(), cmdDetachDevice(), cmdUpdateDevice(), cmdAttachInterface(), cmdDetachInterface(), cmdAttachDisk() and cmdDetachDisk() to int, as we use it to save the return value of virXXX() and the type of virXXX()'s return value is int not bool. 5. Do some cleanup when virBuff.error is 1. The bug 1-4 were introduced by commit b56fa5bb.
-