summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2014-01-08 20:24:36 +0000
committerMarcus Meissner <marcus@jet.franken.de>2014-01-08 20:24:36 +0000
commit3b2e8b92b4fcf0fdc5662abfbe266cf9ef1feeef (patch)
tree83fcdd171a7e5414330c6a9c671844119dfa41fb /packaging
parent9d286eca2a10082ee558f1d2cd6e1ff48058a140 (diff)
downloadlibgphoto2-3b2e8b92b4fcf0fdc5662abfbe266cf9ef1feeef.tar.gz
Only emit the interface matcher for ptp in hwdb
Emit hwdb list only once. set the type to PTP if the driver is ptp2. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14682 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'packaging')
-rw-r--r--packaging/generic/print-camera-list.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/packaging/generic/print-camera-list.c b/packaging/generic/print-camera-list.c
index e592481f1..41b57d4a2 100644
--- a/packaging/generic/print-camera-list.c
+++ b/packaging/generic/print-camera-list.c
@@ -780,9 +780,9 @@ hwdb_camera_func (const func_params_t *params,
if (flags & GP_USB_HOTPLUG_MATCH_INT_CLASS) {
if ((flags & (GP_USB_HOTPLUG_MATCH_INT_CLASS|GP_USB_HOTPLUG_MATCH_INT_SUBCLASS|GP_USB_HOTPLUG_MATCH_INT_PROTOCOL)) == (GP_USB_HOTPLUG_MATCH_INT_CLASS|GP_USB_HOTPLUG_MATCH_INT_SUBCLASS|GP_USB_HOTPLUG_MATCH_INT_PROTOCOL)) {
/* device class matcher ... */
- printf("usb:v*p*d*dc%02ddsc%02dp%02d*\"\n GPHOTO2_DRIVER=PTP\n", class, subclass, proto);
- /* interface class matcher, ptp is a interface */
- printf("usb:v*p*d*ic%02disc%02ip%02d*\"\n GPHOTO2_DRIVER=PTP\n", class, subclass, proto);
+ /*printf("usb:v*p*d*dc%02ddsc%02dp%02d*\"\n GPHOTO2_DRIVER=PTP\n", class, subclass, proto);*/
+ /* but we need an interface class matcher, ptp is a interface */
+ printf("usb:v*p*d*ic%02disc%02ip%02d*\n GPHOTO2_DRIVER=PTP\n", class, subclass, proto);
has_valid_rule = 1;
} else {
if (class == 666) {
@@ -793,7 +793,10 @@ hwdb_camera_func (const func_params_t *params,
}
} else {
if (flags & GP_USB_HOTPLUG_MATCH_VENDOR_ID) {
- printf ("usb:v%04Xp%04X*\n GPHOTO2_DRIVER=proprietary\n", usb_vendor, usb_product);
+ if (strstr(a->library, "ptp"))
+ printf ("usb:v%04Xp%04X*\n GPHOTO2_DRIVER=PTP\n", usb_vendor, usb_product);
+ else
+ printf ("usb:v%04Xp%04X*\n GPHOTO2_DRIVER=proprietary\n", usb_vendor, usb_product);
has_valid_rule = 1;
} else {
fprintf (stderr, "Error: Trying to output device %d/%d with incorrect match flags.\n",
@@ -1573,7 +1576,7 @@ static const output_format_t formats[] = {
hwdb_begin_func,
hwdb_camera_func,
NULL,
- hwdb_camera_func,
+ NULL,
empty_end_func
},
{"html",