From 6b4231e3b5b49b731c9a00930ae465fff8539831 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 12 Jul 2007 16:36:27 -0700 Subject: [PATCH] Use kbd driver when xorg.conf specifies "keyboard" or "Keyboard" (bug #11301) X.Org Bug #11301 Sun Bug #6560332 --- hw/xfree86/common/xf86Init.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 8f3b23a73..d20a2714a 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -979,6 +979,17 @@ InitInput(argc, argv) if (serverGeneration == 1) { /* Call the PreInit function for each input device instance. */ for (pDev = xf86ConfigLayout.inputs; pDev && *pDev; pDev++) { + /* Replace obsolete keyboard driver with kbd */ + if (!xf86NameCmp((*pDev)->driver, "keyboard")) { + xf86MsgVerb(X_WARNING, 0, + "*** WARNING the legacy keyboard driver \"%s\" has been removed\n", + (*pDev)->driver); + xf86MsgVerb(X_WARNING, 0, + "*** Using the new \"kbd\" driver for \"%s\".\n", + (*pDev)->identifier); + strcpy((*pDev)->driver, "kbd"); + } + if ((pDrv = xf86LookupInputDriver((*pDev)->driver)) == NULL) { xf86Msg(X_ERROR, "No Input driver matching `%s'\n", (*pDev)->driver); /* XXX For now, just continue. */ @@ -1834,6 +1845,11 @@ xf86LoadModules(char **list, pointer *optlist) if (name == NULL || *name == '\0') continue; + /* Replace obsolete keyboard driver with kbd */ + if (!xf86NameCmp(name, "keyboard")) { + strcpy(name, "kbd"); + } + if (optlist) opt = optlist[i]; else