summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-04-21 16:51:26 +0200
committerGravatar Nikias Bassen2023-04-21 16:51:26 +0200
commiteda2c5ea71829f11d69342e6858d09aa53943938 (patch)
tree8bb010c65bb4a1f36cc032a2b40d7d27d414a21d
parent963083be85688206fe52042e8e32602d8139726e (diff)
downloadlibimobiledevice-eda2c5ea71829f11d69342e6858d09aa53943938.tar.gz
libimobiledevice-eda2c5ea71829f11d69342e6858d09aa53943938.tar.bz2
Updated to use latest libplist API changes
-rw-r--r--common/userpref.c2
-rw-r--r--configure.ac2
-rw-r--r--src/lockdown-cu.c2
-rw-r--r--tools/idevicebackup.c23
-rw-r--r--tools/idevicebackup2.c9
-rw-r--r--tools/idevicecrashreport.c2
-rw-r--r--tools/ideviceimagemounter.c41
-rw-r--r--tools/ideviceinfo.c6
-rw-r--r--tools/idevicepair.c5
-rw-r--r--tools/ideviceprovision.c4
10 files changed, 34 insertions, 62 deletions
diff --git a/common/userpref.c b/common/userpref.c
index ddd380a..11e28ba 100644
--- a/common/userpref.c
+++ b/common/userpref.c
@@ -338,7 +338,7 @@ userpref_error_t userpref_read_pair_record(const char *udid, plist_t *pair_recor
338 } 338 }
339 339
340 *pair_record = NULL; 340 *pair_record = NULL;
341 plist_from_memory(record_data, record_size, pair_record); 341 plist_from_memory(record_data, record_size, pair_record, NULL);
342 free(record_data); 342 free(record_data);
343 343
344 if (!*pair_record) { 344 if (!*pair_record) {
diff --git a/configure.ac b/configure.ac
index 503051f..8ba094a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ fi
26 26
27dnl Minimum package versions 27dnl Minimum package versions
28LIBUSBMUXD_VERSION=2.0.2 28LIBUSBMUXD_VERSION=2.0.2
29LIBPLIST_VERSION=2.2.0 29LIBPLIST_VERSION=2.3.0
30LIMD_GLUE_VERSION=1.0.0 30LIMD_GLUE_VERSION=1.0.0
31 31
32AC_SUBST(LIBUSBMUXD_VERSION) 32AC_SUBST(LIBUSBMUXD_VERSION)
diff --git a/src/lockdown-cu.c b/src/lockdown-cu.c
index 61a1c03..d8d7f42 100644
--- a/src/lockdown-cu.c
+++ b/src/lockdown-cu.c
@@ -1032,7 +1032,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_cu_send_request_and_get_reply(l
1032 plist_free(dict); 1032 plist_free(dict);
1033 dict = NULL; 1033 dict = NULL;
1034 1034
1035 plist_from_memory((const char*)decrypted, decrypted_len, &dict); 1035 plist_from_memory((const char*)decrypted, decrypted_len, &dict, NULL);
1036 if (!dict) { 1036 if (!dict) {
1037 ret = LOCKDOWN_E_PLIST_ERROR; 1037 ret = LOCKDOWN_E_PLIST_ERROR;
1038 debug_info("Failed to parse PLIST from decrypted payload:"); 1038 debug_info("Failed to parse PLIST from decrypted payload:");
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c
index 2856fda..1684666 100644
--- a/tools/idevicebackup.c
+++ b/tools/idevicebackup.c
@@ -57,6 +57,7 @@
57#include <libimobiledevice/notification_proxy.h> 57#include <libimobiledevice/notification_proxy.h>
58#include <libimobiledevice/afc.h> 58#include <libimobiledevice/afc.h>
59#include <libimobiledevice-glue/utils.h> 59#include <libimobiledevice-glue/utils.h>
60#include <plist/plist.h>
60 61
61#define MOBILEBACKUP_SERVICE_NAME "com.apple.mobilebackup" 62#define MOBILEBACKUP_SERVICE_NAME "com.apple.mobilebackup"
62#define NP_SERVICE_NAME "com.apple.mobile.notification_proxy" 63#define NP_SERVICE_NAME "com.apple.mobile.notification_proxy"
@@ -317,7 +318,7 @@ static void mobilebackup_write_status(const char *path, int status)
317 if (stat(file_path, &st) == 0) 318 if (stat(file_path, &st) == 0)
318 remove(file_path); 319 remove(file_path);
319 320
320 plist_write_to_filename(status_plist, file_path, PLIST_FORMAT_XML); 321 plist_write_to_file(status_plist, file_path, PLIST_FORMAT_XML, 0);
321 322
322 plist_free(status_plist); 323 plist_free(status_plist);
323 status_plist = NULL; 324 status_plist = NULL;
@@ -331,7 +332,7 @@ static int mobilebackup_read_status(const char *path)
331 plist_t status_plist = NULL; 332 plist_t status_plist = NULL;
332 char *file_path = mobilebackup_build_path(path, "Status", ".plist"); 333 char *file_path = mobilebackup_build_path(path, "Status", ".plist");
333 334
334 plist_read_from_filename(&status_plist, file_path); 335 plist_read_from_file(file_path, &status_plist, NULL);
335 free(file_path); 336 free(file_path);
336 if (!status_plist) { 337 if (!status_plist) {
337 printf("Could not read Status.plist!\n"); 338 printf("Could not read Status.plist!\n");
@@ -454,7 +455,7 @@ static int mobilebackup_check_file_integrity(const char *backup_directory, const
454 } 455 }
455 456
456 infopath = mobilebackup_build_path(backup_directory, hash, ".mdinfo"); 457 infopath = mobilebackup_build_path(backup_directory, hash, ".mdinfo");
457 plist_read_from_filename(&mdinfo, infopath); 458 plist_read_from_file(infopath, &mdinfo, NULL);
458 free(infopath); 459 free(infopath);
459 if (!mdinfo) { 460 if (!mdinfo) {
460 printf("\r\n"); 461 printf("\r\n");
@@ -882,7 +883,7 @@ int main(int argc, char *argv[])
882 /* verify existing Info.plist */ 883 /* verify existing Info.plist */
883 if (stat(info_path, &st) == 0) { 884 if (stat(info_path, &st) == 0) {
884 printf("Reading Info.plist from backup.\n"); 885 printf("Reading Info.plist from backup.\n");
885 plist_read_from_filename(&info_plist, info_path); 886 plist_read_from_file(info_path, &info_plist, NULL);
886 887
887 if (!info_plist) { 888 if (!info_plist) {
888 printf("Could not read Info.plist\n"); 889 printf("Could not read Info.plist\n");
@@ -893,7 +894,7 @@ int main(int argc, char *argv[])
893 /* update the last backup time within Info.plist */ 894 /* update the last backup time within Info.plist */
894 mobilebackup_info_update_last_backup_date(info_plist); 895 mobilebackup_info_update_last_backup_date(info_plist);
895 remove(info_path); 896 remove(info_path);
896 plist_write_to_filename(info_plist, info_path, PLIST_FORMAT_XML); 897 plist_write_to_file(info_plist, info_path, PLIST_FORMAT_XML, 0);
897 } else { 898 } else {
898 printf("Aborting backup. Backup is not compatible with the current device.\n"); 899 printf("Aborting backup. Backup is not compatible with the current device.\n");
899 cmd = CMD_LEAVE; 900 cmd = CMD_LEAVE;
@@ -959,7 +960,7 @@ int main(int argc, char *argv[])
959 /* read the last Manifest.plist */ 960 /* read the last Manifest.plist */
960 if (!is_full_backup) { 961 if (!is_full_backup) {
961 printf("Reading existing Manifest.\n"); 962 printf("Reading existing Manifest.\n");
962 plist_read_from_filename(&manifest_plist, manifest_path); 963 plist_read_from_file(manifest_path, &manifest_plist, NULL);
963 if (!manifest_plist) { 964 if (!manifest_plist) {
964 printf("Could not read Manifest.plist, switching to full backup mode.\n"); 965 printf("Could not read Manifest.plist, switching to full backup mode.\n");
965 is_full_backup = 1; 966 is_full_backup = 1;
@@ -977,7 +978,7 @@ int main(int argc, char *argv[])
977 remove(info_path); 978 remove(info_path);
978 printf("Creating Info.plist for new backup.\n"); 979 printf("Creating Info.plist for new backup.\n");
979 info_plist = mobilebackup_factory_info_plist_new(udid); 980 info_plist = mobilebackup_factory_info_plist_new(udid);
980 plist_write_to_filename(info_plist, info_path, PLIST_FORMAT_XML); 981 plist_write_to_file(info_plist, info_path, PLIST_FORMAT_XML, 0);
981 } 982 }
982 free(info_path); 983 free(info_path);
983 984
@@ -1116,7 +1117,7 @@ int main(int argc, char *argv[])
1116 remove(filename_mdinfo); 1117 remove(filename_mdinfo);
1117 1118
1118 node = plist_dict_get_item(node_tmp, "BackupFileInfo"); 1119 node = plist_dict_get_item(node_tmp, "BackupFileInfo");
1119 plist_write_to_filename(node, filename_mdinfo, PLIST_FORMAT_BINARY); 1120 plist_write_to_file(node, filename_mdinfo, PLIST_FORMAT_BINARY, 0);
1120 1121
1121 free(filename_mdinfo); 1122 free(filename_mdinfo);
1122 } 1123 }
@@ -1228,7 +1229,7 @@ files_out:
1228 if (manifest_plist) { 1229 if (manifest_plist) {
1229 remove(manifest_path); 1230 remove(manifest_path);
1230 printf("Storing Manifest.plist...\n"); 1231 printf("Storing Manifest.plist...\n");
1231 plist_write_to_filename(manifest_plist, manifest_path, PLIST_FORMAT_XML); 1232 plist_write_to_file(manifest_plist, manifest_path, PLIST_FORMAT_XML, 0);
1232 } 1233 }
1233 1234
1234 backup_ok = 1; 1235 backup_ok = 1;
@@ -1259,7 +1260,7 @@ files_out:
1259 } 1260 }
1260 /* now make sure backup integrity is ok! verify all files */ 1261 /* now make sure backup integrity is ok! verify all files */
1261 printf("Reading existing Manifest.\n"); 1262 printf("Reading existing Manifest.\n");
1262 plist_read_from_filename(&manifest_plist, manifest_path); 1263 plist_read_from_file(manifest_path, &manifest_plist, NULL);
1263 if (!manifest_plist) { 1264 if (!manifest_plist) {
1264 printf("Could not read Manifest.plist. Aborting.\n"); 1265 printf("Could not read Manifest.plist. Aborting.\n");
1265 break; 1266 break;
@@ -1386,7 +1387,7 @@ files_out:
1386 while (node) { 1387 while (node) {
1387 /* TODO: read mddata/mdinfo files and send to device using DLSendFile */ 1388 /* TODO: read mddata/mdinfo files and send to device using DLSendFile */
1388 file_info_path = mobilebackup_build_path(backup_directory, hash, ".mdinfo"); 1389 file_info_path = mobilebackup_build_path(backup_directory, hash, ".mdinfo");
1389 plist_read_from_filename(&file_info, file_info_path); 1390 plist_read_from_file(file_info_path, &file_info, NULL);
1390 1391
1391 /* get encryption state */ 1392 /* get encryption state */
1392 tmp_node = plist_dict_get_item(file_info, "IsEncrypted"); 1393 tmp_node = plist_dict_get_item(file_info, "IsEncrypted");
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);
diff --git a/tools/idevicecrashreport.c b/tools/idevicecrashreport.c
index d0d2147..484212e 100644
--- a/tools/idevicecrashreport.c
+++ b/tools/idevicecrashreport.c
@@ -81,7 +81,7 @@ static int extract_raw_crash_report(const char* filename)
81 strcpy(p, ".crash"); 81 strcpy(p, ".crash");
82 82
83 /* read plist crash report */ 83 /* read plist crash report */
84 if (plist_read_from_filename(&report, filename)) { 84 if (plist_read_from_file(filename, &report, NULL)) {
85 plist_t description_node = plist_dict_get_item(report, "description"); 85 plist_t description_node = plist_dict_get_item(report, "description");
86 if (description_node && plist_get_node_type(description_node) == PLIST_STRING) { 86 if (description_node && plist_get_node_type(description_node) == PLIST_STRING) {
87 plist_get_string_val(description_node, &raw); 87 plist_get_string_val(description_node, &raw);
diff --git a/tools/ideviceimagemounter.c b/tools/ideviceimagemounter.c
index 4ea38a9..f551b6c 100644
--- a/tools/ideviceimagemounter.c
+++ b/tools/ideviceimagemounter.c
@@ -46,7 +46,7 @@
46#include <libimobiledevice/notification_proxy.h> 46#include <libimobiledevice/notification_proxy.h>
47#include <libimobiledevice/mobile_image_mounter.h> 47#include <libimobiledevice/mobile_image_mounter.h>
48#include <asprintf.h> 48#include <asprintf.h>
49#include <libimobiledevice-glue/utils.h> 49#include <plist/plist.h>
50 50
51static int list_mode = 0; 51static int list_mode = 0;
52static int use_network = 0; 52static int use_network = 0;
@@ -143,15 +143,6 @@ static void parse_opts(int argc, char **argv)
143 } 143 }
144} 144}
145 145
146static void print_xml(plist_t node)
147{
148 char *xml = NULL;
149 uint32_t len = 0;
150 plist_to_xml(node, &xml, &len);
151 if (xml)
152 puts(xml);
153}
154
155static ssize_t mim_upload_cb(void* buf, size_t size, void* userdata) 146static ssize_t mim_upload_cb(void* buf, size_t size, void* userdata)
156{ 147{
157 return fread(buf, 1, size, (FILE*)userdata); 148 return fread(buf, 1, size, (FILE*)userdata);
@@ -297,11 +288,7 @@ int main(int argc, char **argv)
297 err = mobile_image_mounter_lookup_image(mim, imagetype, &result); 288 err = mobile_image_mounter_lookup_image(mim, imagetype, &result);
298 if (err == MOBILE_IMAGE_MOUNTER_E_SUCCESS) { 289 if (err == MOBILE_IMAGE_MOUNTER_E_SUCCESS) {
299 res = 0; 290 res = 0;
300 if (xml_mode) { 291 plist_write_to_stream(result, stdout, (xml_mode) ? PLIST_FORMAT_XML : PLIST_FORMAT_LIMD, 0);
301 print_xml(result);
302 } else {
303 plist_print_to_stream(result, stdout);
304 }
305 } else { 292 } else {
306 printf("Error: lookup_image returned %d\n", err); 293 printf("Error: lookup_image returned %d\n", err);
307 } 294 }
@@ -429,20 +416,12 @@ int main(int argc, char **argv)
429 res = 0; 416 res = 0;
430 } else { 417 } else {
431 printf("unexpected status value:\n"); 418 printf("unexpected status value:\n");
432 if (xml_mode) { 419 plist_write_to_stream(result, stdout, (xml_mode) ? PLIST_FORMAT_XML : PLIST_FORMAT_LIMD, 0);
433 print_xml(result);
434 } else {
435 plist_print_to_stream(result, stdout);
436 }
437 } 420 }
438 free(status); 421 free(status);
439 } else { 422 } else {
440 printf("unexpected result:\n"); 423 printf("unexpected result:\n");
441 if (xml_mode) { 424 plist_write_to_stream(result, stdout, (xml_mode) ? PLIST_FORMAT_XML : PLIST_FORMAT_LIMD, 0);
442 print_xml(result);
443 } else {
444 plist_print_to_stream(result, stdout);
445 }
446 } 425 }
447 } 426 }
448 node = plist_dict_get_item(result, "Error"); 427 node = plist_dict_get_item(result, "Error");
@@ -454,19 +433,11 @@ int main(int argc, char **argv)
454 free(error); 433 free(error);
455 } else { 434 } else {
456 printf("unexpected result:\n"); 435 printf("unexpected result:\n");
457 if (xml_mode) { 436 plist_write_to_stream(result, stdout, (xml_mode) ? PLIST_FORMAT_XML : PLIST_FORMAT_LIMD, 0);
458 print_xml(result);
459 } else {
460 plist_print_to_stream(result, stdout);
461 }
462 } 437 }
463 438
464 } else { 439 } else {
465 if (xml_mode) { 440 plist_write_to_stream(result, stdout, (xml_mode) ? PLIST_FORMAT_XML : PLIST_FORMAT_LIMD, 0);
466 print_xml(result);
467 } else {
468 plist_print_to_stream(result, stdout);
469 }
470 } 441 }
471 } 442 }
472 } else { 443 } else {
diff --git a/tools/ideviceinfo.c b/tools/ideviceinfo.c
index fc0527d..fd45763 100644
--- a/tools/ideviceinfo.c
+++ b/tools/ideviceinfo.c
@@ -37,7 +37,7 @@
37 37
38#include <libimobiledevice/libimobiledevice.h> 38#include <libimobiledevice/libimobiledevice.h>
39#include <libimobiledevice/lockdown.h> 39#include <libimobiledevice/lockdown.h>
40#include <libimobiledevice-glue/utils.h> 40#include <plist/plist.h>
41 41
42#define FORMAT_KEY_VALUE 1 42#define FORMAT_KEY_VALUE 1
43#define FORMAT_XML 2 43#define FORMAT_XML 2
@@ -241,11 +241,11 @@ int main(int argc, char *argv[])
241 free(xml_doc); 241 free(xml_doc);
242 break; 242 break;
243 case FORMAT_KEY_VALUE: 243 case FORMAT_KEY_VALUE:
244 plist_print_to_stream(node, stdout); 244 plist_write_to_stream(node, stdout, PLIST_FORMAT_LIMD, 0);
245 break; 245 break;
246 default: 246 default:
247 if (key != NULL) 247 if (key != NULL)
248 plist_print_to_stream(node, stdout); 248 plist_write_to_stream(node, stdout, PLIST_FORMAT_LIMD, 0);
249 break; 249 break;
250 } 250 }
251 plist_free(node); 251 plist_free(node);
diff --git a/tools/idevicepair.c b/tools/idevicepair.c
index dda02ec..94d3f04 100644
--- a/tools/idevicepair.c
+++ b/tools/idevicepair.c
@@ -41,7 +41,6 @@
41#endif 41#endif
42 42
43#include "common/userpref.h" 43#include "common/userpref.h"
44#include <libimobiledevice-glue/utils.h>
45 44
46#include <libimobiledevice/libimobiledevice.h> 45#include <libimobiledevice/libimobiledevice.h>
47#include <libimobiledevice/lockdown.h> 46#include <libimobiledevice/lockdown.h>
@@ -104,7 +103,7 @@ static void pairing_cb(lockdownd_cu_pairing_cb_type_t cb_type, void *user_data,
104 printf("\n"); 103 printf("\n");
105 } else if (cb_type == LOCKDOWN_CU_PAIRING_DEVICE_INFO) { 104 } else if (cb_type == LOCKDOWN_CU_PAIRING_DEVICE_INFO) {
106 printf("Device info:\n"); 105 printf("Device info:\n");
107 plist_print_to_stream_with_indentation((plist_t)data_ptr, stdout, 2); 106 plist_write_to_stream((plist_t)data_ptr, stdout, PLIST_FORMAT_LIMD, PLIST_OPT_INDENT | PLIST_OPT_INDENT_BY(2));
108 } else if (cb_type == LOCKDOWN_CU_PAIRING_ERROR) { 107 } else if (cb_type == LOCKDOWN_CU_PAIRING_ERROR) {
109 printf("ERROR: %s\n", (data_ptr) ? (char*)data_ptr : "(unknown)"); 108 printf("ERROR: %s\n", (data_ptr) ? (char*)data_ptr : "(unknown)");
110 } 109 }
@@ -257,7 +256,7 @@ int main(int argc, char **argv)
257 goto leave; 256 goto leave;
258 } 257 }
259 if (*optarg == '@') { 258 if (*optarg == '@') {
260 plist_read_from_filename(&host_info_plist, optarg+1); 259 plist_read_from_file(optarg+1, &host_info_plist, NULL);
261 if (!host_info_plist) { 260 if (!host_info_plist) {
262 fprintf(stderr, "ERROR: Could not read from file '%s'\n", optarg+1); 261 fprintf(stderr, "ERROR: Could not read from file '%s'\n", optarg+1);
263 result = EXIT_FAILURE; 262 result = EXIT_FAILURE;
diff --git a/tools/ideviceprovision.c b/tools/ideviceprovision.c
index 7cd4f3f..4080a28 100644
--- a/tools/ideviceprovision.c
+++ b/tools/ideviceprovision.c
@@ -45,7 +45,7 @@
45#include <libimobiledevice/libimobiledevice.h> 45#include <libimobiledevice/libimobiledevice.h>
46#include <libimobiledevice/lockdown.h> 46#include <libimobiledevice/lockdown.h>
47#include <libimobiledevice/misagent.h> 47#include <libimobiledevice/misagent.h>
48#include <libimobiledevice-glue/utils.h> 48#include <plist/plist.h>
49 49
50static void print_usage(int argc, char **argv, int is_error) 50static void print_usage(int argc, char **argv, int is_error)
51{ 51{
@@ -436,7 +436,7 @@ int main(int argc, char *argv[])
436 } 436 }
437 } else { 437 } else {
438 if (pl && (plist_get_node_type(pl) == PLIST_DICT)) { 438 if (pl && (plist_get_node_type(pl) == PLIST_DICT)) {
439 plist_print_to_stream(pl, stdout); 439 plist_write_to_stream(pl, stdout, PLIST_FORMAT_LIMD, 0);
440 } else { 440 } else {
441 fprintf(stderr, "ERROR: unexpected node type in profile plist (not PLIST_DICT)\n"); 441 fprintf(stderr, "ERROR: unexpected node type in profile plist (not PLIST_DICT)\n");
442 res = -1; 442 res = -1;