Bug 1133

Summary: keyboard driver fails to initialize if DoLoadableServer=NO
Product: xorg Reporter: Matthieu Herrb <matthieu.herrb>
Component: Input/KeyboardAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: kem
Version: git   
Hardware: Other   
OS: OpenBSD   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 351    
Attachments:
Description Flags
band aid patch
none
Patch to make DoLoadableServer NO work (relative to programs/Xserver/hw/xfree86/input)
none
Patch that works none

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.