SHA256
1
0
forked from pool/libvirt

Accepting request 282079 from home:cbosdonnat:branches:Virtualization

- Fixed patches to pass make syntax-check

OBS-URL: https://build.opensuse.org/request/show/282079
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=435
This commit is contained in:
Cédric Bosdonnat 2015-01-20 13:32:02 +00:00 committed by Git OBS Bridge
parent 9ae36308d4
commit 5dda10253d
4 changed files with 25 additions and 21 deletions

View File

@ -84,16 +84,16 @@ Index: libvirt-1.2.10/tools/libvirt-guests.sh.in
+ i=1 + i=1
+ rets=10 + rets=10
+ run_virsh $uri list > /dev/null 2>&1 + run_virsh $uri list > /dev/null 2>&1
+ while [ $? -ne 0 -a $i -lt $rets ]; do + while test $? -ne 0 && test $i -lt $rets; do
+ sleep 1 + sleep 1
+ echo -n . + echo -n .
+ i=$(($i + 1)) + i=$(($i + 1))
+ run_virsh $uri list > /dev/null 2>&1 + run_virsh $uri list > /dev/null 2>&1
+ done + done
+ if [ $i -eq $rets ]; then + if [ $i -eq $rets ]; then
+ eval_gettext "libvirt-guests unable to connect to URI: $uri" + eval_gettext "libvirt-guests unable to connect to URI: $uri"
+ echo + echo
+ return 1 + return 1
+ fi + fi
+ return 0 + return 0
+} +}
@ -123,12 +123,12 @@ Index: libvirt-1.2.10/tools/libvirt-guests.sh.in
test_connect "$uri" || continue test_connect "$uri" || continue
+ await_daemon_up $uri + await_daemon_up $uri
+ if [ $? -ne 0 ]; then + if [ $? -ne 0 ]; then
+ eval_gettext "Ignoring guests on $uri URI, can't connect" + eval_gettext "Ignoring guests on $uri URI, can't connect"
+ echo + echo
+ continue + continue
+ fi + fi
+ +
eval_gettext "Resuming guests on \$uri URI..."; echo eval_gettext "Resuming guests on \$uri URI..."; echo
for guest in $list; do for guest in $list; do

View File

@ -45,7 +45,7 @@ Index: libvirt-1.2.11/src/Makefile.am
+if WITH_NETCONTROL +if WITH_NETCONTROL
+INTERFACE_DRIVER_SOURCES += \ +INTERFACE_DRIVER_SOURCES += \
+ interface/interface_backend_netcf.c + interface/interface_backend_netcf.c
+endif +endif WITH_NETCONTROL
if WITH_UDEV if WITH_UDEV
INTERFACE_DRIVER_SOURCES += \ INTERFACE_DRIVER_SOURCES += \
interface/interface_backend_udev.c interface/interface_backend_udev.c
@ -112,7 +112,7 @@ Index: libvirt-1.2.11/src/interface/interface_backend_netcf.c
+{ +{
+ int vp; + int vp;
+ +
+ switch(priority) { + switch (priority) {
+ case NC_LOG_FATAL: + case NC_LOG_FATAL:
+ case NC_LOG_ERROR: + case NC_LOG_ERROR:
+ vp = VIR_LOG_ERROR; + vp = VIR_LOG_ERROR;

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jan 20 13:29:02 UTC 2015 - cbosdonnat@suse.com
- Fixed patches to pass make syntax-check
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 20 01:46:52 UTC 2015 - mlatimer@suse.com Tue Jan 20 01:46:52 UTC 2015 - mlatimer@suse.com

View File

@ -42,7 +42,7 @@ Index: libvirt-1.2.10/src/xen/xend_internal.c
- xenUnifiedPrivatePtr priv = conn->privateData; - xenUnifiedPrivatePtr priv = conn->privateData;
- char *xref; - char *xref;
- char *tmp; - char *tmp;
+ unsigned int i; + size_t i;
const char *driver = virDomainDiskGetDriver(dev->data.disk); const char *driver = virDomainDiskGetDriver(dev->data.disk);
if (dev->type == VIR_DOMAIN_DEVICE_DISK) { if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
@ -113,7 +113,7 @@ Index: libvirt-1.2.10/src/xen/xend_internal.c
} else if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV && } else if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV &&
dev->data.hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && dev->data.hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
dev->data.hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) { dev->data.hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) {
@@ -3388,17 +3392,44 @@ virDomainXMLDevID(virConnectPtr conn, @@ -3388,17 +3392,43 @@ virDomainXMLDevID(virConnectPtr conn,
strcpy(class, "pci"); strcpy(class, "pci");
@ -124,7 +124,7 @@ Index: libvirt-1.2.10/src/xen/xend_internal.c
- if (xref == NULL) - if (xref == NULL)
- return -1; - return -1;
+ /* For PCI devices, the device BFD can be used directly. */ + /* For PCI devices, the device BFD can be used directly. */
+ for (i = 0 ; i < def->nhostdevs ; i++) { + for (i = 0; i < def->nhostdevs; i++) {
+ char *dst_bdf; + char *dst_bdf;
+ virDomainHostdevDefPtr hostdev = def->hostdevs[i]; + virDomainHostdevDefPtr hostdev = def->hostdevs[i];
+ +
@ -153,8 +153,7 @@ Index: libvirt-1.2.10/src/xen/xend_internal.c
+ VIR_FREE(dst_bdf); + VIR_FREE(dst_bdf);
+ VIR_FREE(bdf); + VIR_FREE(bdf);
+ return -1; + return -1;
+ } + } else {
+ else {
+ VIR_FREE(dst_bdf); + VIR_FREE(dst_bdf);
+ VIR_FREE(bdf); + VIR_FREE(bdf);
+ return 0; + return 0;