[patch] hal-hotplug-map fixes for debians libgphoto2

Sjoerd Simons sjoerd at luon.net
Sat Sep 25 05:52:28 PDT 2004


Hi,

  Since a few days debians libgphoto2 also ships the an usb usermap. Attaches
  patch makes hal work with this :)

  Sjoerd
-- 
All life evolves by the differential survival of replicating entities.
		-- Dawkins
-------------- next part --------------
Index: tools/linux/hal_hotplug_map.c
===================================================================
RCS file: /cvs/hal/hal/tools/linux/hal_hotplug_map.c,v
retrieving revision 1.2
diff -u -r1.2 hal_hotplug_map.c
--- tools/linux/hal_hotplug_map.c	25 Aug 2004 21:06:45 -0000	1.2
+++ tools/linux/hal_hotplug_map.c	25 Sep 2004 12:45:49 -0000
@@ -19,7 +19,7 @@
 #define dbg(...) do {if (verbose) fprintf (stderr, __VA_ARGS__);} while (0)
 
 /* @todo FIXME HACK: it's a hack to hardcode this */
-static const char *usbmapfiles[] = {"/etc/hotplug/usb.usermap", "/etc/hotplug/usb/libsane.usermap", NULL};
+static const char *usbmapfiles[] = {"/etc/hotplug/usb.usermap", "/etc/hotplug/usb/libsane.usermap", "/etc/hotplug/usb/libgphoto2.usermap",  NULL};
 
 static int
 handle_usb_found (const char *module)
@@ -35,7 +35,7 @@
 	if (hal_context == NULL)
 		return FALSE;
 
-	if (strcmp (module, "usbcam") == 0) {
+	if (strcmp (module, "usbcam") == 0 || strcmp(module, "libgphoto2") == 0) {
 		hal_device_add_capability (hal_context, udi, "camera");
 		hal_device_set_property_string (hal_context, udi, "info.category", "camera");
 		hal_device_set_property_string (hal_context, udi, "camera.access_method", "user");
-------------- next part --------------
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal


More information about the Hal mailing list