diff options
author | 2017-02-09 00:37:06 +0100 | |
---|---|---|
committer | 2017-11-13 22:12:44 +0100 | |
commit | a87ce4efcbdb9ad3aff3eb52ee9fd9da8e4ab922 (patch) | |
tree | 78dba41813b8037db98212a8647ec4bf940b2fc7 /src/idevicerestore.h | |
parent | 08d610d5811ed0aa3fecf48ff9e9cee2190b1981 (diff) | |
download | idevicerestore-a87ce4efcbdb9ad3aff3eb52ee9fd9da8e4ab922.tar.gz idevicerestore-a87ce4efcbdb9ad3aff3eb52ee9fd9da8e4ab922.tar.bz2 |
Change check_hardware_model() to get_irecv_device()
The check_hardware_model() function has a misleading name. It returns
a string with the hardware model but this is not used. Instead, this
function is only called for its side effect to initialise an irecv
device in the passed client struct which it creates from the hardware
model name returned by mode specific implementations. But these mode
specific implementations already create an irecv device to get the
hardware model name so instead of going through this unnecessary
complication just return the irecv device directly and rename the
function accordingly to make this clear. (This may also prevent
leaking an irecv device in the mode specific functions.)
Diffstat (limited to 'src/idevicerestore.h')
-rw-r--r-- | src/idevicerestore.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/idevicerestore.h b/src/idevicerestore.h index 54009a7..0338dde 100644 --- a/src/idevicerestore.h +++ b/src/idevicerestore.h @@ -31,6 +31,7 @@ extern "C" { #include <stdio.h> #include <stdint.h> #include <plist/plist.h> +#include <libirecovery.h> // the flag with value 1 is reserved for internal use only. don't use it. #define FLAG_DEBUG 1 << 1 @@ -74,7 +75,7 @@ const char* idevicerestore_get_error(void); void usage(int argc, char* argv[]); int check_mode(struct idevicerestore_client_t* client); -const char* check_hardware_model(struct idevicerestore_client_t* client); +irecv_device_t get_irecv_device(struct idevicerestore_client_t* client); int get_ecid(struct idevicerestore_client_t* client, uint64_t* ecid); int is_image4_supported(struct idevicerestore_client_t* client); int get_ap_nonce(struct idevicerestore_client_t* client, unsigned char** nonce, int* nonce_size); |