Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: patches/03_enable_ptp_support.patch

Issue 2364793002: Revert "Uprev libmtp to 1.1.12" (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libmtp@master
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 diff --git a/src/libusb1-glue.c b/src/libusb1-glue.c 1 Index: src/libusb1-glue.c
2 index 45572f7..187c485 100644 2 ===================================================================
3 --- a/src/libusb1-glue.c 3 --- src/libusb1-glue.c» (revision 148597)
4 +++ b/src/libusb1-glue.c 4 +++ src/libusb1-glue.c» (working copy)
5 @@ -221,15 +221,15 @@ static void free_mtpdevice_list(mtpdevice_list_t *devlist) 5 @@ -197,15 +197,15 @@
6 } 6 }
7 7
8 /** 8 /**
9 - * This checks if a device has an MTP descriptor. The descriptor was 9 - * This checks if a device has an MTP descriptor. The descriptor was
10 - * elaborated about in gPhoto bug 1482084, and some official documentation 10 - * elaborated about in gPhoto bug 1482084, and some official documentation
11 - * with no strings attached was published by Microsoft at 11 - * with no strings attached was published by Microsoft at
12 + * This checks if a device is a PTP device or has an MTP descriptor. The 12 + * This checks if a device is a PTP device or has an MTP descriptor. The
13 + * descriptor was elaborated about in gPhoto bug 1482084, and some official 13 + * descriptor was elaborated about in gPhoto bug 1482084, and some official
14 + * documentation with no strings attached was published by Microsoft at 14 + * documentation with no strings attached was published by Microsoft at
15 * http://www.microsoft.com/whdc/system/bus/USB/USBFAQ_intermed.mspx#E3HAC 15 * http://www.microsoft.com/whdc/system/bus/USB/USBFAQ_intermed.mspx#E3HAC
16 * 16 *
17 * @param dev a device struct from libusb. 17 * @param dev a device struct from libusb.
18 * @param dumpfile set to non-NULL to make the descriptors dump out 18 * @param dumpfile set to non-NULL to make the descriptors dump out
19 * to this file in human-readable hex so we can scruitinze them. 19 * to this file in human-readable hex so we can scruitinze them.
20 - * @return 1 if the device is MTP compliant, 0 if not. 20 - * @return 1 if the device is MTP compliant, 0 if not.
21 + * @return 1 if the device is PTP or MTP compliant, 0 if not. 21 + * @return 1 if the device is PTP or MTP compliant, 0 if not.
22 */ 22 */
23 static int probe_device_descriptor(libusb_device *dev, FILE *dumpfile) 23 static int probe_device_descriptor(libusb_device *dev, FILE *dumpfile)
24 { 24 {
25 @@ -313,7 +313,6 @@ static int probe_device_descriptor(libusb_device *dev, FILE *dumpfile) 25 @@ -289,7 +289,6 @@
26 » * TODO: Check for Still Image Capture class with PIMA 15740 26 » * Check for Still Image Capture class with PIMA 15740 protocol,
27 » * protocol, also known as PTP 27 » * also known as PTP
28 */ 28 */
29 -#if 0 29 -#if 0
30 if (intf->bInterfaceClass == LIBUSB_CLASS_PTP 30 if (intf->bInterfaceClass == LIBUSB_CLASS_PTP
31 && intf->bInterfaceSubClass == 0x01 31 && intf->bInterfaceSubClass == 0x01
32 && intf->bInterfaceProtocol == 0x01) { 32 && intf->bInterfaceProtocol == 0x01) {
33 @@ -322,17 +321,9 @@ static int probe_device_descriptor(libusb_device *dev, FILE *dumpfile) 33 @@ -297,17 +296,9 @@
34 fprintf(dumpfile, " Found PTP device, check vendor " 34 fprintf(dumpfile, " Found PTP device, check vendor "
35 "extension...\n"); 35 "extension...\n");
36 } 36 }
37 - /* 37 - /*
38 - * This is where we may insert code to open a PTP 38 - * This is where we may insert code to open a PTP
39 - * session and query the vendor extension ID to see 39 - * session and query the vendor extension ID to see
40 - * if it is 0xffffffff, i.e. MTP according to the spec. 40 - * if it is 0xffffffff, i.e. MTP according to the spec.
41 - */ 41 - */
42 - if (was_mtp_extension) { 42 - if (was_mtp_extension) {
43 - libusb_close(devh); 43 - libusb_close(devh);
44 - return 1; 44 - return 1;
45 - } 45 - }
46 + libusb_close(devh); 46 + libusb_close(devh);
47 + return 1; 47 + return 1;
48 } 48 }
49 -#endif 49 -#endif
50 50
51 /* 51 /*
52 * Next we search for the MTP substring in the interface name. 52 * Next we search for the MTP substring in the interface name.
OLDNEW
« no previous file with comments | « patches/02_check_ptp_operation_support.patch ('k') | patches/04_parse_extension_descriptor_null_check.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698