diff options
author | Joshua Hill | 2010-06-04 23:17:05 -0400 |
---|---|---|
committer | Joshua Hill | 2010-06-04 23:17:05 -0400 |
commit | 0966c00988477450691c8c9bce47a3fb30eff6da (patch) | |
tree | 73a8cf475e0fb13ba8957fb3a696b7340f5cba9c /src/normal.c | |
parent | 7e9d37959d7db900528d68d44445509f4abc6fdf (diff) | |
download | idevicerestore-0966c00988477450691c8c9bce47a3fb30eff6da.tar.gz idevicerestore-0966c00988477450691c8c9bce47a3fb30eff6da.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.c | 13 |
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; } |