summaryrefslogtreecommitdiffstats
path: root/src/dfu.c
diff options
context:
space:
mode:
authorGravatar Joshua Hill2010-06-02 04:13:25 +0800
committerGravatar rcg4u2010-06-09 17:17:06 +0800
commitbab56cf4083c2d0695215ba785019532ffae5749 (patch)
treebcc8ff80fc9152823c5881de9d0163a124d369f1 /src/dfu.c
parent4de6d38c54d9f641006539a06083e423a5d0c9c9 (diff)
downloadidevicerestore-bab56cf4083c2d0695215ba785019532ffae5749.tar.gz
idevicerestore-bab56cf4083c2d0695215ba785019532ffae5749.tar.bz2
Began major refactoring, not quite finished yet, this branch is probably broke
Diffstat (limited to 'src/dfu.c')
-rw-r--r--src/dfu.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/dfu.c b/src/dfu.c
index 5e13f38..1da895d 100644
--- a/src/dfu.c
+++ b/src/dfu.c
@@ -20,9 +20,37 @@
*/
#include <stdint.h>
+#include <libirecovery.h>
#include "dfu.h"
+int dfu_check_mode() {
+ irecv_client_t dfu = NULL;
+ irecv_error_t dfu_error = IRECV_E_SUCCESS;
+
+ dfu_error = irecv_open(&dfu);
+ if (dfu_error != IRECV_E_SUCCESS) {
+ return -1;
+ }
+
+ if(dfu->mode != kDfuMode) {
+ irecv_close(dfu);
+ return -1;
+ }
+
+ irecv_close(dfu);
+ dfu = NULL;
+ return 0;
+}
+
+int dfu_get_cpid(uint32_t* cpid) {
+ return 0;
+}
+
+int dfu_get_bdid(uint32_t* bdid) {
+ return 0;
+}
+
int dfu_get_ecid(uint64_t* ecid) {
return 0;
}