Bug 1133 - keyboard driver fails to initialize if DoLoadableServer=NO
Summary: keyboard driver fails to initialize if DoLoadableServer=NO
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/Keyboard (show other bugs)
Version: git
Hardware: Other OpenBSD
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 351
  Show dependency treegraph
 
Reported: 2004-08-18 22:14 UTC by Matthieu Herrb
Modified: 2004-08-19 05:23 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
band aid patch (761 bytes, patch)
2004-08-18 22:15 UTC, Matthieu Herrb
no flags Details | Splinter Review
Patch to make DoLoadableServer NO work (relative to programs/Xserver/hw/xfree86/input) (1.45 KB, patch)
2004-08-19 07:02 UTC, Kristian Høgsberg
no flags Details | Splinter Review
Patch that works (101.57 KB, patch)
2004-08-19 16:57 UTC, Kristian Høgsberg
no flags Details | Splinter Review

Description Matthieu Herrb 2004-08-18 22:14:52 UTC
When DoLoadableServer=NO, the input driver list is build by the confdrv.sh script
in hw/xfree86/input. This list includes xf86KEYBOARD (defined in xf86Init.c) as
its 1st element.
This structure will match the "keyboard" driver name, but, since it's empty it
won't initialize correctly. 

The proposed patch is a band aid patch. I cannot test that it doesn't break the
server when the loader is in use, so please test it before applying and find a
better solution for the DoLoadableServer=NO case if needed.
Comment 1 Matthieu Herrb 2004-08-18 22:15:33 UTC
Created attachment 677 [details] [review]
band aid patch
Comment 2 Kristian Høgsberg 2004-08-19 07:02:42 UTC
Created attachment 683 [details] [review]
Patch to make DoLoadableServer NO work (relative to programs/Xserver/hw/xfree86/input)

Ugh, yeah this is messy... another problem with the new keyboard driver and
DoLoadableServer NO is that the "kbd" isn't available in that build.  Since the
list of drivers is the directory-names uppercased, KEYBOARD will be in the list
but not KBD.  Since I changed the KEYBOARD struct in keyboard/kbd.c to contain
"keyboard" instead of "kbd", a non-loadable server will not recognize a "kbd"
driver.  One solution to this is to just add KBD explicitly to the list of
arguments to confdrv.sh in the Imakefile.

As for the problem with xf86KEYBOARD getting added to the list: that's hard
coded in confdrv.sh, and can be moved to the Imakefile where it can depend on
the setting of UseDeprecatedKeyboardDriver.

The attached patch fixes both problems as described, please check it out.
Comment 3 Kristian Høgsberg 2004-08-19 07:10:06 UTC
(In reply to comment #2)
...
> The attached patch fixes both problems as described, please check it out.

As for risk of breaking the loadable build: the patch only touches confdrv.sh
and Imakefile rules regarding drvConf.c, so it should be safe.
Comment 4 Kristian Høgsberg 2004-08-19 16:57:50 UTC
Created attachment 687 [details] [review]
Patch that works

Argh, that didn't work, xf86KEYBOARD gets uppercased to XF86KEYBOARD in the
script.  This patch simply renames the variable in xf86Init.c to XF86KEYBOARD.
Comment 5 Kevin E. Martin 2004-08-19 22:23:08 UTC
Patch #3 checked in.
Closing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.