Re: 2.6.36/2.6.37: broken compatibility with userspace input-utils ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 02, 2011 at 09:31:08AM -0500, Chase Douglas wrote:
> On 01/23/2011 12:03 PM, Mark Lord wrote:
> > As of the 2.6.36 kernel, the userspace commands lsinput and input-kbd
> > no longer work.  And if I grab newer/patched versions of those from the latest
> > Ubuntu 10.10, then those newer/patched versions do not work with kernels
> > *before* 2.6.36.
> 
> I planned on taking another look at this before we release Ubuntu 11.04
> at the end of April. That doesn't prevent someone else from helping out
> :), but I'll make sure the utility is working again if not.
> 

Here you go:

>From dbe48c8044987da6e64036fa3f36d7b2826994d5 Mon Sep 17 00:00:00 2001
From: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
Date: Mon, 24 Jan 2011 22:06:10 -0800
Subject: [PATCH 1/2] Do not require exact version of EVDEV protocol, we can work with
 other versions too.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
---
 input.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/input.c b/input.c
index 73d5df1..08f4046 100644
--- a/input.c
+++ b/input.c
@@ -101,9 +101,11 @@ int device_open(int nr, int verbose)
 		close(fd);
 		return -1;
 	}
-	if (EV_VERSION != version) {
-		fprintf(stderr, "protocol version mismatch (expected %d, got %d)\n",
-			EV_VERSION, version);
+
+#define EVDEV_MIN_VERSION 0x10000
+	if (version < EVDEV_MIN_VERSION) {
+		fprintf(stderr, "protocol version mismatch (need at least %d, got %d)\n",
+			EVDEV_MIN_VERSION, version);
 		close(fd);
 		return -1;
 	}

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux