summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-03-20 10:14:05 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-03-28 16:21:24 +1000
commitdacac616305cc38cab082607c0e40c109cb8422e (patch)
tree349fdfa524a73eb5ac040f9e47169061e02d4866
parenta0aa59ed5d0ab07702c3bc56cf5651d193e553a7 (diff)
eventcomm: print an error when axis range failed.
Judging by a quick google search, this isn't a common error that the user will see, it's a bug. So print out information useful for those triaging/debugging. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Cyril Brulebois <kibi@debian.org>
-rw-r--r--src/eventcomm.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 3f06484..f92347a 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -209,8 +209,11 @@ event_get_abs(int fd, int code, int *min, int *max, int *fuzz, int *res)
struct input_absinfo abs = {0};
SYSCALL(rc = ioctl(fd, EVIOCGABS(code), &abs));
- if (rc < 0)
+ if (rc < 0) {
+ xf86Msg(X_ERROR, "%s: EVIOCGABS error on %d (%s)\n",
+ __func__, code, strerror(rc));
return errno;
+ }
*min = abs.minimum;
*max = abs.maximum;
@@ -244,18 +247,12 @@ event_query_axis_ranges(InputInfoPtr pInfo)
if (rc == 0)
xf86Msg(X_PROBED, "%s: x-axis range %d - %d\n", pInfo->name,
priv->minx, priv->maxx);
- else
- xf86Msg(X_ERROR, "%s: failed to query axis range (%s)\n", pInfo->name,
- strerror(rc));
rc = event_get_abs(pInfo->fd, ABS_Y, &priv->miny, &priv->maxy,
&priv->synpara.hyst_y, &priv->resy);
if (rc == 0)
xf86Msg(X_PROBED, "%s: y-axis range %d - %d\n", pInfo->name,
priv->miny, priv->maxy);
- else
- xf86Msg(X_ERROR, "%s: failed to query axis range (%s)\n", pInfo->name,
- strerror(rc));
priv->has_pressure = FALSE;
priv->has_width = FALSE;