Set the device node to NULL for usb keyboards. The xorg keyboard

driver has the ability to open character devices, but in our case
syscons always owns the devices.  This should allow usb only
setups as well as help people who are setting xorg input options
on usb devices.

PR:		132270
Submitted by:	Jose M Rodriguez <josemi@freebsd.jazztel.es>
Approved by:	marcus
This commit is contained in:
Robert Noland 2009-03-03 03:30:20 +00:00
parent 649e3f6291
commit 04e28f5cf7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=229396
3 changed files with 19 additions and 10 deletions

View file

@ -8,7 +8,7 @@
PORTNAME= hal
DISTVERSION= 0.5.11
PORTREVISION= 19
PORTREVISION= 20
CATEGORIES= sysutils
MASTER_SITES= http://hal.freedesktop.org/releases/

View file

@ -1,5 +1,5 @@
--- hald/freebsd/hf-usb.c.orig 2008-05-07 19:24:02.000000000 -0400
+++ hald/freebsd/hf-usb.c 2009-02-27 14:01:46.000000000 -0500
--- hald/freebsd/hf-usb.c.orig 2008-05-08 01:24:02.000000000 +0200
+++ hald/freebsd/hf-usb.c 2009-03-02 04:23:32.000000000 +0100
@@ -25,13 +25,18 @@
# include <config.h>
#endif
@ -31,7 +31,7 @@
typedef struct
{
@@ -231,7 +241,7 @@ hf_usb_get_full_config_descriptor (int f
@@ -231,7 +241,7 @@
* Adapted from usb_compute_udi() in linux2/physdev.c and
* usbclass_compute_udi() in linux2/classdev.c.
*/
@ -40,7 +40,7 @@
hf_usb_device_compute_udi (HalDevice *device)
{
g_return_if_fail(HAL_IS_DEVICE(device));
@@ -250,12 +260,13 @@ hf_usb_device_compute_udi (HalDevice *de
@@ -250,12 +260,13 @@
hf_device_set_udi(device, "usb_device_%x_%x_%s",
hal_device_property_get_int(device, "usb_device.vendor_id"),
hal_device_property_get_int(device, "usb_device.product_id"),
@ -56,7 +56,16 @@
hf_usb_add_webcam_properties (HalDevice *device)
{
int unit;
@@ -575,6 +586,8 @@ hf_usb_probe_device (HalDevice *parent,
@@ -424,7 +435,7 @@
hf_devtree_device_set_name(device, di->udi_devnames[0]);
if ((devname = hf_usb_get_devname(di, "ukbd"))) /* USB keyboard */
- hf_device_set_input(device, "keyboard", devname);
+ hf_device_set_input(device, "keyboard", NULL);
else if ((devname = hf_usb_get_devname(di, "ums"))) /* USB mouse */
hf_device_set_input(device, "mouse", devname);
else if ((devname = hf_usb_get_devname(di, "uhid"))) /* UHID device */
@@ -575,6 +586,8 @@
{
if (hal_device_has_capability(device, "hiddev"))
hf_runner_run_sync(device, 0, "hald-probe-hiddev", NULL);
@ -65,7 +74,7 @@
hf_device_add(device);
}
@@ -633,9 +646,18 @@ hf_usb_privileged_init (void)
@@ -633,9 +646,18 @@
{
int i;

View file

@ -1,5 +1,5 @@
--- hald/freebsd/hf-usb2.c.orig 2009-02-17 18:58:44.000000000 -0500
+++ hald/freebsd/hf-usb2.c 2009-02-17 23:22:47.000000000 -0500
--- hald/freebsd/hf-usb2.c.orig 2009-03-02 20:16:10.000000000 -0600
+++ hald/freebsd/hf-usb2.c 2009-03-02 20:33:13.000000000 -0600
@@ -0,0 +1,287 @@
+/***************************************************************************
+ * CVSID: $Id$
@ -101,7 +101,7 @@
+ if (driver)
+ {
+ if (! strcmp(driver, "ukbd"))
+ hf_device_set_input(device, "keyboard", devname);
+ hf_device_set_input(device, "keyboard", NULL);
+ else if (! strcmp(driver, "ums"))
+ {
+ hf_device_set_input(device, "mouse", devname);