Prevent evdevkeyboard file opening from failing
On many systems the device nodes will not be writable normally. There is no reason to open for writing in any case. Also switched back to non-blocking I/O. Change-Id: I9290e6b1ce7e3bc6cb0e75069b3968f647ffbeee Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
This commit is contained in:
parent
56cfd5d83f
commit
115f45ff41
@ -124,7 +124,7 @@ QEvdevKeyboardHandler *QEvdevKeyboardHandler::create(const QString &device, cons
|
||||
#endif
|
||||
|
||||
int fd;
|
||||
fd = qt_safe_open(device.toLocal8Bit().constData(), O_RDWR, 0);
|
||||
fd = qt_safe_open(device.toLocal8Bit().constData(), O_RDONLY | O_NDELAY, 0);
|
||||
if (fd >= 0) {
|
||||
if (repeatDelay > 0 && repeatRate > 0) {
|
||||
int kbdrep[2] = { repeatDelay, repeatRate };
|
||||
|
Loading…
Reference in New Issue
Block a user