summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-11-22 09:35:21 +1000
committerPing Cheng <pinglinux@gmail.com>2021-11-22 09:17:15 -0800
commitf22586a0861b9bad70f4ffb208526280308c0c80 (patch)
treeda92920e107aa773eb2792d3e7126d806784baf2
parent4865f088a20a568908241664dfa406b42d003f03 (diff)
downloadxf86-input-wacom-f22586a0861b9bad70f4ffb208526280308c0c80.tar.gz
Replace xf86ReadSerial and xf86WriteSerial with libc calls
That's all the server does anyway for these calls. That and some debugging printf of the data but that would require the server to be build with those debugging flags enabled. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/wcmISDV4.c4
-rw-r--r--src/xf86Wacom.c3
-rw-r--r--test/fake-symbols.c13
3 files changed, 3 insertions, 17 deletions
diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c
index ef921cf..edf7d36 100644
--- a/src/wcmISDV4.c
+++ b/src/wcmISDV4.c
@@ -843,7 +843,7 @@ static int wcmWriteWait(InputInfoPtr pInfo, const char* request)
/* send request string */
do
{
- len = xf86WriteSerial(pInfo->fd, request, strlen(request));
+ SYSCALL((len = write(pInfo->fd, request, strlen(request))));
if ((len == -1) && (errno != EAGAIN))
{
xf86IDrvMsg(pInfo, X_ERROR,
@@ -877,7 +877,7 @@ static int wcmWaitForTablet(InputInfoPtr pInfo, char* answer, int size)
{
if ((len = xf86WaitForInput(pInfo->fd, 1000000)) > 0)
{
- len = xf86ReadSerial(pInfo->fd, answer, size);
+ SYSCALL((len = read(pInfo->fd, answer, size)));
if ((len == -1) && (errno != EAGAIN))
{
xf86IDrvMsg(pInfo, X_ERROR,
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index d543d47..06982ce 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -629,8 +629,7 @@ Bool wcmReadPacket(InputInfoPtr pInfo)
DBG(1, common, "pos=%d remaining=%d\n", common->bufpos, remaining);
/* fill buffer with as much data as we can handle */
- len = xf86ReadSerial(pInfo->fd,
- common->buffer + common->bufpos, remaining);
+ SYSCALL((len = read(pInfo->fd, common->buffer + common->bufpos, remaining)));
if (len <= 0)
{
diff --git a/test/fake-symbols.c b/test/fake-symbols.c
index bc44e43..a323859 100644
--- a/test/fake-symbols.c
+++ b/test/fake-symbols.c
@@ -1,18 +1,5 @@
#include "fake-symbols.h"
-_X_EXPORT
-int xf86ReadSerial (int fd, void *buf, int count)
-{
- return 0;
-}
-
-
-_X_EXPORT int
-xf86WriteSerial (int fd, const void *buf, int count)
-{
- return 0;
-}
-
_X_EXPORT int
xf86CloseSerial (int fd)
{