[PATCH 4/4] dix: change "still paired warning" to use BUG_RETURN_VAL

Peter Hutterer peter.hutterer at who-t.net
Tue May 15 03:26:41 PDT 2012


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/devices.c |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/dix/devices.c b/dix/devices.c
index 04008d4..677b76c 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -457,13 +457,9 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
     }
 
     if (IsMaster(dev) && dev->spriteInfo->sprite) {
-        for (other = inputInfo.devices; other; other = other->next) {
-            if (other->spriteInfo->paired == dev) {
-                ErrorF("[dix] cannot disable device, still paired. "
-                       "This is a bug. \n");
-                return FALSE;
-            }
-        }
+        for (other = inputInfo.devices; other; other = other->next)
+            BUG_RETURN_VAL_MSG(other->spriteInfo->paired == dev, FALSE,
+                               "%s still paired with %s", dev->name, other->spriteInfo->paired->name);
     }
 
     (void) (*dev->deviceProc) (dev, DEVICE_OFF);
-- 
1.7.10.1



More information about the xorg-devel mailing list