diff options
author | Daniel Stone <daniel@fooishbar.org> | 2008-12-26 18:32:41 +1100 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2009-01-20 15:32:19 +1100 |
commit | d929ba6886c6f121b101c0bf0f7c63ef9d851a3e (patch) | |
tree | d7ec292379da2e5b1e01a6b86fa60ae71b178071 /hw/xfree86/common | |
parent | 534669b376a6a703fbc97269d279a5418cf60c98 (diff) |
XFree86: Input: Fail NIDR if we can't enable devices
If we can't enable a device, bail out of NewInputDeviceRequest rather than
blithely continuing. Also, be more verbose when initialization failed. Also,
be more verbose when initialization failed. Also, be more verbose when
initialization failed. Also, be more verbose when initialization failed.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'hw/xfree86/common')
-rw-r--r-- | hw/xfree86/common/xf86Xinput.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 413ef036d..d5d06ad05 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -591,12 +591,21 @@ xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL enable) dev = pInfo->dev; rval = ActivateDevice(dev); if (rval != Success) + { + xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", idev->identifier); goto unwind; + } /* Enable it if it's properly initialised and we're currently in the VT */ if (enable && dev->inited && dev->startup && xf86Screens[0]->vtSema) { EnableDevice(dev); + if (!dev->enabled) + { + xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", idev->identifier); + rval = BadMatch; + goto unwind; + } /* send enter/leave event, update sprite window */ CheckMotion(NULL, dev); } |