[PATCH evdev] Prefix all log messages with "evdev:".

Peter Hutterer peter.hutterer at who-t.net
Thu Jun 3 19:01:06 PDT 2010


This way it's more obvious which messages are driver messages and which ones
aren't, especially when multiple drivers are fighting over the same device.
Also, grep works much better.

xf86DrvMsgVerb() cannot be used here, it uses the output driver as prefix.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
There's the option of having another macro for logging but I'd rather have
the code clean, using the server API directly instead of wrapping around it.
fwiw, I'm planning to do the same to the other drivers too.

 src/draglock.c |   10 ++--
 src/emuWheel.c |   20 +++++-----
 src/evdev.c    |  116 ++++++++++++++++++++++++++++----------------------------
 3 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/src/draglock.c b/src/draglock.c
index af80cf6..538a360 100644
--- a/src/draglock.c
+++ b/src/draglock.c
@@ -105,11 +105,11 @@ EvdevDragLockPreInit(InputInfoPtr pInfo)
                     /* We only have a meta button */
                     pEvdev->dragLock.meta = meta_button;
 
-                    xf86Msg(X_CONFIG, "%s: DragLockButtons : "
+                    xf86Msg(X_CONFIG, "evdev: %s: DragLockButtons : "
                             "%i as meta\n",
                             pInfo->name, meta_button);
                 } else {
-                    xf86Msg(X_ERROR, "%s: DragLockButtons : "
+                    xf86Msg(X_ERROR, "evdev: %s: DragLockButtons : "
                             "Incomplete pair specifying button pairs %s\n",
                             pInfo->name, option_string);
                 }
@@ -119,7 +119,7 @@ EvdevDragLockPreInit(InputInfoPtr pInfo)
                 if ((meta_button <= EVDEV_MAXBUTTONS) && (meta_button >= 0 ) &&
                     (lock_button <= EVDEV_MAXBUTTONS) && (lock_button >= 0)) {
 
-                    xf86Msg(X_CONFIG, "%s: DragLockButtons : %i -> %i\n",
+                    xf86Msg(X_CONFIG, "evdev: %s: DragLockButtons : %i -> %i\n",
                             pInfo->name, meta_button, lock_button);
 
                     pEvdev->dragLock.lock_pair[meta_button - 1] = lock_button;
@@ -127,13 +127,13 @@ EvdevDragLockPreInit(InputInfoPtr pInfo)
                 } else {
                     /* Let the user know something was wrong
                        with this pair of buttons */
-                    xf86Msg(X_CONFIG, "%s: DragLockButtons : "
+                    xf86Msg(X_CONFIG, "evdev: %s: DragLockButtons : "
                             "Invalid button pair %i -> %i\n",
                             pInfo->name, meta_button, lock_button);
                 }
             }
         } else {
-            xf86Msg(X_ERROR, "%s: Found DragLockButtons "
+            xf86Msg(X_ERROR, "evdev: %s: Found DragLockButtons "
                     "with  invalid lock button string : '%s'\n",
                     pInfo->name, option_string);
 
diff --git a/src/emuWheel.c b/src/emuWheel.c
index 9a53211..b504efa 100644
--- a/src/emuWheel.c
+++ b/src/emuWheel.c
@@ -230,14 +230,14 @@ EvdevWheelEmuHandleButtonMap(InputInfoPtr pInfo, WheelAxisPtr pAxis, char* axis_
 	    if (down_button > pEvdev->num_buttons) pEvdev->num_buttons = down_button;
 
 	} else {
-	    xf86Msg(X_WARNING, "%s: Invalid %s value:\"%s\"\n",
+	    xf86Msg(X_WARNING, "evdev: %s: Invalid %s value:\"%s\"\n",
 		    pInfo->name, axis_name, option_string);
 	}
 	free(option_string);
 
 	/* Clean up and log what happened */
 	if (msg) {
-	    xf86Msg(X_CONFIG, "%s: %s: %s\n",pInfo->name, axis_name, msg);
+	    xf86Msg(X_CONFIG, "evdev: %s: %s: %s\n",pInfo->name, axis_name, msg);
 	    free(msg);
 	    return TRUE;
 	}
@@ -266,9 +266,9 @@ EvdevWheelEmuPreInit(InputInfoPtr pInfo)
     wheelButton = xf86SetIntOption(pInfo->options, "EmulateWheelButton", 4);
 
     if ((wheelButton < 0) || (wheelButton > EVDEV_MAXBUTTONS)) {
-        xf86Msg(X_WARNING, "%s: Invalid EmulateWheelButton value: %d\n",
+        xf86Msg(X_WARNING, "evdev: %s: Invalid EmulateWheelButton value: %d\n",
                 pInfo->name, wheelButton);
-        xf86Msg(X_WARNING, "%s: Wheel emulation disabled.\n", pInfo->name);
+        xf86Msg(X_WARNING, "evdev: %s: Wheel emulation disabled.\n", pInfo->name);
 
         pEvdev->emulateWheel.enabled = FALSE;
     }
@@ -278,9 +278,9 @@ EvdevWheelEmuPreInit(InputInfoPtr pInfo)
     inertia = xf86SetIntOption(pInfo->options, "EmulateWheelInertia", 10);
 
     if (inertia <= 0) {
-        xf86Msg(X_WARNING, "%s: Invalid EmulateWheelInertia value: %d\n",
+        xf86Msg(X_WARNING, "evdev: %s: Invalid EmulateWheelInertia value: %d\n",
                 pInfo->name, inertia);
-        xf86Msg(X_WARNING, "%s: Using built-in inertia value.\n",
+        xf86Msg(X_WARNING, "evdev: %s: Using built-in inertia value.\n",
                 pInfo->name);
 
         inertia = 10;
@@ -291,9 +291,9 @@ EvdevWheelEmuPreInit(InputInfoPtr pInfo)
     timeout = xf86SetIntOption(pInfo->options, "EmulateWheelTimeout", 200);
 
     if (timeout < 0) {
-        xf86Msg(X_WARNING, "%s: Invalid EmulateWheelTimeout value: %d\n",
+        xf86Msg(X_WARNING, "evdev: %s: Invalid EmulateWheelTimeout value: %d\n",
                 pInfo->name, timeout);
-        xf86Msg(X_WARNING, "%s: Using built-in timeout value.\n",
+        xf86Msg(X_WARNING, "evdev: %s: Using built-in timeout value.\n",
                 pInfo->name);
 
         timeout = 200;
@@ -314,7 +314,7 @@ EvdevWheelEmuPreInit(InputInfoPtr pInfo)
             pEvdev->num_buttons = 5;
 
         /* Display default Configuration */
-        xf86Msg(X_CONFIG, "%s: YAxisMapping: buttons %d and %d\n",
+        xf86Msg(X_CONFIG, "evdev: %s: YAxisMapping: buttons %d and %d\n",
                 pInfo->name, pEvdev->emulateWheel.Y.up_button,
                 pEvdev->emulateWheel.Y.down_button);
     }
@@ -329,7 +329,7 @@ EvdevWheelEmuPreInit(InputInfoPtr pInfo)
     pEvdev->emulateWheel.X.traveled_distance = 0;
     pEvdev->emulateWheel.Y.traveled_distance = 0;
 
-    xf86Msg(X_CONFIG, "%s: EmulateWheelButton: %d, "
+    xf86Msg(X_CONFIG, "evdev: %s: EmulateWheelButton: %d, "
             "EmulateWheelInertia: %d, "
             "EmulateWheelTimeout: %d\n",
             pInfo->name, pEvdev->emulateWheel.button, inertia, timeout);
diff --git a/src/evdev.c b/src/evdev.c
index bd92d91..fa50691 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -171,7 +171,7 @@ EvdevGetMajorMinor(InputInfoPtr pInfo)
 
     if (fstat(pInfo->fd, &st) == -1)
     {
-        xf86Msg(X_ERROR, "%s: stat failed (%s). cannot check for duplicates.\n",
+        xf86Msg(X_ERROR, "evdev: %s: stat failed (%s). cannot check for duplicates.\n",
                 pInfo->name, strerror(errno));
         return 0;
     }
@@ -285,7 +285,7 @@ EvdevQueueKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
 
     if (pEvdev->num_queue >= EVDEV_MAXQUEUE)
     {
-        xf86Msg(X_NONE, "%s: dropping event due to full queue!\n", pInfo->name);
+        xf86Msg(X_NONE, "evdev: %s: dropping event due to full queue!\n", pInfo->name);
         return;
     }
 
@@ -304,7 +304,7 @@ EvdevQueueButtonEvent(InputInfoPtr pInfo, int button, int value)
 
     if (pEvdev->num_queue >= EVDEV_MAXQUEUE)
     {
-        xf86Msg(X_NONE, "%s: dropping event due to full queue!\n", pInfo->name);
+        xf86Msg(X_NONE, "evdev: %s: dropping event due to full queue!\n", pInfo->name);
         return;
     }
 
@@ -728,7 +728,7 @@ EvdevReadInput(InputInfoPtr pInfo)
             } else if (errno != EAGAIN)
             {
                 /* We use X_NONE here because it doesn't alloc */
-                xf86MsgVerb(X_NONE, 0, "%s: Read error: %s\n", pInfo->name,
+                xf86MsgVerb(X_NONE, 0, "evdev: %s: Read error: %s\n", pInfo->name,
                         strerror(errno));
             }
             break;
@@ -738,7 +738,7 @@ EvdevReadInput(InputInfoPtr pInfo)
          * event, so len != sizeof ev is an error. */
         if (len % sizeof(ev[0])) {
             /* We use X_NONE here because it doesn't alloc */
-            xf86MsgVerb(X_NONE, 0, "%s: Read error: %s\n", pInfo->name, strerror(errno));
+            xf86MsgVerb(X_NONE, 0, "evdev: %s: Read error: %s\n", pInfo->name, strerror(errno));
             break;
         }
 
@@ -1233,7 +1233,7 @@ EvdevAddAbsClass(DeviceIntPtr device)
         else if (!strcasecmp("relative", mode))
             pEvdev->flags |= EVDEV_RELATIVE_MODE;
         else
-            xf86Msg(X_INFO, "%s: unknown mode, use default\n", pInfo->name);
+            xf86Msg(X_INFO, "evdev: %s: unknown mode, use default\n", pInfo->name);
         free(mode);
     }
 
@@ -1373,7 +1373,7 @@ EvdevInitButtonMapping(InputInfoPtr pInfo)
         char    *map, *s = " ";
         int     btn = 0;
 
-        xf86Msg(X_CONFIG, "%s: ButtonMapping '%s'\n", pInfo->name, mapping);
+        xf86Msg(X_CONFIG, "evdev: %s: ButtonMapping '%s'\n", pInfo->name, mapping);
         map = mapping;
         while (s && *s != '\0' && nbuttons < EVDEV_MAXBUTTONS)
         {
@@ -1382,7 +1382,7 @@ EvdevInitButtonMapping(InputInfoPtr pInfo)
             if (s == map || btn < 0 || btn > EVDEV_MAXBUTTONS)
             {
                 xf86Msg(X_ERROR,
-                        "%s: ... Invalid button mapping. Using defaults\n",
+                        "evdev: %s: ... Invalid button mapping. Using defaults\n",
                         pInfo->name);
                 nbuttons = 1; /* ensure defaults start at 1 */
                 break;
@@ -1404,10 +1404,10 @@ EvdevInitAnyClass(DeviceIntPtr device, EvdevPtr pEvdev)
 {
     if (pEvdev->flags & EVDEV_RELATIVE_EVENTS &&
         EvdevAddRelClass(device) == Success)
-        xf86Msg(X_INFO, "%s: initialized for relative axes.\n", device->name);
+        xf86Msg(X_INFO, "evdev: %s: initialized for relative axes.\n", device->name);
     if (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS &&
         EvdevAddAbsClass(device) == Success)
-        xf86Msg(X_INFO, "%s: initialized for absolute axes.\n", device->name);
+        xf86Msg(X_INFO, "evdev: %s: initialized for absolute axes.\n", device->name);
 }
 
 static void
@@ -1415,11 +1415,11 @@ EvdevInitAbsClass(DeviceIntPtr device, EvdevPtr pEvdev)
 {
     if (EvdevAddAbsClass(device) == Success) {
 
-        xf86Msg(X_INFO,"%s: initialized for absolute axes.\n", device->name);
+        xf86Msg(X_INFO,"evdev: %s: initialized for absolute axes.\n", device->name);
 
     } else {
 
-        xf86Msg(X_ERROR,"%s: failed to initialize for absolute axes.\n",
+        xf86Msg(X_ERROR,"evdev: %s: failed to initialize for absolute axes.\n",
                 device->name);
 
         pEvdev->flags &= ~EVDEV_ABSOLUTE_EVENTS;
@@ -1434,17 +1434,17 @@ EvdevInitRelClass(DeviceIntPtr device, EvdevPtr pEvdev)
 
     if (EvdevAddRelClass(device) == Success) {
 
-        xf86Msg(X_INFO,"%s: initialized for relative axes.\n", device->name);
+        xf86Msg(X_INFO,"evdev: %s: initialized for relative axes.\n", device->name);
 
         if (has_abs_axes) {
 
-            xf86Msg(X_WARNING,"%s: ignoring absolute axes.\n", device->name);
+            xf86Msg(X_WARNING,"evdev: %s: ignoring absolute axes.\n", device->name);
             pEvdev->flags &= ~EVDEV_ABSOLUTE_EVENTS;
         }
 
     } else {
 
-        xf86Msg(X_ERROR,"%s: failed to initialize for relative axes.\n",
+        xf86Msg(X_ERROR,"evdev: %s: failed to initialize for relative axes.\n",
                 device->name);
 
         pEvdev->flags &= ~EVDEV_RELATIVE_EVENTS;
@@ -1459,7 +1459,7 @@ EvdevInitTouchDevice(DeviceIntPtr device, EvdevPtr pEvdev)
 {
     if (pEvdev->flags & EVDEV_RELATIVE_EVENTS) {
 
-        xf86Msg(X_WARNING,"%s: touchpads, tablets and touchscreens ignore "
+        xf86Msg(X_WARNING,"evdev: %s: touchpads, tablets and touchscreens ignore "
                 "relative axes.\n", device->name);
 
         pEvdev->flags &= ~EVDEV_RELATIVE_EVENTS;
@@ -1584,7 +1584,7 @@ EvdevProc(DeviceIntPtr device, int what)
 	break;
 
     case DEVICE_CLOSE:
-	xf86Msg(X_INFO, "%s: Close\n", pInfo->name);
+	xf86Msg(X_INFO, "evdev: %s: Close\n", pInfo->name);
         if (pInfo->fd != -1) {
             close(pInfo->fd);
             pInfo->fd = -1;
@@ -1619,21 +1619,21 @@ EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
     unsigned long led_bitmask[NLONGS(LED_CNT)] = {0};
 
     if (ioctl(pInfo->fd, EVIOCGNAME(sizeof(name) - 1), name) < 0) {
-        xf86Msg(X_ERROR, "ioctl EVIOCGNAME failed: %s\n", strerror(errno));
+        xf86Msg(X_ERROR, "evdev: ioctl EVIOCGNAME failed: %s\n", strerror(errno));
         goto error;
     }
 
     if (!compare) {
         strcpy(pEvdev->name, name);
     } else if (strcmp(pEvdev->name, name)) {
-        xf86Msg(X_ERROR, "%s: device name changed: %s != %s\n",
+        xf86Msg(X_ERROR, "evdev: %s: device name changed: %s != %s\n",
                 pInfo->name, pEvdev->name, name);
         goto error;
     }
 
     len = ioctl(pInfo->fd, EVIOCGBIT(0, sizeof(bitmask)), bitmask);
     if (len < 0) {
-        xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n",
+        xf86Msg(X_ERROR, "evdev: %s: ioctl EVIOCGBIT failed: %s\n",
                 pInfo->name, strerror(errno));
         goto error;
     }
@@ -1641,13 +1641,13 @@ EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
     if (!compare) {
         memcpy(pEvdev->bitmask, bitmask, len);
     } else if (memcmp(pEvdev->bitmask, bitmask, len)) {
-        xf86Msg(X_ERROR, "%s: device bitmask has changed\n", pInfo->name);
+        xf86Msg(X_ERROR, "evdev: %s: device bitmask has changed\n", pInfo->name);
         goto error;
     }
 
     len = ioctl(pInfo->fd, EVIOCGBIT(EV_REL, sizeof(rel_bitmask)), rel_bitmask);
     if (len < 0) {
-        xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n",
+        xf86Msg(X_ERROR, "evdev: %s: ioctl EVIOCGBIT failed: %s\n",
                 pInfo->name, strerror(errno));
         goto error;
     }
@@ -1655,13 +1655,13 @@ EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
     if (!compare) {
         memcpy(pEvdev->rel_bitmask, rel_bitmask, len);
     } else if (memcmp(pEvdev->rel_bitmask, rel_bitmask, len)) {
-        xf86Msg(X_ERROR, "%s: device rel_bitmask has changed\n", pInfo->name);
+        xf86Msg(X_ERROR, "evdev: %s: device rel_bitmask has changed\n", pInfo->name);
         goto error;
     }
 
     len = ioctl(pInfo->fd, EVIOCGBIT(EV_ABS, sizeof(abs_bitmask)), abs_bitmask);
     if (len < 0) {
-        xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n",
+        xf86Msg(X_ERROR, "evdev: %s: ioctl EVIOCGBIT failed: %s\n",
                 pInfo->name, strerror(errno));
         goto error;
     }
@@ -1669,13 +1669,13 @@ EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
     if (!compare) {
         memcpy(pEvdev->abs_bitmask, abs_bitmask, len);
     } else if (memcmp(pEvdev->abs_bitmask, abs_bitmask, len)) {
-        xf86Msg(X_ERROR, "%s: device abs_bitmask has changed\n", pInfo->name);
+        xf86Msg(X_ERROR, "evdev: %s: device abs_bitmask has changed\n", pInfo->name);
         goto error;
     }
 
     len = ioctl(pInfo->fd, EVIOCGBIT(EV_LED, sizeof(led_bitmask)), led_bitmask);
     if (len < 0) {
-        xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n",
+        xf86Msg(X_ERROR, "evdev: %s: ioctl EVIOCGBIT failed: %s\n",
                 pInfo->name, strerror(errno));
         goto error;
     }
@@ -1683,7 +1683,7 @@ EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
     if (!compare) {
         memcpy(pEvdev->led_bitmask, led_bitmask, len);
     } else if (memcmp(pEvdev->led_bitmask, led_bitmask, len)) {
-        xf86Msg(X_ERROR, "%s: device led_bitmask has changed\n", pInfo->name);
+        xf86Msg(X_ERROR, "evdev: %s: device led_bitmask has changed\n", pInfo->name);
         goto error;
     }
 
@@ -1695,7 +1695,7 @@ EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
         if (TestBit(i, abs_bitmask)) {
             len = ioctl(pInfo->fd, EVIOCGABS(i), &pEvdev->absinfo[i]);
             if (len < 0) {
-                xf86Msg(X_ERROR, "%s: ioctl EVIOCGABSi(%d) failed: %s\n",
+                xf86Msg(X_ERROR, "evdev: %s: ioctl EVIOCGABSi(%d) failed: %s\n",
                         pInfo->name, i, strerror(errno));
                 goto error;
             }
@@ -1704,7 +1704,7 @@ EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
 
     len = ioctl(pInfo->fd, EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask);
     if (len < 0) {
-        xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n",
+        xf86Msg(X_ERROR, "evdev: %s: ioctl EVIOCGBIT failed: %s\n",
                 pInfo->name, strerror(errno));
         goto error;
     }
@@ -1725,7 +1725,7 @@ EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
         if (len >= start_byte &&
             memcmp(&pEvdev->key_bitmask[start_word], &key_bitmask[start_word],
                    min(len, end_byte) - start_byte + 1)) {
-            xf86Msg(X_ERROR, "%s: device key_bitmask has changed\n", pInfo->name);
+            xf86Msg(X_ERROR, "evdev: %s: device key_bitmask has changed\n", pInfo->name);
             goto error;
         }
     }
@@ -1754,11 +1754,11 @@ EvdevGrabDevice(InputInfoPtr pInfo, int grab, int ungrab)
     if (pEvdev->grabDevice)
     {
         if (grab && ioctl(pInfo->fd, EVIOCGRAB, (void *)1)) {
-            xf86Msg(X_WARNING, "%s: Grab failed (%s)\n", pInfo->name,
+            xf86Msg(X_WARNING, "evdev: %s: Grab failed (%s)\n", pInfo->name,
                     strerror(errno));
             return FALSE;
         } else if (ungrab && ioctl(pInfo->fd, EVIOCGRAB, (void *)0))
-            xf86Msg(X_WARNING, "%s: Release failed (%s)\n", pInfo->name,
+            xf86Msg(X_WARNING, "evdev: %s: Release failed (%s)\n", pInfo->name,
                     strerror(errno));
     }
 
@@ -1821,7 +1821,7 @@ EvdevProbe(InputInfoPtr pInfo)
     {
         pEvdev->flags |= EVDEV_BUTTON_EVENTS;
         pEvdev->num_buttons = num_buttons;
-        xf86Msg(X_PROBED, "%s: Found %d mouse buttons\n", pInfo->name,
+        xf86Msg(X_PROBED, "evdev: %s: Found %d mouse buttons\n", pInfo->name,
                 num_buttons);
     }
 
@@ -1836,10 +1836,10 @@ EvdevProbe(InputInfoPtr pInfo)
         if (TestBit(REL_WHEEL, pEvdev->rel_bitmask) ||
             TestBit(REL_HWHEEL, pEvdev->rel_bitmask) ||
             TestBit(REL_DIAL, pEvdev->rel_bitmask)) {
-            xf86Msg(X_PROBED, "%s: Found scroll wheel(s)\n", pInfo->name);
+            xf86Msg(X_PROBED, "evdev: %s: Found scroll wheel(s)\n", pInfo->name);
             has_scroll = TRUE;
             if (!num_buttons)
-                xf86Msg(X_INFO, "%s: Forcing buttons for scroll wheel(s)\n",
+                xf86Msg(X_INFO, "evdev: %s: Forcing buttons for scroll wheel(s)\n",
                         pInfo->name);
             num_buttons = (num_buttons < 3) ? 7 : num_buttons + 4;
             pEvdev->num_buttons = num_buttons;
@@ -1847,15 +1847,15 @@ EvdevProbe(InputInfoPtr pInfo)
 
         if (!ignore_rel)
         {
-            xf86Msg(X_PROBED, "%s: Found relative axes\n", pInfo->name);
+            xf86Msg(X_PROBED, "evdev: %s: Found relative axes\n", pInfo->name);
             pEvdev->flags |= EVDEV_RELATIVE_EVENTS;
 
             if (TestBit(REL_X, pEvdev->rel_bitmask) &&
                 TestBit(REL_Y, pEvdev->rel_bitmask)) {
-                xf86Msg(X_PROBED, "%s: Found x and y relative axes\n", pInfo->name);
+                xf86Msg(X_PROBED, "evdev: %s: Found x and y relative axes\n", pInfo->name);
             }
         } else {
-            xf86Msg(X_INFO, "%s: Relative axes present but ignored.\n", pInfo->name);
+            xf86Msg(X_INFO, "evdev: %s: Relative axes present but ignored.\n", pInfo->name);
             has_rel_axes = FALSE;
         }
     }
@@ -1869,18 +1869,18 @@ EvdevProbe(InputInfoPtr pInfo)
 
     if (ignore_abs && has_abs_axes)
     {
-        xf86Msg(X_INFO, "%s: Absolute axes present but ignored.\n", pInfo->name);
+        xf86Msg(X_INFO, "evdev: %s: Absolute axes present but ignored.\n", pInfo->name);
         has_abs_axes = FALSE;
     } else if (has_abs_axes) {
-        xf86Msg(X_PROBED, "%s: Found absolute axes\n", pInfo->name);
+        xf86Msg(X_PROBED, "evdev: %s: Found absolute axes\n", pInfo->name);
         pEvdev->flags |= EVDEV_ABSOLUTE_EVENTS;
 
         if ((TestBit(ABS_X, pEvdev->abs_bitmask) &&
              TestBit(ABS_Y, pEvdev->abs_bitmask))) {
-            xf86Msg(X_PROBED, "%s: Found x and y absolute axes\n", pInfo->name);
+            xf86Msg(X_PROBED, "evdev: %s: Found x and y absolute axes\n", pInfo->name);
             if (TestBit(BTN_TOOL_PEN, pEvdev->key_bitmask))
             {
-                xf86Msg(X_PROBED, "%s: Found absolute tablet.\n", pInfo->name);
+                xf86Msg(X_PROBED, "evdev: %s: Found absolute tablet.\n", pInfo->name);
                 pEvdev->flags |= EVDEV_TABLET;
                 if (!pEvdev->num_buttons)
                 {
@@ -1890,11 +1890,11 @@ EvdevProbe(InputInfoPtr pInfo)
             } else if (TestBit(ABS_PRESSURE, pEvdev->abs_bitmask) ||
                 TestBit(BTN_TOUCH, pEvdev->key_bitmask)) {
                 if (has_lmr || TestBit(BTN_TOOL_FINGER, pEvdev->key_bitmask)) {
-                    xf86Msg(X_PROBED, "%s: Found absolute touchpad.\n", pInfo->name);
+                    xf86Msg(X_PROBED, "evdev: %s: Found absolute touchpad.\n", pInfo->name);
                     pEvdev->flags |= EVDEV_TOUCHPAD;
                     memset(pEvdev->old_vals, -1, sizeof(int) * pEvdev->num_vals);
                 } else {
-                    xf86Msg(X_PROBED, "%s: Found absolute touchscreen\n", pInfo->name);
+                    xf86Msg(X_PROBED, "evdev: %s: Found absolute touchscreen\n", pInfo->name);
                     pEvdev->flags |= EVDEV_TOUCHSCREEN;
                     pEvdev->flags |= EVDEV_BUTTON_EVENTS;
                 }
@@ -1904,7 +1904,7 @@ EvdevProbe(InputInfoPtr pInfo)
 
     for (i = 0; i < BTN_MISC; i++) {
         if (TestBit(i, pEvdev->key_bitmask)) {
-            xf86Msg(X_PROBED, "%s: Found keys\n", pInfo->name);
+            xf86Msg(X_PROBED, "evdev: %s: Found keys\n", pInfo->name);
             pEvdev->flags |= EVDEV_KEYBOARD_EVENTS;
             has_keys = TRUE;
             break;
@@ -1930,7 +1930,7 @@ EvdevProbe(InputInfoPtr pInfo)
                 EvdevSetCalibration(pInfo, num_calibration, calibration);
             else
                 xf86Msg(X_ERROR,
-                        "%s: Insufficient calibration factors (%d). Ignoring calibration\n",
+                        "evdev: %s: Insufficient calibration factors (%d). Ignoring calibration\n",
                         pInfo->name, num_calibration);
         }
     }
@@ -1939,22 +1939,22 @@ EvdevProbe(InputInfoPtr pInfo)
         pInfo->flags |= XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS |
                         XI86_CONFIGURED;
 	if (pEvdev->flags & EVDEV_TOUCHPAD) {
-	    xf86Msg(X_INFO, "%s: Configuring as touchpad\n", pInfo->name);
+	    xf86Msg(X_INFO, "evdev: %s: Configuring as touchpad\n", pInfo->name);
 	    pInfo->type_name = XI_TOUCHPAD;
 	} else if (pEvdev->flags & EVDEV_TABLET) {
-	    xf86Msg(X_INFO, "%s: Configuring as tablet\n", pInfo->name);
+	    xf86Msg(X_INFO, "evdev: %s: Configuring as tablet\n", pInfo->name);
 	    pInfo->type_name = XI_TABLET;
         } else if (pEvdev->flags & EVDEV_TOUCHSCREEN) {
-            xf86Msg(X_INFO, "%s: Configuring as touchscreen\n", pInfo->name);
+            xf86Msg(X_INFO, "evdev: %s: Configuring as touchscreen\n", pInfo->name);
             pInfo->type_name = XI_TOUCHSCREEN;
 	} else {
-	    xf86Msg(X_INFO, "%s: Configuring as mouse\n", pInfo->name);
+	    xf86Msg(X_INFO, "evdev: %s: Configuring as mouse\n", pInfo->name);
 	    pInfo->type_name = XI_MOUSE;
 	}
     }
 
     if (has_keys) {
-        xf86Msg(X_INFO, "%s: Configuring as keyboard\n", pInfo->name);
+        xf86Msg(X_INFO, "evdev: %s: Configuring as keyboard\n", pInfo->name);
         pInfo->flags |= XI86_KEYBOARD_CAPABLE | XI86_CONFIGURED;
         pInfo->type_name = XI_KEYBOARD;
     }
@@ -1962,14 +1962,14 @@ EvdevProbe(InputInfoPtr pInfo)
     if (has_scroll && (pInfo->flags & XI86_CONFIGURED) &&
         (pInfo->flags & XI86_POINTER_CAPABLE) == 0)
     {
-        xf86Msg(X_INFO, "%s: Adding scrollwheel support\n", pInfo->name);
+        xf86Msg(X_INFO, "evdev: %s: Adding scrollwheel support\n", pInfo->name);
         pInfo->flags  |= XI86_POINTER_CAPABLE;
         pEvdev->flags |= EVDEV_BUTTON_EVENTS;
         pEvdev->flags |= EVDEV_RELATIVE_EVENTS;
     }
 
     if ((pInfo->flags & XI86_CONFIGURED) == 0) {
-        xf86Msg(X_WARNING, "%s: Don't know how to use device\n",
+        xf86Msg(X_WARNING, "evdev: %s: Don't know how to use device\n",
 		pInfo->name);
         return 1;
     }
@@ -2007,12 +2007,12 @@ EvdevOpenDevice(InputInfoPtr pInfo)
     {
         device = xf86CheckStrOption(pInfo->options, "Device", NULL);
         if (!device) {
-            xf86Msg(X_ERROR, "%s: No device specified.\n", pInfo->name);
+            xf86Msg(X_ERROR, "evdev: %s: No device specified.\n", pInfo->name);
             return FALSE;
         }
 
         pEvdev->device = device;
-        xf86Msg(X_CONFIG, "%s: Device: \"%s\"\n", pInfo->name, device);
+        xf86Msg(X_CONFIG, "evdev: %s: Device: \"%s\"\n", pInfo->name, device);
     }
 
     if (pInfo->fd < 0)
@@ -2022,7 +2022,7 @@ EvdevOpenDevice(InputInfoPtr pInfo)
         } while (pInfo->fd < 0 && errno == EINTR);
 
         if (pInfo->fd < 0) {
-            xf86Msg(X_ERROR, "Unable to open evdev device \"%s\".\n", device);
+            xf86Msg(X_ERROR, "evdev: Unable to open evdev device \"%s\".\n", device);
             return FALSE;
         }
     }
@@ -2031,7 +2031,7 @@ EvdevOpenDevice(InputInfoPtr pInfo)
     pEvdev->min_maj = EvdevGetMajorMinor(pInfo);
     if (EvdevIsDuplicate(pInfo))
     {
-        xf86Msg(X_WARNING, "%s: device file is duplicate. Ignoring.\n",
+        xf86Msg(X_WARNING, "evdev: %s: device file is duplicate. Ignoring.\n",
                 pInfo->name);
         close(pInfo->fd);
         return FALSE;
@@ -2095,7 +2095,7 @@ EvdevPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
      * hold a grab. */
     if (!EvdevGrabDevice(pInfo, 1, 1))
     {
-        xf86Msg(X_WARNING, "%s: Device may already be configured.\n",
+        xf86Msg(X_WARNING, "evdev: %s: Device may already be configured.\n",
                 pInfo->name);
         goto error;
     }
-- 
1.6.5.2



More information about the xorg-devel mailing list