diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/idevice_id.c | 12 | ||||
-rw-r--r-- | tools/idevicebackup.c | 22 | ||||
-rw-r--r-- | tools/idevicebackup2.c | 24 | ||||
-rw-r--r-- | tools/idevicedate.c | 10 | ||||
-rw-r--r-- | tools/ideviceenterrecovery.c | 10 | ||||
-rw-r--r-- | tools/ideviceinfo.c | 12 | ||||
-rw-r--r-- | tools/idevicepair.c | 14 | ||||
-rw-r--r-- | tools/idevicesyslog.c | 12 |
8 files changed, 58 insertions, 58 deletions
diff --git a/tools/idevice_id.c b/tools/idevice_id.c index 108aad4..c9ade46 100644 --- a/tools/idevice_id.c +++ b/tools/idevice_id.c @@ -46,7 +46,7 @@ static void print_usage(int argc, char **argv) int main(int argc, char **argv) { - idevice_t phone = NULL; + idevice_t device = NULL; lockdownd_client_t client = NULL; char **dev_list = NULL; char *devname = NULL; @@ -83,14 +83,14 @@ int main(int argc, char **argv) switch (mode) { case MODE_SHOW_ID: - idevice_new(&phone, udid); - if (!phone) { + idevice_new(&device, udid); + if (!device) { fprintf(stderr, "ERROR: No device with UDID=%s attached.\n", udid); return -2; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client, "idevice_id")) { - idevice_free(phone); + if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(device, &client, "idevice_id")) { + idevice_free(device); fprintf(stderr, "ERROR: Connecting to device failed!\n"); return -2; } @@ -101,7 +101,7 @@ int main(int argc, char **argv) } lockdownd_client_free(client); - idevice_free(phone); + idevice_free(device); if (ret == 0) { printf("%s\n", devname); diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c index b4e0158..86b81da 100644 --- a/tools/idevicebackup.c +++ b/tools/idevicebackup.c @@ -56,7 +56,7 @@ static mobilebackup_client_t mobilebackup = NULL; static lockdownd_client_t client = NULL; -static idevice_t phone = NULL; +static idevice_t device = NULL; static int quit_flag = 0; @@ -748,14 +748,14 @@ static void do_post_notification(const char *notification) np_client_t np; if (!client) { - if (lockdownd_client_new_with_handshake(phone, &client, "idevicebackup") != LOCKDOWN_E_SUCCESS) { + if (lockdownd_client_new_with_handshake(device, &client, "idevicebackup") != LOCKDOWN_E_SUCCESS) { return; } } lockdownd_start_service(client, NP_SERVICE_NAME, &nport); if (nport) { - np_client_new(phone, nport, &np); + np_client_new(device, nport, &np); if (np) { np_post_notification(np, notification); np_client_free(np); @@ -908,7 +908,7 @@ int main(int argc, char *argv[]) printf("Backup directory is \"%s\"\n", backup_directory); if (udid) { - ret = idevice_new(&phone, udid); + ret = idevice_new(&device, udid); if (ret != IDEVICE_E_SUCCESS) { printf("No device found with udid %s, is it plugged in?\n", udid); return -1; @@ -916,15 +916,15 @@ int main(int argc, char *argv[]) } else { - ret = idevice_new(&phone, NULL); + ret = idevice_new(&device, NULL); if (ret != IDEVICE_E_SUCCESS) { printf("No device found, is it plugged in?\n"); return -1; } } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "idevicebackup")) { - idevice_free(phone); + if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &client, "idevicebackup")) { + idevice_free(device); return -1; } @@ -932,7 +932,7 @@ int main(int argc, char *argv[]) np_client_t np = NULL; ret = lockdownd_start_service(client, NP_SERVICE_NAME, &port); if ((ret == LOCKDOWN_E_SUCCESS) && port) { - np_client_new(phone, port, &np); + np_client_new(device, port, &np); np_set_notify_callback(np, notify_cb, NULL); const char *noties[5] = { NP_SYNC_CANCEL_REQUEST, @@ -952,7 +952,7 @@ int main(int argc, char *argv[]) port = 0; ret = lockdownd_start_service(client, "com.apple.afc", &port); if ((ret == LOCKDOWN_E_SUCCESS) && port) { - afc_client_new(phone, port, &afc); + afc_client_new(device, port, &afc); } } @@ -961,7 +961,7 @@ int main(int argc, char *argv[]) ret = lockdownd_start_service(client, MOBILEBACKUP_SERVICE_NAME, &port); if ((ret == LOCKDOWN_E_SUCCESS) && port) { printf("Started \"%s\" service on port %d.\n", MOBILEBACKUP_SERVICE_NAME, port); - mobilebackup_client_new(phone, port, &mobilebackup); + mobilebackup_client_new(device, port, &mobilebackup); /* check abort conditions */ if (quit_flag > 0) { @@ -1694,7 +1694,7 @@ files_out: if (mobilebackup) mobilebackup_client_free(mobilebackup); - idevice_free(phone); + idevice_free(device); if (udid) { free(udid); diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index 566a41f..0a06f3f 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c @@ -60,7 +60,7 @@ static mobilebackup2_client_t mobilebackup2 = NULL; static lockdownd_client_t client = NULL; static afc_client_t afc = NULL; -static idevice_t phone = NULL; +static idevice_t device = NULL; static int verbose = 1; static int quit_flag = 0; @@ -539,14 +539,14 @@ static void do_post_notification(const char *notification) np_client_t np; if (!client) { - if (lockdownd_client_new_with_handshake(phone, &client, "idevicebackup") != LOCKDOWN_E_SUCCESS) { + if (lockdownd_client_new_with_handshake(device, &client, "idevicebackup") != LOCKDOWN_E_SUCCESS) { return; } } lockdownd_start_service(client, NP_SERVICE_NAME, &nport); if (nport) { - np_client_new(phone, nport, &np); + np_client_new(device, nport, &np); if (np) { np_post_notification(np, notification); np_client_free(np); @@ -1291,7 +1291,7 @@ int main(int argc, char *argv[]) } if (udid) { - ret = idevice_new(&phone, udid); + ret = idevice_new(&device, udid); if (ret != IDEVICE_E_SUCCESS) { printf("No device found with udid %s, is it plugged in?\n", udid); return -1; @@ -1299,12 +1299,12 @@ int main(int argc, char *argv[]) } else { - ret = idevice_new(&phone, NULL); + ret = idevice_new(&device, NULL); if (ret != IDEVICE_E_SUCCESS) { printf("No device found, is it plugged in?\n"); return -1; } - idevice_get_udid(phone, &udid); + idevice_get_udid(device, &udid); } /* backup directory must contain an Info.plist */ @@ -1319,8 +1319,8 @@ int main(int argc, char *argv[]) PRINT_VERBOSE(1, "Backup directory is \"%s\"\n", backup_directory); - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "idevicebackup")) { - idevice_free(phone); + if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &client, "idevicebackup")) { + idevice_free(device); return -1; } @@ -1328,7 +1328,7 @@ int main(int argc, char *argv[]) np_client_t np = NULL; ret = lockdownd_start_service(client, NP_SERVICE_NAME, &port); if ((ret == LOCKDOWN_E_SUCCESS) && port) { - np_client_new(phone, port, &np); + np_client_new(device, port, &np); np_set_notify_callback(np, notify_cb, NULL); const char *noties[5] = { NP_SYNC_CANCEL_REQUEST, @@ -1348,7 +1348,7 @@ int main(int argc, char *argv[]) port = 0; ret = lockdownd_start_service(client, "com.apple.afc", &port); if ((ret == LOCKDOWN_E_SUCCESS) && port) { - afc_client_new(phone, port, &afc); + afc_client_new(device, port, &afc); } } @@ -1357,7 +1357,7 @@ int main(int argc, char *argv[]) ret = lockdownd_start_service(client, MOBILEBACKUP2_SERVICE_NAME, &port); if ((ret == LOCKDOWN_E_SUCCESS) && port) { PRINT_VERBOSE(1, "Started \"%s\" service on port %d.\n", MOBILEBACKUP2_SERVICE_NAME, port); - mobilebackup2_client_new(phone, port, &mobilebackup2); + mobilebackup2_client_new(device, port, &mobilebackup2); /* send Hello message */ double local_versions[2] = {2.0, 2.1}; @@ -1884,7 +1884,7 @@ files_out: if (np) np_client_free(np); - idevice_free(phone); + idevice_free(device); if (udid) { free(udid); diff --git a/tools/idevicedate.c b/tools/idevicedate.c index 19f7c1d..bde6786 100644 --- a/tools/idevicedate.c +++ b/tools/idevicedate.c @@ -54,7 +54,7 @@ static void print_usage(int argc, char **argv) int main(int argc, char *argv[]) { lockdownd_client_t client = NULL; - idevice_t phone = NULL; + idevice_t device = NULL; idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; int i; const char* udid = NULL; @@ -123,7 +123,7 @@ int main(int argc, char *argv[]) } } - ret = idevice_new(&phone, udid); + ret = idevice_new(&device, udid); if (ret != IDEVICE_E_SUCCESS) { if (udid) { printf("No device found with udid %s, is it plugged in?\n", udid); @@ -133,8 +133,8 @@ int main(int argc, char *argv[]) return -1; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "idevicedate")) { - idevice_free(phone); + if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &client, "idevicedate")) { + idevice_free(device); return -1; } @@ -183,7 +183,7 @@ int main(int argc, char *argv[]) } lockdownd_client_free(client); - idevice_free(phone); + idevice_free(device); return 0; } diff --git a/tools/ideviceenterrecovery.c b/tools/ideviceenterrecovery.c index 62df70f..444d531 100644 --- a/tools/ideviceenterrecovery.c +++ b/tools/ideviceenterrecovery.c @@ -42,7 +42,7 @@ static void print_usage(int argc, char **argv) int main(int argc, char *argv[]) { lockdownd_client_t client = NULL; - idevice_t phone = NULL; + idevice_t device = NULL; idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; int i; const char* udid = NULL; @@ -66,14 +66,14 @@ int main(int argc, char *argv[]) } udid = argv[i]; - ret = idevice_new(&phone, udid); + ret = idevice_new(&device, udid); if (ret != IDEVICE_E_SUCCESS) { printf("No device found with udid %s, is it plugged in?\n", udid); return -1; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client, "ideviceenterrecovery")) { - idevice_free(phone); + if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(device, &client, "ideviceenterrecovery")) { + idevice_free(device); return -1; } @@ -86,7 +86,7 @@ int main(int argc, char *argv[]) printf("Device is successfully switching to recovery mode.\n"); lockdownd_client_free(client); - idevice_free(phone); + idevice_free(device); return 0; } diff --git a/tools/ideviceinfo.c b/tools/ideviceinfo.c index 8635a48..c8d4cac 100644 --- a/tools/ideviceinfo.c +++ b/tools/ideviceinfo.c @@ -280,7 +280,7 @@ static void print_usage(int argc, char **argv) int main(int argc, char *argv[]) { lockdownd_client_t client = NULL; - idevice_t phone = NULL; + idevice_t device = NULL; idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; int i; int simple = 0; @@ -347,7 +347,7 @@ int main(int argc, char *argv[]) } } - ret = idevice_new(&phone, udid); + ret = idevice_new(&device, udid); if (ret != IDEVICE_E_SUCCESS) { if (udid) { printf("No device found with udid %s, is it plugged in?\n", udid); @@ -358,9 +358,9 @@ int main(int argc, char *argv[]) } if (LOCKDOWN_E_SUCCESS != (simple ? - lockdownd_client_new(phone, &client, "ideviceinfo"): - lockdownd_client_new_with_handshake(phone, &client, "ideviceinfo"))) { - idevice_free(phone); + lockdownd_client_new(device, &client, "ideviceinfo"): + lockdownd_client_new_with_handshake(device, &client, "ideviceinfo"))) { + idevice_free(device); return -1; } @@ -394,7 +394,7 @@ int main(int argc, char *argv[]) if (domain != NULL) free(domain); lockdownd_client_free(client); - idevice_free(phone); + idevice_free(device); return 0; } diff --git a/tools/idevicepair.c b/tools/idevicepair.c index 35147a4..dddb6ee 100644 --- a/tools/idevicepair.c +++ b/tools/idevicepair.c @@ -91,7 +91,7 @@ static void parse_opts(int argc, char **argv) int main(int argc, char **argv) { lockdownd_client_t client = NULL; - idevice_t phone = NULL; + idevice_t device = NULL; idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; lockdownd_error_t lerr; int result; @@ -158,7 +158,7 @@ int main(int argc, char **argv) } if (udid) { - ret = idevice_new(&phone, udid); + ret = idevice_new(&device, udid); free(udid); udid = NULL; if (ret != IDEVICE_E_SUCCESS) { @@ -166,16 +166,16 @@ int main(int argc, char **argv) return EXIT_FAILURE; } } else { - ret = idevice_new(&phone, NULL); + ret = idevice_new(&device, NULL); if (ret != IDEVICE_E_SUCCESS) { printf("No device found, is it plugged in?\n"); return EXIT_FAILURE; } } - lerr = lockdownd_client_new(phone, &client, "idevicepair"); + lerr = lockdownd_client_new(device, &client, "idevicepair"); if (lerr != LOCKDOWN_E_SUCCESS) { - idevice_free(phone); + idevice_free(device); printf("ERROR: lockdownd_client_new failed with error code %d\n", lerr); return EXIT_FAILURE; } @@ -196,7 +196,7 @@ int main(int argc, char **argv) } } - ret = idevice_get_udid(phone, &udid); + ret = idevice_get_udid(device, &udid); if (ret != IDEVICE_E_SUCCESS) { printf("ERROR: Could not get device udid, error code %d\n", ret); result = EXIT_FAILURE; @@ -254,7 +254,7 @@ int main(int argc, char **argv) leave: lockdownd_client_free(client); - idevice_free(phone); + idevice_free(device); if (udid) { free(udid); } diff --git a/tools/idevicesyslog.c b/tools/idevicesyslog.c index 73dd8e1..a17999c 100644 --- a/tools/idevicesyslog.c +++ b/tools/idevicesyslog.c @@ -45,7 +45,7 @@ static void clean_exit(int sig) int main(int argc, char *argv[]) { lockdownd_client_t client = NULL; - idevice_t phone = NULL; + idevice_t device = NULL; idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; int i; const char* udid = NULL; @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) } } - ret = idevice_new(&phone, udid); + ret = idevice_new(&device, udid); if (ret != IDEVICE_E_SUCCESS) { if (udid) { printf("No device found with udid %s, is it plugged in?\n", udid); @@ -93,8 +93,8 @@ int main(int argc, char *argv[]) return -1; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "idevicesyslog")) { - idevice_free(phone); + if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &client, "idevicesyslog")) { + idevice_free(device); return -1; } @@ -105,7 +105,7 @@ int main(int argc, char *argv[]) /* connect to socket relay messages */ idevice_connection_t conn = NULL; - if ((idevice_connect(phone, port, &conn) != IDEVICE_E_SUCCESS) || !conn) { + if ((idevice_connect(device, port, &conn) != IDEVICE_E_SUCCESS) || !conn) { printf("ERROR: Could not open usbmux connection.\n"); } else { while (!quit_flag) { @@ -126,7 +126,7 @@ int main(int argc, char *argv[]) printf("ERROR: Could not start service com.apple.syslog_relay.\n"); } - idevice_free(phone); + idevice_free(device); return 0; } |