[PATCH] xfree86: split warning about missing identifier or input driver

Peter Hutterer peter.hutterer at who-t.net
Wed Jan 4 16:49:20 PST 2012


Check for identifier first and bail if it's missing (also remove the current
identifier check after we've already bailed due to missing identifiers)

If a driver is missing, warn but also say that we may have added this device
already. I see too many bugreports with incorrectly shortened log files.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
helpful as people think they are, posting a cut-down log with only the error
about mouse0 not beeing added (despite the success messages for the matching
event file) is too common. Here's me hoping that that note may make people
look twice at what they're cutting out of the log.

 hw/xfree86/common/xf86Xinput.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 280a6ec..fd40f28 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -970,15 +970,16 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs,
         pInfo->attrs = DuplicateInputAttributes(attrs);
     }
 
-    if (!pInfo->driver || !pInfo->name) {
-        xf86Msg(X_INFO, "No input driver/identifier specified (ignoring)\n");
+    if (!pInfo->name) {
+        xf86Msg(X_INFO, "No identifier specified, ignoring this device.\n");
         rval = BadRequest;
         goto unwind;
     }
 
-    if (!pInfo->name) {
-        xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n");
-        rval = BadMatch;
+    if (!pInfo->driver) {
+        xf86Msg(X_INFO, "No input driver specified, ignoring this device.\n");
+        xf86Msg(X_INFO, "This device may have been added with another device file.\n");
+        rval = BadRequest;
         goto unwind;
     }
 
-- 
1.7.7.4



More information about the xorg-devel mailing list