--- libgphoto2/libgphoto2/packaging/generic/print-camera-list.c.orig 2010-07-24 20:11:40 +0400 +++ libgphoto2/libgphoto2/packaging/generic/print-camera-list.c 2010-08-20 02:09:15 +0400 @@ -412,9 +412,6 @@ udev_parse_params (const func_params_t * "ENV{ID_USB_INTERFACES}==\"\", IMPORT{program}=\"usb_id --export %%p\"\n" /* ignore mass storage class having devices in mark-up */ "ENV{ID_USB_INTERFACES}==\"*:08*:*\", GOTO=\"libgphoto2_usb_end\"\n" - /* shortcut the most common camera driver, ptp class, so we avoid parsing 1000 - * more rules */ - "ENV{ID_USB_INTERFACES}==\"*:060101:*\", ENV{ID_GPHOTO2}=\"1\", ENV{GPHOTO2_DRIVER}=\"PTP\", GOTO=\"libgphoto2_usb_end\"\n\n" }; static const char * const usbcam_strings[] = { /* UDEV_PRE_0_98 */ @@ -507,6 +504,25 @@ udev_begin_func (const func_params_t *pa print_version_comment(stdout, "# ", "\n", NULL, "#\n"); printf ("# this file is autogenerated, local changes will be LOST on upgrades\n"); printf (pdata->begin_string); + if (pdata->version==UDEV_136) + { + /* shortcut the most common camera driver, ptp class, so we avoid parsing 1000 + * more rules */ + printf ("ENV{ID_USB_INTERFACES}==\"*:060101:*\", ENV{ID_GPHOTO2}=\"1\", ENV{GPHOTO2_DRIVER}=\"PTP\", "); + if (pdata->mode != NULL) { + printf("MODE=\"%s\"", pdata->mode); + printf(", "); + } + if (pdata->owner != NULL) { + printf("OWNER=\"%s\"", pdata->owner); + printf(", "); + } + if (pdata->group != NULL) { + printf("GROUP=\"%s\"", pdata->group); + printf(", "); + } + printf ("GOTO=\"libgphoto2_usb_end\"\n\n"); + } } return 0; }