HAL port needs minor update after recent USB patch in 9-current

Hans Petter Selasky hselasky at c2i.net
Fri May 20 11:07:27 UTC 2011


Hi,

USB is using a new scheme for DEVD events and I noticed that HALD needs to be 
update a bit. See attached patch.

Currently HALD is not working properly with USB devices in 9-current.

Who can handle this?

--HPS
-------------- next part --------------
--- files/patch-hald_freebsd_hf-usb2.c.orig	2011-05-19 14:28:36.000000000 +0200
+++ files/patch-hald_freebsd_hf-usb2.c	2011-05-19 14:30:35.000000000 +0200
@@ -129,17 +129,17 @@
 +		     const char *type,
 +		     const char *data)
 +{
-+  if (! data || strcmp(system, "DEVFS") || strcmp(subsystem, "CDEV") ||
-+      (strcmp(type, "CREATE") && strcmp(type, "DESTROY")))
++  if (! data || strcmp(system, "USB") || strcmp(subsystem, "DEVICE") ||
++      (strcmp(type, "ATTACH") && strcmp(type, "DETACH")))
 +    return FALSE;
 +
-+  if (strstr(data, "cdev=ugen") != NULL ||
-+      strstr(data, "cdev=usb") != NULL)
-+    return TRUE;
-+
-+  return FALSE;
++  return TRUE;
 +}
 +
++
++
++
++
  HFHandler hf_usb2_handler = {
    .privileged_init	= hf_usb2_privileged_init,
    .probe		= hf_usb2_probe


More information about the freebsd-gnome mailing list