summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--irecovery.c6
-rw-r--r--libirecovery.c7
2 files changed, 8 insertions, 5 deletions
diff --git a/irecovery.c b/irecovery.c
index 78692c6..40e6021 100644
--- a/irecovery.c
+++ b/irecovery.c
@@ -1,7 +1,8 @@
1/** 1/**
2 * GreenPois0n iRecovery - irecovery.c 2 * GreenPois0n iRecovery - irecovery.c
3 * Copyright (C) 2010 Chronic-Dev Team 3 * Copyright (C) 2010-2011 Chronic-Dev Team
4 * Copyright (C) 2010 Joshua Hill 4 * Copyright (C) 2010-2011 Joshua Hill
5 * Copyright (C) 2008-2011 Nicolas Haunold
5 * 6 *
6 * This program is free software: you can redistribute it and/or modify 7 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -20,6 +21,7 @@
20#include <stdio.h> 21#include <stdio.h>
21#include <stdlib.h> 22#include <stdlib.h>
22#include <unistd.h> 23#include <unistd.h>
24#include <string.h>
23#include <libirecovery.h> 25#include <libirecovery.h>
24#include <readline/readline.h> 26#include <readline/readline.h>
25#include <readline/history.h> 27#include <readline/history.h>
diff --git a/libirecovery.c b/libirecovery.c
index a323386..84c7b6f 100644
--- a/libirecovery.c
+++ b/libirecovery.c
@@ -2,6 +2,7 @@
2 * GreenPois0n iRecovery - libirecovery.c 2 * GreenPois0n iRecovery - libirecovery.c
3 * Copyright (C) 2010 Chronic-Dev Team 3 * Copyright (C) 2010 Chronic-Dev Team
4 * Copyright (C) 2010 Joshua Hill 4 * Copyright (C) 2010 Joshua Hill
5 * Copyright (C) 2008-2011 Nicolas Haunold
5 * 6 *
6 * This program is free software: you can redistribute it and/or modify 7 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -39,7 +40,7 @@ static int libirecovery_debug = 0;
39#ifndef WIN32 40#ifndef WIN32
40static libusb_context* libirecovery_context = NULL; 41static libusb_context* libirecovery_context = NULL;
41#endif 42#endif
42 43
43int irecv_write_file(const char* filename, const void* data, size_t size); 44int irecv_write_file(const char* filename, const void* data, size_t size);
44int irecv_read_file(const char* filename, char** data, uint32_t* size); 45int irecv_read_file(const char* filename, char** data, uint32_t* size);
45 46
@@ -62,14 +63,14 @@ void mobiledevice_closepipes(irecv_client_t client);
62 63
63irecv_error_t mobiledevice_connect(irecv_client_t* client) { 64irecv_error_t mobiledevice_connect(irecv_client_t* client) {
64 irecv_error_t ret; 65 irecv_error_t ret;
65 66
66 SP_DEVICE_INTERFACE_DATA currentInterface; 67 SP_DEVICE_INTERFACE_DATA currentInterface;
67 HDEVINFO usbDevices; 68 HDEVINFO usbDevices;
68 DWORD i; 69 DWORD i;
69 LPSTR path; 70 LPSTR path;
70 irecv_client_t _client = (irecv_client_t) malloc(sizeof(struct irecv_client)); 71 irecv_client_t _client = (irecv_client_t) malloc(sizeof(struct irecv_client));
71 memset(_client, 0, sizeof(struct irecv_client)); 72 memset(_client, 0, sizeof(struct irecv_client));
72 73
73 // Get DFU paths 74 // Get DFU paths
74 usbDevices = SetupDiGetClassDevs(&GUID_DEVINTERFACE_DFU, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE); 75 usbDevices = SetupDiGetClassDevs(&GUID_DEVINTERFACE_DFU, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
75 if(!usbDevices) { 76 if(!usbDevices) {