- 16 4月, 2015 8 次提交
-
-
由 Michael Chapman 提交于
ts.tv_nsec was off by a factor of 1000, making timeouts less than a second in the future often expiring immediately. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Peter Krempa 提交于
Among all the monitor APIs some where checking if mon is NULL and some were not. Since it's possible to have mon equal to NULL in case a second call is attempted once entered the monitor. This requires that every single API checks for the monitor. This patch adds a macro that helps checking the state of the monitor and either refactors existing checking code to use the macro or adds it in case it was missing.
-
由 Peter Krempa 提交于
Rather than erroring out make the best attempt to retrieve other data if disks are inaccessible or missing. The failure will still be logged though. Since the bulk stats API is called on multiple domains an error like this makes the API unusable. This regression was introduced by commit 596a1371 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1209394
-
由 Michal Privoznik 提交于
The comment is describing arguments passed to the function. However, there's no @ifmac argument. In 955af4d4 it was replaced with @ifmac_ptr. Unfortunately, the comment wasn't updated. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
These cannot be represented in XML. We have been stripping them, but only if the string had characters that needed escaping: <>"'& Extend the strcspn check to include control codes, and strip them even if we don't do any escaping. https://bugzilla.redhat.com/show_bug.cgi?id=1184131 https://bugzilla.redhat.com/show_bug.cgi?id=1066564
-
由 Ján Tomko 提交于
To prevent generating invalid XML. https://bugzilla.redhat.com/show_bug.cgi?id=1066564
-
由 Ján Tomko 提交于
Including them in the XML makes them unparsable. https://bugzilla.redhat.com/show_bug.cgi?id=1184131
-
由 Ján Tomko 提交于
Add virStringHasControlChars that checks if the string has any control characters other than \t\r\n, and virStringStripControlChars that removes them in-place.
-
- 15 4月, 2015 27 次提交
-
-
由 Ján Tomko 提交于
Only for devices that have an alias.
-
由 Ján Tomko 提交于
The counterpart to VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED. https://bugzilla.redhat.com/show_bug.cgi?id=1206114
-
由 Michal Privoznik 提交于
Throughout the code, we have several places need to construct a path somewhere in /sys/class/net/... They are not consistent and nearly each code piece invents its own way how to do it. So unify this by: 1) use virNetDevSysfsFile() wherever possible 2) At least use common macro SYSFS_NET_DIR declared in virnetdev.h at the rest of places which can't go with 1) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
All the called functions already report an error.
-
由 Michal Privoznik 提交于
If a virAsprintf() within the function fails, we call VIR_FREE() over @rundir variable and jump onto cleanup label, where it is freed again. It doesn't hurt, but not make much sense too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Commit f6563bc3 introduced HMP impl of the function (so that a different uglier function could be removed). Before the HMP code is called there's a leftover check that the monitor is JSON which inhibits the code from working.
-
由 Peter Krempa 提交于
Add the attribute and remove the check.
-
由 Peter Krempa 提交于
Quite a lot places set the 'ret' variable just once right before returning it's value. Remove such usage.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Fix line spacing between functions, ensure that function return type is on a separate line and reflow arguments for VIR_DEBUG statements.
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1200149 Even though we have a mutex mechanism so that two clients don't spawn two daemons, it's not strong enough. It can happen that while one client is spawning the daemon, the other one fails to connect. Basically two possible errors can happen: error: Failed to connect socket to '/home/mprivozn/.cache/libvirt/libvirt-sock': Connection refused or: error: Failed to connect socket to '/home/mprivozn/.cache/libvirt/libvirt-sock': No such file or directory The problem in both cases is, the daemon is only starting up, while we are trying to connect (and fail). We should postpone the connecting phase until the daemon is started (by the other thread that is spawning it). In order to do that, create a file lock 'libvirt-lock' in the directory where session daemon would create its socket. So even when called from multiple processes, spawning a daemon will serialize on the file lock. So only the first to come will spawn the daemon. Tested-by: NRichard W. M. Jones <rjones@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Martin Kletzander 提交于
Two non-static functions in virjson.c were missing their export info in libvirt_private.syms, so they couldn't be used anywhere it the code (and that's about to get changed). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
It already had a virMutex inside, so this is just a cleanup. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Luckily we are allocating structs as clean memory and PTHREAD_MUTEX_INITIALIZER is "{ 0 }", so nothing happened, but it should still be created as lockable object. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 John Ferlan 提交于
Check proposed pool definitions to ensure they aren't trying to use the same devices as currently defined definitions - disallow the duplicate
-
由 John Ferlan 提交于
Check the proposed pool source host XML definition against existing gluster pools to ensure the incoming definition doesn't use the same source dir and soure host XML definition as an existing pool.
-
由 John Ferlan 提交于
Check the proposed pool source host XML definition against existing sheepdog pools to ensure the incoming definition doesn't use the same source host XML definition as an existing pool.
-
由 John Ferlan 提交于
So that we can cover all the cases.
-
由 John Ferlan 提交于
Rather than have duplicate code doing the same check, have the netfs matching processing code use the new virStoragePoolSourceMatchSingleHost. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In virStoragePoolSourceMatchSingleHost, add a comparison for port number being different prior to checking the 'name' field.
-
由 John Ferlan 提交于
Split out the nhost == 1 and hosts[0].name logic into a separate routine Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Create a separate iSCSI Source matching subroutine. Makes the calling code a bit cleaner as well as sets up for future patches which need to do better source hosts[0].name processing/checking. As part of the effort the logic will be inverted from a multi-level if statement to a series of single level checks for better readability and further separation Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
When acquiring resource via sanlock fails, we would report it as VIR_ERR_INTERNAL_ERROR, which is not very friendly to applications using libvirt. Moreover, the lockd driver would report the same failure as VIR_ERR_RESOURCE_BUSY, which looks better. Unfortunately, in sanlock driver we don't really know if acquiring the resource failed because it was already locked or there was another reason behind. But the end result is the same and I think using VIR_ERR_RESOURCE_BUSY reason for all acquire failures is still better than what we have now. https://bugzilla.redhat.com/show_bug.cgi?id=1165119Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Eric Blake 提交于
Commit 49ed6cff is broken on mingw and other non-linux platforms: CCLD libvirt.la Cannot export virNetDevSysfsFile: symbol not defined collect2: error: ld returned 1 exit status * src/util/virnetdev.c: Provide virNetDevSysfsFile fallback. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Found by ./autobuild.sh during a mingw cross-compile: Commit 8a96e87e was not innocuous - glibc happens to leak the definition of time() through other headers, so that even without <sys/select.h>, virrandom.c compiled just fine. But on mingw, we were not so lucky; <sys/select.h> was important for its side effect of dragging in <time.h>, and we now have nothing providing the declaration of time(): ../../src/util/virrandom.c: In function 'virRandomOnceInit': ../../src/util/virrandom.c:65:5: error: implicit declaration of function 'time' [-Werror=implicit-function-declaration] unsigned int seed = time(NULL) ^ getpid(); ^ ../../src/util/virrandom.c:65:5: error: nested extern declaration of 'time' [-Werror=nested-externs] Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Michal Privoznik 提交于
This is yet another test for check of basic functionality of our NIC state handling code. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 14 4月, 2015 5 次提交
-
-
由 John Ferlan 提交于
Forthcoming syntax check rule will disallow usage of 'int index', so change it for nwfilter
-
由 John Ferlan 提交于
Forthcoming syntax check rule will disallow usage of 'int index', so change it for snapshot
-
由 John Ferlan 提交于
Impending syntax checker will disallow 'int index', so change it here.
-
由 John Ferlan 提交于
Changing the prototype to not have "int *index" since we'll soon be disallowing index as a name. Curiously the original commit (a4504ac1) for the function used 'int idx' in the function - so they didn't match. Now they do.
-
由 Ján Tomko 提交于
Reported by John Ferlan.
-