diff options
Diffstat (limited to 'tools/idevicebackup2.c')
-rw-r--r-- | tools/idevicebackup2.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index 82dc90d..c73b269 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <libimobiledevice/sbservices.h> | 47 | #include <libimobiledevice/sbservices.h> |
48 | #include <libimobiledevice/diagnostics_relay.h> | 48 | #include <libimobiledevice/diagnostics_relay.h> |
49 | #include <libimobiledevice-glue/utils.h> | 49 | #include <libimobiledevice-glue/utils.h> |
50 | #include <plist/plist.h> | ||
50 | 51 | ||
51 | #include <endianness.h> | 52 | #include <endianness.h> |
52 | 53 | ||
@@ -606,7 +607,7 @@ static int mb2_status_check_snapshot_state(const char *path, const char *udid, c | |||
606 | plist_t status_plist = NULL; | 607 | plist_t status_plist = NULL; |
607 | char *file_path = string_build_path(path, udid, "Status.plist", NULL); | 608 | char *file_path = string_build_path(path, udid, "Status.plist", NULL); |
608 | 609 | ||
609 | plist_read_from_filename(&status_plist, file_path); | 610 | plist_read_from_file(file_path, &status_plist, NULL); |
610 | free(file_path); | 611 | free(file_path); |
611 | if (!status_plist) { | 612 | if (!status_plist) { |
612 | printf("Could not read Status.plist!\n"); | 613 | printf("Could not read Status.plist!\n"); |
@@ -1780,7 +1781,7 @@ int main(int argc, char *argv[]) | |||
1780 | free(info_path); | 1781 | free(info_path); |
1781 | } | 1782 | } |
1782 | plist_t manifest_plist = NULL; | 1783 | plist_t manifest_plist = NULL; |
1783 | plist_read_from_filename(&manifest_plist, manifest_path); | 1784 | plist_read_from_file(manifest_path, &manifest_plist, NULL); |
1784 | if (!manifest_plist) { | 1785 | if (!manifest_plist) { |
1785 | idevice_free(device); | 1786 | idevice_free(device); |
1786 | free(info_path); | 1787 | free(info_path); |
@@ -1936,7 +1937,7 @@ int main(int argc, char *argv[]) | |||
1936 | /* verify existing Info.plist */ | 1937 | /* verify existing Info.plist */ |
1937 | if (info_path && (stat(info_path, &st) == 0) && cmd != CMD_CLOUD) { | 1938 | if (info_path && (stat(info_path, &st) == 0) && cmd != CMD_CLOUD) { |
1938 | PRINT_VERBOSE(1, "Reading Info.plist from backup.\n"); | 1939 | PRINT_VERBOSE(1, "Reading Info.plist from backup.\n"); |
1939 | plist_read_from_filename(&info_plist, info_path); | 1940 | plist_read_from_file(info_path, &info_plist, NULL); |
1940 | 1941 | ||
1941 | if (!info_plist) { | 1942 | if (!info_plist) { |
1942 | printf("Could not read Info.plist\n"); | 1943 | printf("Could not read Info.plist\n"); |
@@ -2030,7 +2031,7 @@ checkpoint: | |||
2030 | cmd = CMD_LEAVE; | 2031 | cmd = CMD_LEAVE; |
2031 | } | 2032 | } |
2032 | remove_file(info_path); | 2033 | remove_file(info_path); |
2033 | plist_write_to_filename(info_plist, info_path, PLIST_FORMAT_XML); | 2034 | plist_write_to_file(info_plist, info_path, PLIST_FORMAT_XML, 0); |
2034 | free(info_path); | 2035 | free(info_path); |
2035 | 2036 | ||
2036 | plist_free(info_plist); | 2037 | plist_free(info_plist); |