OLD | NEW |
1 /** | 1 /** |
2 * \file filetree.c | 2 * \file filetree.c |
3 * List all files and folders of all storages recursively | 3 * List all files and folders of all storages recursively |
4 * | 4 * |
5 * Copyright (C) 2011 Linus Walleij <triad@df.lth.se> | 5 * Copyright (C) 2011 Linus Walleij <triad@df.lth.se> |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 LIBMTP_error_number_t err; | 70 LIBMTP_error_number_t err; |
71 int i; | 71 int i; |
72 | 72 |
73 int opt; | 73 int opt; |
74 extern int optind; | 74 extern int optind; |
75 extern char *optarg; | 75 extern char *optarg; |
76 | 76 |
77 while ((opt = getopt(argc, argv, "d")) != -1 ) { | 77 while ((opt = getopt(argc, argv, "d")) != -1 ) { |
78 switch (opt) { | 78 switch (opt) { |
79 case 'd': | 79 case 'd': |
80 LIBMTP_Set_Debug(LIBMTP_DEBUG_ALL); | 80 LIBMTP_Set_Debug(LIBMTP_DEBUG_PTP | LIBMTP_DEBUG_DATA); |
81 break; | 81 break; |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 argc -= optind; | 85 argc -= optind; |
86 argv += optind; | 86 argv += optind; |
87 | 87 |
88 LIBMTP_Init(); | 88 LIBMTP_Init(); |
89 | 89 |
90 err = LIBMTP_Detect_Raw_Devices(&rawdevices, &numrawdevices); | 90 err = LIBMTP_Detect_Raw_Devices(&rawdevices, &numrawdevices); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 bailout: | 147 bailout: |
148 LIBMTP_Release_Device(device); | 148 LIBMTP_Release_Device(device); |
149 } /* End For Loop */ | 149 } /* End For Loop */ |
150 | 150 |
151 free(rawdevices); | 151 free(rawdevices); |
152 | 152 |
153 printf("OK.\n"); | 153 printf("OK.\n"); |
154 | 154 |
155 return 0; | 155 return 0; |
156 } | 156 } |
OLD | NEW |