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

2012-01-04 Thread Peter Hutterer
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 
---
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

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


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

2012-01-04 Thread Cyril Brulebois
Peter Hutterer  (05/01/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 

Reviewed-by: Cyril Brulebois 

> 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.

True that..

Mraw,
KiBi.


signature.asc
Description: Digital signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel