summaryrefslogtreecommitdiffstats
path: root/tools/idevicescreenshot.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/idevicescreenshot.c')
-rw-r--r--tools/idevicescreenshot.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/idevicescreenshot.c b/tools/idevicescreenshot.c
index 31717dd..8f75fd1 100644
--- a/tools/idevicescreenshot.c
+++ b/tools/idevicescreenshot.c
@@ -41,7 +41,7 @@ int main(int argc, char **argv)
41 uint16_t port = 0; 41 uint16_t port = 0;
42 int result = -1; 42 int result = -1;
43 int i; 43 int i;
44 char *uuid = NULL; 44 char *udid = NULL;
45 45
46 /* parse cmdline args */ 46 /* parse cmdline args */
47 for (i = 1; i < argc; i++) { 47 for (i = 1; i < argc; i++) {
@@ -49,13 +49,13 @@ int main(int argc, char **argv)
49 idevice_set_debug_level(1); 49 idevice_set_debug_level(1);
50 continue; 50 continue;
51 } 51 }
52 else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) { 52 else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--udid")) {
53 i++; 53 i++;
54 if (!argv[i] || (strlen(argv[i]) != 40)) { 54 if (!argv[i] || (strlen(argv[i]) != 40)) {
55 print_usage(argc, argv); 55 print_usage(argc, argv);
56 return 0; 56 return 0;
57 } 57 }
58 uuid = strdup(argv[i]); 58 udid = strdup(argv[i]);
59 continue; 59 continue;
60 } 60 }
61 else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) { 61 else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) {
@@ -68,15 +68,15 @@ int main(int argc, char **argv)
68 } 68 }
69 } 69 }
70 70
71 if (IDEVICE_E_SUCCESS != idevice_new(&device, uuid)) { 71 if (IDEVICE_E_SUCCESS != idevice_new(&device, udid)) {
72 printf("No device found, is it plugged in?\n"); 72 printf("No device found, is it plugged in?\n");
73 if (uuid) { 73 if (udid) {
74 free(uuid); 74 free(udid);
75 } 75 }
76 return -1; 76 return -1;
77 } 77 }
78 if (uuid) { 78 if (udid) {
79 free(uuid); 79 free(udid);
80 } 80 }
81 81
82 if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, NULL)) { 82 if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, NULL)) {
@@ -133,7 +133,7 @@ void print_usage(int argc, char **argv)
133 printf("NOTE: A mounted developer disk image is required on the device, otherwise\n"); 133 printf("NOTE: A mounted developer disk image is required on the device, otherwise\n");
134 printf("the screenshotr service is not available.\n\n"); 134 printf("the screenshotr service is not available.\n\n");
135 printf(" -d, --debug\t\tenable communication debugging\n"); 135 printf(" -d, --debug\t\tenable communication debugging\n");
136 printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n"); 136 printf(" -u, --udid UDID\ttarget specific device by its 40-digit device UDID\n");
137 printf(" -h, --help\t\tprints usage information\n"); 137 printf(" -h, --help\t\tprints usage information\n");
138 printf("\n"); 138 printf("\n");
139} 139}