From fa0b6061051460baf110a20e8d76f91708a7f73d Mon Sep 17 00:00:00 2001 From: endolf Date: Wed, 4 May 2005 18:15:08 +0000 Subject: [PATCH] Event devices now opened read only --- plugins/linux/src/native/EventDevice.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/linux/src/native/EventDevice.cpp b/plugins/linux/src/native/EventDevice.cpp index e616fb3..64ac8cb 100644 --- a/plugins/linux/src/native/EventDevice.cpp +++ b/plugins/linux/src/native/EventDevice.cpp @@ -40,7 +40,7 @@ EventDevice::EventDevice(char *deviceFileName) { char tempName[Device::MAX_NAME_LENGTH-1] = "Unknown"; int i; - fd = open(deviceFileName, O_RDWR | O_NONBLOCK); + fd = open(deviceFileName, O_RDONLY | O_NONBLOCK); if(fd<0) { /*char errorMessage[512]; sprintf(errorMessage, "Error opening device %s\n", deviceFileName); @@ -313,9 +313,10 @@ int EventDevice::poll(){ int numEventsRead = (int) (read_bytes / sizeof(struct input_event)); for(i=0;i