[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, master, updated. debian/1.0.5-2

Guido Günther agx at sigxcpu.org
Fri May 3 14:45:32 UTC 2013


The following commit has been merged in the master branch:
commit 515485024729e0f7cb43a0719d6d14fcbd8f3586
Author: Guido Günther <agx at sigxcpu.org>
Date:   Fri May 3 10:42:19 2013 +0200

    Make detect_scsi_host_caps a function on all architectures
    
    Another kFreeBSD build fix

diff --git a/debian/patches/Make-detect_scsi_host_caps-a-function-on-all-archite.patch b/debian/patches/Make-detect_scsi_host_caps-a-function-on-all-archite.patch
new file mode 100644
index 0000000..38173f3
--- /dev/null
+++ b/debian/patches/Make-detect_scsi_host_caps-a-function-on-all-archite.patch
@@ -0,0 +1,61 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Fri, 3 May 2013 08:03:26 +0200
+Subject: Make detect_scsi_host_caps a function on all architectures
+
+In the non linux case some callers like gather_scsi_host_caps needed the
+return code of -1 while others like update_caps needed an emtpy
+statement (to avoid a "statement without effect" warning). This is much
+simpler solved by using a function instead of a define.
+---
+ src/node_device/node_device_driver.h      |   11 +----------
+ src/node_device/node_device_linux_sysfs.c |   10 +++++++++-
+ 2 files changed, 10 insertions(+), 11 deletions(-)
+
+diff --git a/src/node_device/node_device_driver.h b/src/node_device/node_device_driver.h
+index b6c6f18..9e97b7d 100644
+--- a/src/node_device/node_device_driver.h
++++ b/src/node_device/node_device_driver.h
+@@ -51,16 +51,7 @@ void nodeDeviceUnlock(virNodeDeviceDriverStatePtr driver);
+ 
+ int nodedevRegister(void);
+ 
+-# ifdef __linux__
+-
+-#  define detect_scsi_host_caps(d) detect_scsi_host_caps_linux(d)
+-int detect_scsi_host_caps_linux(union _virNodeDevCapData *d);
+-
+-# else  /* __linux__ */
+-
+-#  define detect_scsi_host_caps(d)                      (-1)
+-
+-# endif /* __linux__ */
++int detect_scsi_host_caps(union _virNodeDevCapData *d);
+ 
+ int nodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags);
+ int nodeListDevices(virConnectPtr conn, const char *cap, char **const names,
+diff --git a/src/node_device/node_device_linux_sysfs.c b/src/node_device/node_device_linux_sysfs.c
+index fd91430..0c84619 100644
+--- a/src/node_device/node_device_linux_sysfs.c
++++ b/src/node_device/node_device_linux_sysfs.c
+@@ -38,7 +38,7 @@
+ #ifdef __linux__
+ 
+ int
+-detect_scsi_host_caps_linux(union _virNodeDevCapData *d)
++detect_scsi_host_caps(union _virNodeDevCapData *d)
+ {
+     char *max_vports = NULL;
+     char *vports = NULL;
+@@ -127,4 +127,12 @@ cleanup:
+     return ret;
+ }
+ 
++#else
++
++int
++detect_scsi_host_caps(union _virNodeDevCapData *d ATTRIBUTE_UNUSED)
++{
++    return -1;
++}
++
+ #endif /* __linux__ */
diff --git a/debian/patches/series b/debian/patches/series
index 42e7b89..a032d07 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,3 +14,4 @@ virthreadpthread-don-t-try-to-cast-pthread_t-to-void.patch
 Add-sanitytest.py.patch
 virInitctlRequest-Don-t-hardcode-384-bytes-size.patch
 Fixup-rpcgen-code-on-kFreeBSD-too.patch
+Make-detect_scsi_host_caps-a-function-on-all-archite.patch

-- 
Libvirt Debian packaging



More information about the Pkg-libvirt-commits mailing list