summaryrefslogtreecommitdiff
path: root/examples/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/files.c')
-rw-r--r--examples/files.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/files.c b/examples/files.c
index 3ee0846..d7d46fe 100644
--- a/examples/files.c
+++ b/examples/files.c
@@ -21,7 +21,6 @@
* Boston, MA 02111-1307, USA.
*/
#include "common.h"
-#include "ptp.h"
#include <stdlib.h>
static void dump_fileinfo(LIBMTP_file_t *file)
@@ -118,8 +117,8 @@ int main(int argc, char **argv)
for (i = 0; i < numrawdevices; i++) {
LIBMTP_mtpdevice_t *device;
LIBMTP_devicestorage_t *storage;
- PTPParams *params;
char *friendlyname;
+ char *serialnr;
device = LIBMTP_Open_Raw_Device_Uncached(&rawdevices[i]);
if (device == NULL) {
@@ -129,13 +128,13 @@ int main(int argc, char **argv)
/* Echo the friendly name so we know which device we are working with */
friendlyname = LIBMTP_Get_Friendlyname(device);
- params = (PTPParams *) device->params;
+ serialnr = LIBMTP_Get_Serialnumber(device);
if (friendlyname == NULL) {
printf("Listing File Information on Device with name: (NULL) [SN:%s]\n",
- params->deviceinfo.SerialNumber);
+ serialnr);
} else {
printf("Listing File Information on Device with name: %s [SN:%s]\n",
- friendlyname, params->deviceinfo.SerialNumber);
+ friendlyname, serialnr);
free(friendlyname);
}