xfree86: print a message if NIDR fails due to AutoAddDevices off.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-04-30 11:39:50 +10:00
parent 43dbbc3032
commit 44044adc92

View File

@ -620,12 +620,11 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev)
/* Right now, the only automatic config we know of is HAL. */ /* Right now, the only automatic config we know of is HAL. */
if (strcmp(option->key, "_source") == 0 && if (strcmp(option->key, "_source") == 0 &&
strcmp(option->value, "server/hal") == 0) { strcmp(option->value, "server/hal") == 0) {
is_auto = 1;
if (!xf86Info.autoAddDevices) { if (!xf86Info.autoAddDevices) {
rval = BadMatch; rval = BadMatch;
goto unwind; goto unwind;
} }
is_auto = 1;
} }
} }
if (!idev->driver || !idev->identifier) { if (!idev->driver || !idev->identifier) {
@ -654,6 +653,8 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev)
return Success; return Success;
unwind: unwind:
if (is_auto && !xf86Info.autoAddDevices)
xf86Msg(X_INFO, "AutoAddDevices is off - not adding device.\n");
if(idev->driver) if(idev->driver)
xfree(idev->driver); xfree(idev->driver);
if(idev->identifier) if(idev->identifier)