- 07 3月, 2011 1 次提交
-
-
由 Daniel Veillard 提交于
* src/util/logging.c: fix virLogDumpAllFD() to avoid snprintf, simplify the code and provide more useful signal descriptions. Also remove an unused variable.
-
- 05 3月, 2011 1 次提交
-
-
由 Phil Petty 提交于
Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 04 3月, 2011 3 次提交
-
-
由 Daniel Veillard 提交于
virLogEmergencyDumpAll() allows to dump the content of the debug buffer from within a signal handler. It saves to all log file or stderr if none is found * src/util/logging.h src/util/logging.c: add the new API and cleanup the old virLogDump code * src/libvirt_private.syms: exports it as a private symbol
-
由 Daniel Veillard 提交于
* src/util/logging.c: the start pointer need to wrap around too
-
由 Daniel Veillard 提交于
Initially only the log actually written out by libvirt were saved on the memory buffer, this patch forces all informations including info and debug to be saved in memory too. This is useful to get full data in case of crash.
-
- 03 3月, 2011 3 次提交
-
-
由 Eric Blake 提交于
In virFileOperation, the parent does a fallback to a non-fork attempt if it detects that the child returned EACCES. However, the child was calling _exit(-EACCES), which does _not_ appear as EACCES in the parent. * src/util/util.c (virFileOperation): Correctly pass EACCES from child to parent.
-
由 Jiri Denemark 提交于
This fixes a possible crash of libvirtd during its startup. When qemu driver reconnects to running domains, it iterates over all domain objects in a hash. When reconnecting to an associated qemu monitor fails and the domain is transient, it's immediately removed from the hash. Despite the fact that it's explicitly forbidden to do so. If libvirtd is lucky enough, virHashForEach will access random memory when the callback finishes and the deamon will crash. Since it's trivial to fix virHashForEach to allow removal of hash entries while iterating through them, I went this way instead of fixing qemuReconnectDomain callback (and possibly others) to avoid deleting the entries.
-
由 Daniel P. Berrange 提交于
Replace the 'Unknown failure' error message with something a little bit more descriptive. * src/util/virterror.c: Improve error message
-
- 28 2月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The kill() function doesn't exist on Win32, so it needs to be checked for at build time & code disabled in cgroups * configure.ac: Check for kill() * src/util/cgroup.c: Stub out virCGroupKill* functions when kill() isn't available
-
- 25 2月, 2011 6 次提交
-
-
由 Daniel P. Berrange 提交于
The virCgroupKill method kills all PIDs found in a cgroup The virCgroupKillRecursively method does this recursively for child cgroups. The virCgroupKillPainfully method does a recursive kill several times in a row until everything has really died
-
由 Daniel P. Berrange 提交于
Relax the restriction that the hash table key must be a string by allowing an arbitrary hash code generator + comparison func to be provided * util/hash.c, util/hash.h: Allow any pointer as a key * internal.h: Include stdbool.h as standard. * conf/domain_conf.c, conf/domain_conf.c, conf/nwfilter_params.c, nwfilter/nwfilter_gentech_driver.c, nwfilter/nwfilter_gentech_driver.h, nwfilter/nwfilter_learnipaddr.c, qemu/qemu_command.c, qemu/qemu_driver.c, qemu/qemu_process.c, uml/uml_driver.c, xen/xm_internal.c: s/char */void */ in hash callbacks
-
由 Daniel P. Berrange 提交于
Since the deallocator is passed into the constructor of a hash table it is not desirable to pass it into each function again. Remove it from all functions, but provide a virHashSteal to allow a item to be removed from a hash table without deleteing it. * src/util/hash.c, src/util/hash.h: Remove deallocator param from all functions. Add virHashSteal * src/libvirt_private.syms: Add virHashSteal * src/conf/domain_conf.c, src/conf/nwfilter_params.c, src/nwfilter/nwfilter_learnipaddr.c, src/qemu/qemu_command.c, src/xen/xm_internal.c: Update for changed hash API
-
由 Philipp Hahn 提交于
Replace wrong "set" by correct "seek" in error message. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Eric Blake 提交于
* src/util/cgroup.c (virCgroupAllowDevicePath) (virCgroupDenyDevicePath): Don't fail with EINVAL for non-devices. * src/qemu/qemu_driver.c (qemudDomainSaveFlag): Update caller. * src/qemu/qemu_cgroup.c (qemuSetupDiskPathAllow) (qemuSetupChardevCgroup, qemuSetupHostUsbDeviceCgroup) (qemuSetupCgroup, qemuTeardownDiskPathDeny): Likewise.
-
由 Eric Blake 提交于
valgrind warns: ==21079== Syscall param rt_sigaction(act->sa_mask) points to uninitialised byte(s) ==21079== at 0x329840F63E: __libc_sigaction (sigaction.c:67) ==21079== by 0x4E5A8E7: __virExec (util.c:661) Regression introduced in commit ab07533e. Technically, sa_mask shouldn't affect operation if sa_flags selects sa_handler, and sa_handler selects SIG_IGN, but better safe than sorry. * src/util/util.c (__virExec): Supply missing sigemptyset.
-
- 24 2月, 2011 3 次提交
-
-
由 Daniel P. Berrange 提交于
Remove the <stdbool.h> header from all source files / headers and just put it into internal.h * src/internal.h: Add <stdbool.h>
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
- 23 2月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virFileAbsPath was not taking into account the '/' directory separator when allocating memory for combining cwd + path. Convert to use virAsprintf to avoid this type of bug completely. * src/util/util.c: Convert virFileAbsPath to use virAsprintf
-
- 22 2月, 2011 3 次提交
-
-
由 Roopa Prabhu 提交于
Current code does an IFF_UP on a 8021Qbh interface immediately after a port profile set. This is ok in most cases except when its the migration prepare stage. During migration we want to postpone IFF_UP'ing the interface on the destination host until the source host has disassociated the interface. This patch moves IFF_UP of the interface to the final stage of migration. The motivation for this change is to postpone any addr registrations on the destination host until the source host has done the addr deregistrations. While at it, for symmetry with associate move ifDown of a 8021Qbh interface to before disassociate
-
由 Markus Groß 提交于
-
由 Markus Groß 提交于
-
- 21 2月, 2011 2 次提交
-
-
由 Eric Blake 提交于
Done mechanically with: $ git grep -l '\bDEBUG0\? *(' | xargs -L1 sed -i 's/\bDEBUG0\? *(/VIR_&/' followed by manual deletion of qemudDebug in daemon/libvirtd.c, along with a single 'make syntax-check' fallout in the same file, and the actual deletion in src/util/logging.h. * src/util/logging.h (DEBUG, DEBUG0): Delete. * daemon/libvirtd.h (qemudDebug): Likewise. * global: Change remaining clients over to VIR_DEBUG counterpart.
-
由 Eric Blake 提交于
Two-argument free functions are uncommon; match the style elsewhere by caching the callback at creation. * src/util/hash.h (virHashCreate, virHashFree): Move deallocator argument to creation. * cfg.mk (useless_free_options): Add virHashFree. * src/util/hash.c (_virHashTable): Track deallocator. (virHashCreate, virHashFree): Update to new signature. * src/conf/domain_conf.c (virDomainObjListDeinit) (virDomainObjListInit, virDomainDiskDefForeachPath) (virDomainSnapshotObjListDeinit, virDomainSnapshotObjListInit): Update callers. * src/conf/nwfilter_params.c (virNWFilterHashTableFree) (virNWFilterHashTableCreate): Likewise. * src/conf/nwfilter_conf.c (virNWFilterTriggerVMFilterRebuild): Likewise. * src/cpu/cpu_generic.c (genericHashFeatures, genericBaseline): Likewise. * src/xen/xm_internal.c (xenXMOpen, xenXMClose): Likewise. * src/nwfilter/nwfilter_learnipaddr.c (virNWFilterLearnInit) (virNWFilterLearnShutdown): Likewise. * src/qemu/qemu_command.c (qemuDomainPCIAddressSetCreate) (qemuDomainPCIAddressSetFree): Likewise. * src/qemu/qemu_process.c (qemuProcessWaitForMonitor): Likewise.
-
- 19 2月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Two regressions: Commit df1011ca broke builds for systems that lack devmapper (non-Linux, as well as Linux with ./autogen.sh --without-libvirtd and without the libraries present). Commit ce6fd650 broke cross-compilation, due to a gnulib bug. * .gnulib: Update to latest, for cross-compilation fix. * src/util/util.c (virIsDevMapperDevice): Provide stub for platforms not using storage driver. * configure.ac (devmapper): Arrange to define HAVE_LIBDEVMAPPER_H. devmapper issue reported by Wen Congyang.
-
- 18 2月, 2011 5 次提交
-
-
由 Christophe Fergeau 提交于
The only difference between these 2 functions is that one errors out when the entry is already present while the other modifies the existing entry. Add an helper function with a boolean argument indicating whether existing entries should be updated or not, and use this helper in both functions.
-
由 Christophe Fergeau 提交于
The code in virHashUpdateEntry and virHashAddEntry is really similar. However, the latter rebalances the hash table when one of its buckets contains too many elements while the former does not. Fix this discrepancy.
-
由 Eric Blake 提交于
* src/util/hash.c (virHashGrow) [DEBUG_GROW]: Use modern logging. Reported by Christophe Fergeau.
-
由 Eric Blake 提交于
Followup to commit 17e19add, and would have prevented the bug independently fixed in commit 76c57a7c. * src/util/logging.c (virLogMessage): Preserve errno, since logging should be as unintrusive as possible.
-
由 Laine Stump 提交于
An upcoming patch has a use for a tap device to be created that doesn't need to be actually put into the "up" state, and keeping it "down" keeps the output of ifconfig from being unnecessarily cluttered (ifconfig won't show down interfaces unless you add "-a"). bridge.[ch]: add "up" as an arg to brAddTap() uml_conf.c, qemu_command.c: add "up" (set to "true") to brAddTap() call.
-
- 17 2月, 2011 1 次提交
-
-
由 Osier Yang 提交于
The name convention of device mapper disk is different, and 'parted' can't be used to delete a device mapper disk partition. e.g. Name Path ----------------------------------------- 3600a0b80005ad1d7000093604cae912fp1 /dev/mapper/3600a0b80005ad1d7000093604cae912fp1 Error: Expecting a partition number. This patch introduces 'dmsetup' to fix it. Changes: - New function "virIsDevMapperDevice" in "src/utils/utils.c" - remove "is_dm_device" in "src/storage/parthelper.c", use "virIsDevMapperDevice" instead. - Requires "device-mapper" for 'with-storage-disk" in "libvirt.spec.in" - Check "dmsetup" in 'configure.ac' for "with-storage-disk" - Changes on "src/Makefile.am" to link against libdevmapper - New entry for "virIsDevMapperDevice" in "src/libvirt_private.syms" Changes from v1 to v3: - s/virIsDeviceMapperDevice/virIsDevMapperDevice/g - replace "virRun" with "virCommand" - sort the list of util functions in "libvirt_private.syms" - ATTRIBUTE_NONNULL(1) for virIsDevMapperDevice declaration. e.g. Name Path ----------------------------------------- 3600a0b80005ad1d7000093604cae912fp1 /dev/mapper/3600a0b80005ad1d7000093604cae912fp1 Vol /dev/mapper/3600a0b80005ad1d7000093604cae912fp1 deleted Name Path -----------------------------------------
-
- 16 2月, 2011 2 次提交
-
-
由 Eric Blake 提交于
* src/util/cgroup.c (virCgroupSetValueStr, virCgroupGetValueStr) (virCgroupRemoveRecursively): VIR_DEBUG can clobber errno. (virCgroupRemove): Use VIR_DEBUG rather than DEBUG.
-
由 Eric Blake 提交于
clang had 5 reports against virCommand; three were false positives (a NULL deref in ProcessIO solved by sa_assert, and two uninitialized memory operations solved by adding an initializer), but two were real. * src/util/command.c (virCommandProcessIO): Fix real bug of possible NULL dereference. Teach clang that buf is never NULL. (virCommandRun): Teach clang that infd is only ever accessed when initialized.
-
- 15 2月, 2011 5 次提交
-
-
由 Daniel P. Berrange 提交于
* src/util/threads-pthread.c: Fix mutex leak
-
由 Matthias Bolte 提交于
This helps identifying which command exited with status != 0.
-
由 Christophe Fergeau 提交于
A couple of allocation were not calling virReportOOMError on allocation errors * src/util/hash.c: add the needed call in virHashCreate and virHashAddOrUpdateEntry
-
由 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'.
-