xserver-xorg-input-evdev: Changes to 'upstream-unstable'
configure.ac | 2 +-
src/evdev.c | 25 +++++++++++++++++--------
2 files changed, 18 insertions(+), 9 deletions(-)
New commits:
commit cf887a2b7cff9eb99c872a9cf5a9382ff6317899
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Apr 30 16:39:15 2009 +1000
evdev 2.2.2
diff --git a/configure.ac b/configure.ac
index 52d892d..3f23d21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-input-evdev],
- 2.2.1,
+ 2.2.2,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-input-evdev)
commit 1cc0651e1b44af505d7177b22c6083eae9b118cc
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Apr 16 13:23:50 2009 +1000
Print read errors as X_NONE to avoid mallocs in the server.
Messages of type X_NONE are just passed down to the log files, everything else
gets the (EE) or (II) prefixed. Since this mallocs, we can't use it in the
signal handler.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 220e2dfb8f6aa08bd5f59e81c6883c057b945721)
diff --git a/src/evdev.c b/src/evdev.c
index a05bd2c..9fc0663 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -577,15 +577,19 @@ EvdevReadInput(InputInfoPtr pInfo)
pEvdev->reopen_timer = TimerSet(pEvdev->reopen_timer, 0, 100, EvdevReopenTimer, pInfo);
}
} else if (errno != EAGAIN)
- xf86Msg(X_ERROR, "%s: Read error: %s\n", pInfo->name,
+ {
+ /* We use X_NONE here because it doesn't alloc */
+ xf86MsgVerb(X_NONE, 0, "%s: Read error: %s\n", pInfo->name,
strerror(errno));
+ }
break;
}
+ /* The kernel promises that we always only read a complete
+ * event, so len != sizeof ev is an error. */
if (len % sizeof(ev[0])) {
- /* The kernel promises that we always only read a complete
- * event, so len != sizeof ev is an error. */
- xf86Msg(X_ERROR, "%s: Read error: %s\n", pInfo->name, strerror(errno));
+ /* We use X_NONE here because it doesn't alloc */
+ xf86MsgVerb(X_NONE, 0, "%s: Read error: %s\n", pInfo->name, strerror(errno));
break;
}
commit 48a747ea8603ece6bd25ba5b1ce92c2eb91a7c01
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Apr 16 12:01:03 2009 +1000
Pre-allocate the reopen timer so we don't allocate during sigio handling.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit ddc126637404cb3d9356b7698779dcd8849f8718)
diff --git a/src/evdev.c b/src/evdev.c
index 3a60e7f..a05bd2c 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -571,8 +571,11 @@ EvdevReadInput(InputInfoPtr pInfo)
xf86RemoveEnabledDevice(pInfo);
close(pInfo->fd);
pInfo->fd = -1;
- pEvdev->reopen_left = pEvdev->reopen_attempts;
- pEvdev->reopen_timer = TimerSet(NULL, 0, 100, EvdevReopenTimer, pInfo);
+ if (pEvdev->reopen_timer)
+ {
+ pEvdev->reopen_left = pEvdev->reopen_attempts;
+ pEvdev->reopen_timer = TimerSet(pEvdev->reopen_timer, 0, 100, EvdevReopenTimer, pInfo);
+ }
} else if (errno != EAGAIN)
xf86Msg(X_ERROR, "%s: Read error: %s\n", pInfo->name,
strerror(errno));
@@ -1226,7 +1229,7 @@ EvdevOn(DeviceIntPtr device)
if (pInfo->fd == -1)
{
pEvdev->reopen_left = pEvdev->reopen_attempts;
- pEvdev->reopen_timer = TimerSet(NULL, 0, 100, EvdevReopenTimer, pInfo);
+ pEvdev->reopen_timer = TimerSet(pEvdev->reopen_timer, 0, 100, EvdevReopenTimer, pInfo);
} else
{
pEvdev->min_maj = EvdevGetMajorMinor(pInfo);
@@ -1237,6 +1240,8 @@ EvdevOn(DeviceIntPtr device)
return !Success;
}
+ pEvdev->reopen_timer = TimerSet(pEvdev->reopen_timer, 0, 0, NULL, NULL);
+
xf86FlushInput(pInfo->fd);
xf86AddEnabledDevice(pInfo);
EvdevMBEmuOn(pInfo);
commit aa58eb609617beb5d3199dab262f96003f57ab97
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Apr 6 10:22:25 2009 +1000
Trigger read error handling if len is <= 0.
Red Hat Bug 494245 <https://bugzilla.redhat.com/show_bug.cgi?id=494245>
Reported-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 98ecb5233bb3b899bd696a90d2733c6a345676dd)
diff --git a/src/evdev.c b/src/evdev.c
index 482f7fd..3a60e7f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -564,7 +564,7 @@ EvdevReadInput(InputInfoPtr pInfo)
while (len == sizeof(ev))
{
len = read(pInfo->fd, &ev, sizeof(ev));
- if (len == 0)
+ if (len <= 0)
{
if (errno == ENODEV) /* May happen after resume */
{
Reply to: