summaryrefslogtreecommitdiffstats
path: root/src/normal.c
diff options
context:
space:
mode:
authorGravatar Joshua Hill2010-06-05 11:17:05 +0800
committerGravatar rcg4u2010-06-09 17:17:28 +0800
commit7f98089a5e6663be50521063cf7171ab1bbc9fa2 (patch)
tree73a8cf475e0fb13ba8957fb3a696b7340f5cba9c /src/normal.c
parent3761295840ba6c7672aebcb2b084a2dbf7099735 (diff)
downloadidevicerestore-7f98089a5e6663be50521063cf7171ab1bbc9fa2.tar.gz
idevicerestore-7f98089a5e6663be50521063cf7171ab1bbc9fa2.tar.bz2
Even more major cleanups and refactoring, this branch is still broken but starting to mature really well
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/normal.c b/src/normal.c
index 3c2bf5c..ab9216c 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -61,7 +61,7 @@ int normal_check_mode(const char* uuid) {
return 0;
}
-int normal_get_device(const char* uuid) {
+int normal_check_device(const char* uuid) {
idevice_t device = NULL;
char* product_type = NULL;
plist_t product_type_node = NULL;
@@ -88,7 +88,8 @@ int normal_get_device(const char* uuid) {
}
if (!product_type_node || plist_get_node_type(product_type_node) != PLIST_STRING) {
- if(product_type_node) plist_free(product_type_node);
+ if (product_type_node)
+ plist_free(product_type_node);
lockdownd_client_free(lockdown);
idevice_free(device);
return -1;
@@ -102,8 +103,8 @@ int normal_get_device(const char* uuid) {
device = NULL;
int i = 0;
- for(i = 0; idevicerestore_products[i] != NULL; i++) {
- if(!strcmp(product_type, idevicerestore_products[i])) {
+ for (i = 0; idevicerestore_products[i] != NULL; i++) {
+ if (!strcmp(product_type, idevicerestore_products[i])) {
idevicerestore_device = i;
break;
}
@@ -146,7 +147,7 @@ int normal_enter_recovery(const char* uuid) {
lockdown = NULL;
device = NULL;
- if(recovery_open_with_timeout(&recovery) < 0) {
+ if (recovery_open_with_timeout(&recovery) < 0) {
error("ERROR: Unable to enter recovery mode\n");
return -1;
}
@@ -187,7 +188,7 @@ int normal_get_ecid(const char* uuid, uint64_t* ecid) {
lockdownd_error_t lockdown_error = IDEVICE_E_SUCCESS;
device_error = idevice_new(&device, uuid);
- if(device_error != IDEVICE_E_SUCCESS) {
+ if (device_error != IDEVICE_E_SUCCESS) {
return -1;
}