mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-26 18:54:30 +00:00
xf86-input-evdev v1.1.2
Bugzilla #6734 <https://bugs.freedesktop.org/show_bug.cgi=6734> Apply patch from Philip Langdale which causes us to make sure that O_NONBLOCK is set on the inotify device.
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2006-04-30 Zephaniah E. Hull <warp@aehallh.com>
|
||||
|
||||
* configure.ac:
|
||||
xf86-input-evdev v1.1.2
|
||||
* src/evdev_brain.c: (evdevControl):
|
||||
Bugzilla #6734 <https://bugs.freedesktop.org/show_bug.cgi=6734>
|
||||
Apply patch from Philip Langdale which causes us to make sure that
|
||||
O_NONBLOCK is set on the inotify device.
|
||||
|
||||
2006-04-15 Zephaniah E. Hull <warp@aehallh.com>
|
||||
|
||||
* configure.ac:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([xf86-input-evdev],
|
||||
1.1.1,
|
||||
1.1.2,
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
||||
xf86-input-evdev)
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include <xf86.h>
|
||||
#include <fnmatch.h>
|
||||
#include <sys/poll.h>
|
||||
|
||||
#include "inotify.h"
|
||||
#include "inotify-syscalls.h"
|
||||
@@ -347,7 +348,7 @@ static int
|
||||
evdevControl(DeviceIntPtr pPointer, int what)
|
||||
{
|
||||
InputInfoPtr pInfo;
|
||||
int i;
|
||||
int i, flags;
|
||||
|
||||
pInfo = pPointer->public.devicePrivate;
|
||||
|
||||
@@ -376,6 +377,19 @@ evdevControl(DeviceIntPtr pPointer, int what)
|
||||
SYSCALL (close (pInfo->fd));
|
||||
pInfo->fd = -1;
|
||||
}
|
||||
if ((flags = fcntl(pInfo->fd, F_GETFL)) < 0) {
|
||||
xf86Msg(X_ERROR, "%s: Unable to NONBLOCK inotify, using fallback. "
|
||||
"(errno: %d)\n", pInfo->name, errno);
|
||||
evdev_inotify = 0;
|
||||
SYSCALL (close (pInfo->fd));
|
||||
pInfo->fd = -1;
|
||||
} else if (fcntl(pInfo->fd, F_SETFL, flags | O_NONBLOCK) < 0) {
|
||||
xf86Msg(X_ERROR, "%s: Unable to NONBLOCK inotify, using fallback. "
|
||||
"(errno: %d)\n", pInfo->name, errno);
|
||||
evdev_inotify = 0;
|
||||
SYSCALL (close (pInfo->fd));
|
||||
pInfo->fd = -1;
|
||||
}
|
||||
|
||||
if (!evdev_inotify) {
|
||||
SYSCALL (pInfo->fd = open ("/proc/bus/usb/devices", O_RDONLY));
|
||||
|
||||
Reference in New Issue
Block a user