package libts-0.0-0
tags 623095 patch
thanks

Hi,

if I read 8613e4c2872a87cc309a42de2c7091744dc54d0e correctly it seems
that it does not modify any parts of the API that tslib actually uses.

Wouldn't it then be safe for tslib to allow both EV_VERSION 0x010001 and
0x010000?

I've attached a tested debdiff against 1.0-8. source package and armel
binaries are available at

http://lindi.iki.fi/lindi/tslib/

diff -Nru tslib-1.0/debian/changelog tslib-1.0/debian/changelog
--- tslib-1.0/debian/changelog  2011-04-05 21:41:48.000000000 +0300
+++ tslib-1.0/debian/changelog  2011-06-07 13:57:20.000000000 +0300
@@ -1,3 +1,15 @@
+tslib (1.0-8lindi1) unstable; urgency=low
+
+  * Add patch allow_EV_VERSION_0 to continue supporting Linux 2.6.36 and
+    older. Previously kernel support depended on the kernel headers that
+    tslib was built against. (Closes: #623095)
+  
+  * Do not refuse to work with old kernels. We can safely work with
+    kernels that use EV_VERSION 0x010000 API since we use no features from
+    0x010001 yet. (Closes: #623095)
+
+ -- Timo Juhani Lindfors <[email protected]>  Tue, 07 Jun 2011 13:22:27 
+0300
+
 tslib (1.0-8) unstable; urgency=low
 
   * Drop .la file as per Policy 10.2 (Closes: #620658)
diff -Nru tslib-1.0/debian/patches/allow_EV_VERSION_0 
tslib-1.0/debian/patches/allow_EV_VERSION_0
--- tslib-1.0/debian/patches/allow_EV_VERSION_0 1970-01-01 02:00:00.000000000 
+0200
+++ tslib-1.0/debian/patches/allow_EV_VERSION_0 2011-06-07 13:57:05.000000000 
+0300
@@ -0,0 +1,22 @@
+Description: Support Linux 2.6.36 and older
+ Linux 2.6.37 bumps EV_VERSION to 0x010001. To continue support for
+ Linux 2.6.36 and older we explicitely allow EV_VERSION 0x010000
+ here. This should not be a problem since tslib does not currently use
+ any of the API that was changed in this bump (upstream commit
+ 8613e4c2872a87cc309a42de2c7091744dc54d0e).
+Author: Timo Juhani Lindfors <[email protected]>
+Last-Update: 2011-06-07
+Forwarded: no
+Bug-Debian: http://bugs.debian.org/623095
+
+--- a/plugins/input-raw.c
++++ b/plugins/input-raw.c
+@@ -60,7 +60,7 @@
+       unsigned long absbit[ABS_MAX / BITS_PER_LONG + 1];
+ 
+       if (! ((ioctl(ts->fd, EVIOCGVERSION, &version) >= 0) &&
+-              (version == EV_VERSION) &&
++              (version == EV_VERSION || version == 0x010000) &&
+               (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit)), bit) >= 0) &&
+               (bit[0] & (1 << EV_ABS)) &&
+               (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) >= 0) 
&&
diff -Nru tslib-1.0/debian/patches/series tslib-1.0/debian/patches/series
--- tslib-1.0/debian/patches/series     2011-04-05 21:38:26.000000000 +0300
+++ tslib-1.0/debian/patches/series     2011-06-07 13:19:36.000000000 +0300
@@ -3,3 +3,4 @@
 32bitBE-support.diff
 ac-init.diff
 glibc2.8.diff
+allow_EV_VERSION_0
-Timo

Reply via email to