- 04 6月, 2015 3 次提交
-
-
由 Ján Tomko 提交于
Also remove the redudant apostrophe from "it's".
-
由 Shivaprasad G Bhat 提交于
Console/channel devices have their pty devices assigned when the emulator is actually started. If time is spent in guest preparation, someone attempts to open the console/channel, the libvirt crashes in virChrdevLockFilePath(). The patch attempts to fix the crash by adding a check before attempting to open. Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
-
由 Lubomir Rintel 提交于
There was a couple of problems with the style fixes applied to the original patch: 1.) virFileReadAllQuiet comparison was incorrectly parenthesized when moved into a condition, causing the len to be set to the result of comparison. This, together with the removed underflow check would underflow the phy buffer. 2.) The logic was broken. Failure to call "ip" would abort the function, thus the "iw" branch would never be reached. This aims to fix the issues and work around possible style complains :) Signed-off-by: NLubomir Rintel <lkundrak@v3.sk>
-
- 03 6月, 2015 33 次提交
-
-
由 Peter Krempa 提交于
Refactor the function to return the bitmap instead of an integer and the inner workings so that they make more sense. This patch also fixes possible segfault on old systems that was introduced by commit: commit f1a43a8e Author: Hu Tao <hutao@cn.fujitsu.com> Date: Fri Sep 14 15:46:59 2012 +0800 use virBitmap to store cpu affinity info
-
由 Martin Kletzander 提交于
Since commit 55ace7c4, the sockettest fails without VIR_TEST_DEBUG set. The problem is found by test number 42 (co-incidence?), which tests range '192.168.122.1' - '192.168.122.255' in network '192.168.122.0/24'. That is supposed to fail because the end address is equal to the broadcast address. When comparing these two in 'virSocketAddrEqual(end, &broadcast)', there is a check for sin_addr as well as for sin_port. That port, however, is different when we do not enable test debugging. With the testing enabled, the port is 0 (correctly initialized), but without that it has a random number there. And that's because the structure is not initialized anywhere. By zeroing the structure before filling in the info, we make sure we return only the address and not any information that was not requested. And the test work once again. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Jiri Denemark 提交于
When watching a job (save, managedsave, dump, migrate) virsh spawns a thread to call the appropriate API and waits for the result while watching for interruption signals (SIGINT, Ctrl-C on the terminal). Whenever such signal is caught, virsh calls virDomainAbortJob, stops waiting for the job, and returns the result of virDomainAbortJob. This is wrong because the job might have finished in the meantime or it might have been cancelled by someone else and virsh would just report the failure to abort the job. However, we are not interested in the virDomainAbortJob's result at all, we need to keep waiting for the main job to finish and report its result instead. https://bugzilla.redhat.com/show_bug.cgi?id=1131755Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Peter Krempa 提交于
Since the monitor code now supports ullongs when setting balloon size, drop the legacy code with overflow checking. Additionally the comment mentioning that the job is treated as a sync job does not make sense any more since the monitor is entered asynchronously.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Document the top level function rather than both bottom level ones. It makes looking the docs up quicker.
-
由 Peter Krempa 提交于
Add a macro that will allow to simplify overflow checks and make them more universal in case data types change.
-
由 Peter Krempa 提交于
Reuse the approach in qemuDomainGetVcpuPinInfo.
-
由 Peter Krempa 提交于
Libxl's vcpu pinning would work only if the vcpu array was ordered and was not sparse. Remove the condition and iterate the pinning array properly.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Get rid of the unnecessary allocation and copying of the bitmap and clean up some unnecesary temporary variables.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Reuse the function so that we can get rid of a lot of temporary allocations.
-
由 Peter Krempa 提交于
Since some functions can be optimized by reusing the buffers that they already have instead of allocating and copying new ones, lets split virBitmapToData to two functions where one only converts the data and the second one is a wrapper that allocates the buffer if necessary.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Store the emulator pinning cpu mask as a pure virBitmap rather than the virDomainPinDef since it stores only the bitmap and refactor qemuDomainPinEmulator to do the same operations in a much saner way. As a side effect virDomainEmulatorPinAdd and virDomainEmulatorPinDel can be removed since they don't add any value.
-
由 Peter Krempa 提交于
In case when <vcpu ... cpuset=""> is not specified, the vcpupin array is not guaranteed to be allocated to def->vcpus. This would cause a crash for TCG since it does not report thread IDs for vCPUs.
-
由 Maxim Nestratov 提交于
We remember driver name in a new field 'drivername' within private parallels connection structure. When a new domain is defined we use this name to set corresponding virtType. We set VIR_DOMAIN_VIRT_VZ for 'vz' driver and VIR_DOMAIN_VIRT_PARALLELS for 'Parallels'. Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
vz:///system由 Maxim Nestratov 提交于
Though parallels:///system is still accepted we will encourage users to use vz:///system instead. Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
由 Maxim Nestratov 提交于
We need to do this because we have just added a vz driver. Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
由 Maxim Nestratov 提交于
We add this connection driver just as an exact copy with different name to keep backward compatibility. Vz stands for Virtuozzo, which is a new name of Parallels Cloud Server. Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
由 Maxim Nestratov 提交于
If 'parallels:///system' uri is specified then connection is made to 'Parallels' driver and domain type will be VIR_DOMAIN_VIRT_PARALLELS. In case of 'vz:///system' connection is established to 'vz' driver and domain type will be VIR_DOMAIN_VIRT_VZ. Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
由 Maxim Nestratov 提交于
Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
由 Maxim Nestratov 提交于
As soon as we keep backward compatibility we treat this constant as synonym to VIR_DOMAIN_VIRT_PARALLELS. Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
由 Maxim Nestratov 提交于
This new name and constant will be used as substitutions for parallels driver one. Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
由 Luyao Huang 提交于
Commit id '980b265d' neglected to check for a successful status when deciding whether to release the device address for the RNG attach thus the address would be released even though the device was added. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Luyao Huang 提交于
Commit id '862473fa' neglected to return the status from the qemuDomainRemoveRNGDevice call in qemuDomainRemoveDevice causing the function to always fail when receiving an RNG device unplug event. Additionally the domain status/state would not be updated in the processDeviceDeletedEvent path. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Luyao Huang 提交于
If the domain has IOThreads defined, then audit the number started at domain startup time. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Eric Blake 提交于
Newer binutils 'ar' has added an option 'D' for deterministic builds, and at least on rawhide, this option is enabled by default. But it conflicts with the 'u' optimization where the linker only modifies libraries based on file timestamps, but can result in different library ordering based on which files were touched last. Thus, it results in some noisy compilation, for every CCLD line: CCLD libvirt_driver_qemu_impl.la ar: `u' modifier ignored since `D' is the default (see `U') Upstream automake has decided that defaulting ARFLAGS to 'cru' is no longer beneficial, and that switching the default to 'cr' will both silence the noise and not penalize modern build systems. https://lists.gnu.org/archive/html/automake-patches/2015-06/msg00000.html But rather than wait for newer automake to propagate to all systems that already have newer binutils, we might as well just use the new default ourselves, even on older platforms. * configure.ac: Default AR[_]FLAGS to 'cr', not 'cru'. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Laine Stump 提交于
There are now many more reasons that virSocketAddrGetRange() could fail, so it is much more informative to report the error there instead of in the caller. (one of the two callers was previously assuming success, which is almost surely safe based on the parsing that has already happened to the config by that time, but it still is nicer to account for an error "just in case") Part of fix for: https://bugzilla.redhat.com/show_bug.cgi?id=985653
-
由 Laine Stump 提交于
This loop had automatic variable definitions mixed with code. This patch moves the definitions to the top of the function and puts cleanup for them at the bottom. No functional change. Part of fix for: https://bugzilla.redhat.com/show_bug.cgi?id=985653
-
由 Laine Stump 提交于
virSocketAddrGetRange() has been updated to take the network address and prefix, and now checks that both the start and end of the range are within that network, thus validating that the entire range of addresses is in the network. For IPv4, it also checks that ranges to not start with the "network address" of the subnet, nor end with the broadcast address of the subnet (this check doesn't apply to IPv6, since IPv6 doesn't have a broadcast or network address) Negative tests have been added to the network update and socket tests to verify that bad ranges properly generate an error. This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=985653
-
由 Laine Stump 提交于
This was revealed when I made a cut-paste mistake in an upgrade to virSocketAddrGetRange(), leading to failure to check for the end address being outside of the defined network, but a negative test case that should have caught the error instead returned success. The problem was that testRange in sockettest.c was written so that when it expected a failure, even an "unexpected success" would be considered as an "expected failure" because of the way the check in testRange was done. testRange had this: if (gotsize < 0 || gotsize != size) { return pass ? -1 : 0; } else { return pass ? 0 : -1; } but all the tests that expected a failure give "-1" as the expected size. So in a case where we expect a failure, we would have pass == false and size == -1. If virSocketAddrGetRange() was incorrectly *successful* (returned some positive number), then "gotsize != size" would be, e.g. "276 != -1", so we would take the if clause and, since pass == false, we would return 0 (success i.e. expected failure). The solution is that in the case where we expect failure, we should just ignore size - virSocketAddrGetRange() must return -1 in order for us to report "expected failure == success". Part of fix for: https://bugzilla.redhat.com/show_bug.cgi?id=985653
-
- 02 6月, 2015 4 次提交
-
-
由 Ján Tomko 提交于
Use a for loop instead of while. Do not opencode c_isxdigit and virHexToBin.
-
由 Ján Tomko 提交于
Use virFileReadAll which reports an error when the file is larger than the specified maximum. https://bugzilla.redhat.com/show_bug.cgi?id=1207849
-
由 Andrea Bolognani 提交于
-
由 Andrea Bolognani 提交于
This will allow us to use vshError() to report errors from inside vshCommandOpt*(), instead of replicating the same logic and error messages all over the place. We also have more context inside the vshCommandOpt*() functions, for example the actual value used on the command line, which means we can produce more detailed error messages. vshCommandOptBool() is the exception here, because it's explicitly designed not to report any error.
-