[PATCH] kdrive: output meaningful error message for HAL devices.

Peter Hutterer peter.hutterer at who-t.net
Tue Sep 8 16:31:34 PDT 2009


kdrive ignores all devices from hal as they don't have the 'type' option
set. Instead of "Unrecognised device identifier!" print out "Ignoring
device from HAL." to indicate that the errors surrounding the device don't
really matter.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 hw/kdrive/src/kinput.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 832b09c..fb8ebd0 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -2272,6 +2272,14 @@ NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev)
                 return BadValue;
             }
         }
+#ifdef CONFIG_HAL
+        else if (strcmp(option->key, "_source") == 0 &&
+                 strcmp(option->value, "server/hal") == 0)
+        {
+            ErrorF("Ignoring device from HAL.\n");
+            return BadValue;
+        }
+#endif
     }
 
     if (!ki && !pi) {
-- 
1.6.3.rc1.2.g0164.dirty


More information about the xorg-devel mailing list