Contents of /trunk/libgphoto2/patches/libgphoto2-2.3.1-udev-rules-fix.patch
Parent Directory | Revision Log
Revision 144 -
(show annotations)
(download)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 1229 byte(s)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 1229 byte(s)
-import
1 | diff -Nur libgphoto2-2.3.1/packaging/generic/print-camera-list.c libgphoto2-2.3.1-udev-fix/packaging/generic/print-camera-list.c |
2 | --- libgphoto2-2.3.1/packaging/generic/print-camera-list.c 2006-12-24 10:16:19.000000000 -0500 |
3 | +++ libgphoto2-2.3.1-udev-fix/packaging/generic/print-camera-list.c 2007-01-31 10:39:12.000000000 -0500 |
4 | @@ -299,7 +299,7 @@ |
5 | /* Note: 2 lines because we need to use || ... having them on the same |
6 | * line would mean &&. |
7 | */ |
8 | - printf ("SUBSYSTEM!=\"usb*\", GOTO=\"libgphoto2_rules_end\"\n"); |
9 | + printf ("SUBSYSTEM!=\"usb_device\", GOTO=\"libgphoto2_rules_end\"\n"); |
10 | printf ("ACTION!=\"add\", GOTO=\"libgphoto2_rules_end\"\n\n"); |
11 | return 0; |
12 | } |
13 | @@ -479,9 +479,14 @@ |
14 | else |
15 | fprintf(stderr,"unhandled interface match flags %x\n", flags); |
16 | } |
17 | - } else { |
18 | + } else if (flags & GP_USB_HOTPLUG_MATCH_VENDOR_ID) { |
19 | + |
20 | printf ("ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ", |
21 | a->usb_vendor, a->usb_product); |
22 | + } else { |
23 | + fprintf(stderr, "Attempted to output rule for Camera: \"%s\" , Vendor: \"%04x\" , Product: \"%04x\"", |
24 | + a->model, a->usb_vendor, a->usb_product); |
25 | + return 0; |
26 | } |
27 | if ((*params->argv)[1] == NULL) { |
28 | const char *hotplug_script = ((*params->argv)[0] != NULL) |