From 546e75e3ab6c27b0696da47c2b93dfbd5ea0c876 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 17 Jul 2012 01:37:42 +0200 Subject: ipsw: change get_latest_fw to ipsw_get_latest_fw and make it public --- src/ipsw.c | 4 ++-- src/ipsw.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ipsw.c b/src/ipsw.c index 7052e8c..4389c54 100644 --- a/src/ipsw.c +++ b/src/ipsw.c @@ -222,7 +222,7 @@ void ipsw_close(ipsw_archive* archive) { } } -static int get_latest_fw(plist_t version_data, const char* product, char** fwurl, unsigned char* sha1buf) +int ipsw_get_latest_fw(plist_t version_data, const char* product, char** fwurl, unsigned char* sha1buf) { *fwurl = NULL; memset(sha1buf, '\0', 20); @@ -394,7 +394,7 @@ int ipsw_download_latest_fw(plist_t version_data, const char* product, const cha *ipswfile = NULL; - if ((get_latest_fw(version_data, product, &fwurl, isha1) < 0) || !fwurl) { + if ((ipsw_get_latest_fw(version_data, product, &fwurl, isha1) < 0) || !fwurl) { error("ERROR: can't get URL for latest firmware\n"); return -1; } diff --git a/src/ipsw.h b/src/ipsw.h index ab320be..c61e73d 100644 --- a/src/ipsw.h +++ b/src/ipsw.h @@ -42,6 +42,7 @@ int ipsw_extract_build_manifest(const char* ipsw, plist_t* buildmanifest, int *t int ipsw_extract_restore_plist(const char* ipsw, plist_t* restore_plist); void ipsw_free_file(ipsw_file* file); +int ipsw_get_latest_fw(plist_t version_data, const char* product, char** fwurl, unsigned char* sha1buf); int ipsw_download_latest_fw(plist_t version_data, const char* product, const char* todir, char** ipswfile); #ifdef __cplusplus -- cgit v1.1-32-gdbae