From eab06f5f401982f01bfca3388b9c0bfabadf0b55 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Fri, 3 Jun 2011 22:23:10 +0000 Subject: [PATCH] Keyboard and Tablet were likewise using the aforementioned ioctls incorrectly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41896 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../input_server/devices/keyboard/KeyboardInputDevice.cpp | 2 +- src/add-ons/input_server/devices/tablet/TabletInputDevice.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp b/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp index 5b7460792e..ef963d2621 100644 --- a/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp +++ b/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp @@ -282,7 +282,7 @@ KeyboardDevice::_ControlThread() memset(states, 0, sizeof(states)); while (fActive) { - if (ioctl(fFD, KB_READ, &keyInfo) != B_OK) { + if (ioctl(fFD, KB_READ, &keyInfo, sizeof(keyInfo)) != B_OK) { _ControlThreadCleanup(); // TOAST! return 0; diff --git a/src/add-ons/input_server/devices/tablet/TabletInputDevice.cpp b/src/add-ons/input_server/devices/tablet/TabletInputDevice.cpp index 00eecd2ed2..7ce8e0645c 100644 --- a/src/add-ons/input_server/devices/tablet/TabletInputDevice.cpp +++ b/src/add-ons/input_server/devices/tablet/TabletInputDevice.cpp @@ -322,7 +322,8 @@ TabletInputDevice::DeviceWatcher(void *arg) BMessage *message; while (dev->active) { memset(&movements, 0, sizeof(movements)); - if (ioctl(dev->fd, MS_READ, &movements) != B_OK) { + if (ioctl(dev->fd, MS_READ, &movements, + sizeof(movements)) != B_OK) { snooze(10000); // this is a realtime thread, and something is wrong... continue; }