"Error reading wacom device : device not found" is displayed in
Xorg.0.log 10 times each time a device is unplugged. This is too
much for those who unplugging the device many times a day.

So, move it to DBG level 1 for a less noisy log file. Also added
errno to the log message since users would like to see the errno
instead of just the strerror.

Signed-off-by: Ping Cheng <pingli...@gmail.com>
---
 src/xf86Wacom.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index 03eb8df..d31c9f3 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -791,10 +791,14 @@ void wcmReadPacket(InputInfoPtr pInfo)
 
        if (len <= 0)
        {
-               /* for all other errors, hope that the hotplugging code will
-                * remove the device */
-               if (errno != EAGAIN && errno != EINTR)
-                       xf86Msg(X_ERROR, "%s: Error reading wacom device : 
%s\n", pInfo->name, strerror(errno));
+               if (errno != EAGAIN && errno != EINTR)
+                       /* The hotplugging code will remove the device */
+                       DBG(1, priv, "Error reading wacom device : %s(%d)\n",
+                               strerror(errno), errno);
+               else
+                       /* We'll read it again */
+                       DBG(10, priv, "Reading wacom device interrupted: 
%s(%d)\n",
+                               strerror(errno), errno);
                return;
        }
 
-- 
1.7.4


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to