diff options
-rw-r--r-- | sysutils/hal/files/patch-hald_freebsd_hf-usb2.c | 20 | ||||
-rw-r--r-- | sysutils/hal/files/patch-hald_freebsd_probing_probe-video4linux.c | 13 |
2 files changed, 13 insertions, 20 deletions
diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-usb2.c b/sysutils/hal/files/patch-hald_freebsd_hf-usb2.c index ad717f941..63ed62528 100644 --- a/sysutils/hal/files/patch-hald_freebsd_hf-usb2.c +++ b/sysutils/hal/files/patch-hald_freebsd_hf-usb2.c @@ -1,5 +1,5 @@ --- hald/freebsd/hf-usb2.c.orig 2009-08-24 08:42:29.000000000 -0400 -+++ hald/freebsd/hf-usb2.c 2010-02-19 22:53:40.000000000 -0500 ++++ hald/freebsd/hf-usb2.c 2010-02-21 14:54:07.000000000 -0500 @@ -42,22 +42,6 @@ static struct libusb20_backend *hf_usb2_be = NULL; @@ -48,21 +48,19 @@ hf_runner_run_sync(device, 0, "hald-probe-mouse", NULL); } else if (! strcmp(driver, "uhid")) -@@ -133,6 +117,13 @@ hf_usb2_probe_interfaces(HalDevice *pare +@@ -133,6 +117,11 @@ hf_usb2_probe_interfaces(HalDevice *pare hf_usb_add_webcam_properties(device); } } + else + { -+#if __FreeBSD_version >= 800064 + /* Try and detect webcamd devices. */ + hf_runner_run_sync(device, 0, "hald-probe-video4linux", NULL); -+#endif + } hf_usb_device_compute_udi(device); hf_device_add(device); -@@ -192,11 +183,12 @@ hf_usb2_probe (void) +@@ -192,11 +181,12 @@ hf_usb2_probe (void) addr = libusb20_dev_get_address(pdev); if (addr == 1) @@ -77,7 +75,7 @@ if (! parent || hal_device_property_get_bool(parent, "info.ignore")) continue; -@@ -216,7 +208,13 @@ hf_usb2_devd_add (const char *name, +@@ -216,7 +206,13 @@ hf_usb2_devd_add (const char *name, HalDevice *parent_device; int bus, addr, pbus, paddr; @@ -92,7 +90,7 @@ return FALSE; else if (strncmp(parent, "ugen", strlen("ugen"))) return TRUE; -@@ -232,7 +230,8 @@ hf_usb2_devd_add (const char *name, +@@ -232,7 +228,8 @@ hf_usb2_devd_add (const char *name, parent_device = hf_device_store_match(hald_get_gdl(), "usb_device.bus_number", HAL_PROPERTY_TYPE_INT32, pbus, @@ -102,7 +100,7 @@ if (parent_device && ! hal_device_property_get_bool(parent_device, "info.ignore")) -@@ -255,8 +254,6 @@ hf_usb2_devd_remove (const char *name, +@@ -255,8 +252,6 @@ hf_usb2_devd_remove (const char *name, if (strncmp(name, "ugen", strlen("ugen"))) return FALSE; @@ -111,7 +109,7 @@ if (sscanf(name, "ugen%i.%i", &bus, &addr) != 2) return FALSE; -@@ -265,7 +262,8 @@ hf_usb2_devd_remove (const char *name, +@@ -265,7 +260,8 @@ hf_usb2_devd_remove (const char *name, device = hf_device_store_match(hald_get_gdl(), "usb_device.bus_number", HAL_PROPERTY_TYPE_INT32, bus, "usb_device.port_number", @@ -121,7 +119,7 @@ if (device) { -@@ -276,6 +274,23 @@ hf_usb2_devd_remove (const char *name, +@@ -276,6 +272,23 @@ hf_usb2_devd_remove (const char *name, return FALSE; } @@ -145,7 +143,7 @@ HFHandler hf_usb2_handler = { .privileged_init = hf_usb2_privileged_init, .probe = hf_usb2_probe -@@ -283,5 +298,6 @@ HFHandler hf_usb2_handler = { +@@ -283,5 +296,6 @@ HFHandler hf_usb2_handler = { HFDevdHandler hf_usb2_devd_handler = { .add = hf_usb2_devd_add, diff --git a/sysutils/hal/files/patch-hald_freebsd_probing_probe-video4linux.c b/sysutils/hal/files/patch-hald_freebsd_probing_probe-video4linux.c index 6b6178488..83fe65b85 100644 --- a/sysutils/hal/files/patch-hald_freebsd_probing_probe-video4linux.c +++ b/sysutils/hal/files/patch-hald_freebsd_probing_probe-video4linux.c @@ -1,8 +1,8 @@ ---- hald/freebsd/probing/probe-video4linux.c.orig 2010-02-20 10:53:06.000000000 +0100 -+++ hald/freebsd/probing/probe-video4linux.c 2010-02-20 10:53:31.000000000 +0100 -@@ -0,0 +1,230 @@ +--- hald/freebsd/probing/probe-video4linux.c.orig 2010-02-21 14:51:01.000000000 -0500 ++++ hald/freebsd/probing/probe-video4linux.c 2010-02-21 14:54:51.000000000 -0500 +@@ -0,0 +1,225 @@ +/*************************************************************************** -+ * CVSID: $Id: patch-hald_freebsd_probing_probe-video4linux.c,v 1.3 2010-02-20 09:56:32 kwm Exp $ ++ * CVSID: $Id: patch-hald_freebsd_probing_probe-video4linux.c,v 1.4 2010-02-21 19:57:47 marcus Exp $ + * + * probe-video4linux.c : Probe video4linux devices + * Adapted for FreeBSD by : Joe Marcus Clarke <marcus@FreeBSD.org> @@ -31,7 +31,6 @@ +# include <config.h> +#endif + -+#include <sys/param.h> +#include <sys/types.h> +#include <sys/user.h> +#include <sys/sysctl.h> @@ -50,7 +49,6 @@ + +#include "../libprobe/hfp.h" + -+#if __FreeBSD_version >= 800064 +#define WEBCAMD_PID_FILE "/var/run/webcamd" +#define V4B_DEVICES_MAX 10 /* XXX from video4bsd.h */ + @@ -102,13 +100,11 @@ + + return i; +} -+#endif + +int +main (int argc, char **argv) +{ + int ret = 1; -+#if __FreeBSD_version >= 800064 + int fd = -1; + int unit = -1; + int bus = -1; @@ -227,7 +223,6 @@ + if (fd >= 0) + close (fd); + -+#endif + return ret; +} + |