From fd719c0e287d56d9ce7ac5b96a499b18159c3550 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 2 Feb 2012 23:02:56 +0100 Subject: ipsw: add ipsw_extract_restore_plist --- src/ipsw.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/ipsw.c') diff --git a/src/ipsw.c b/src/ipsw.c index 19cf924..b9ebdff 100644 --- a/src/ipsw.c +++ b/src/ipsw.c @@ -200,6 +200,18 @@ int ipsw_extract_build_manifest(const char* ipsw, plist_t* buildmanifest, int *t return -1; } +int ipsw_extract_restore_plist(const char* ipsw, plist_t* restore_plist) { + int size = 0; + char* data = NULL; + + if (ipsw_extract_to_memory(ipsw, "Restore.plist", &data, &size) == 0) { + plist_from_xml(data, size, restore_plist); + return 0; + } + + return -1; +} + void ipsw_close(ipsw_archive* archive) { if (archive != NULL) { zip_unchange_all(archive->zip); -- cgit v1.1-32-gdbae