hal/tools/linux hal_hotplug_map.c,1.2,1.3

David Zeuthen david at freedesktop.org
Mon Sep 27 07:52:13 PDT 2004


Update of /cvs/hal/hal/tools/linux
In directory gabe:/tmp/cvs-serv8581/tools/linux

Modified Files:
	hal_hotplug_map.c 
Log Message:
2004-09-27  David Zeuthen  <david at fubar.dk>

	Patch from Sjoerd Simons <sjoerd at luon.net>.

	* tools/linux/hal_hotplug_map.c: 
	Since a few days debians libgphoto2 also ships the an usb
	usermap. Attaches patch makes hal work with this :)



Index: hal_hotplug_map.c
===================================================================
RCS file: /cvs/hal/hal/tools/linux/hal_hotplug_map.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- hal_hotplug_map.c	25 Aug 2004 21:06:45 -0000	1.2
+++ hal_hotplug_map.c	27 Sep 2004 14:52:11 -0000	1.3
@@ -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");




More information about the hal-commit mailing list