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

Side by Side Diff: examples/detect.c

Issue 11358153: Update libmtp from pre 1.1.4 git to 1.1.5 release. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libmtp/
Patch Set: disable mptz Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 /** 1 /**
2 * \file detect.c 2 * \file detect.c
3 * Example program to detect a device and list capabilities. 3 * Example program to detect a device and list capabilities.
4 * 4 *
5 * Copyright (C) 2005-2008 Linus Walleij <triad@df.lth.se> 5 * Copyright (C) 2005-2008 Linus Walleij <triad@df.lth.se>
6 * Copyright (C) 2007 Ted Bullock <tbullock@canada.com> 6 * Copyright (C) 2007 Ted Bullock <tbullock@canada.com>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 LIBMTP_error_number_t err; 64 LIBMTP_error_number_t err;
65 int i; 65 int i;
66 66
67 int opt; 67 int opt;
68 extern int optind; 68 extern int optind;
69 extern char *optarg; 69 extern char *optarg;
70 70
71 while ((opt = getopt(argc, argv, "d")) != -1 ) { 71 while ((opt = getopt(argc, argv, "d")) != -1 ) {
72 switch (opt) { 72 switch (opt) {
73 case 'd': 73 case 'd':
74 LIBMTP_Set_Debug(LIBMTP_DEBUG_ALL); 74 LIBMTP_Set_Debug(LIBMTP_DEBUG_PTP | LIBMTP_DEBUG_DATA);
75 break; 75 break;
76 } 76 }
77 } 77 }
78 78
79 argc -= optind; 79 argc -= optind;
80 argv += optind; 80 argv += optind;
81 81
82 LIBMTP_Init(); 82 LIBMTP_Init();
83 83
84 fprintf(stdout, "libmtp version: " LIBMTP_VERSION_STRING "\n\n"); 84 fprintf(stdout, "libmtp version: " LIBMTP_VERSION_STRING "\n\n");
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 } 282 }
283 LIBMTP_Release_Device(device); 283 LIBMTP_Release_Device(device);
284 } /* End For Loop */ 284 } /* End For Loop */
285 285
286 free(rawdevices); 286 free(rawdevices);
287 287
288 printf("OK.\n"); 288 printf("OK.\n");
289 289
290 return 0; 290 return 0;
291 } 291 }
OLDNEW
« config.h ('K') | « examples/albums.c ('k') | examples/filetree.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698