summaryrefslogtreecommitdiffstats
path: root/tools/idevice_id.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-03-22 16:07:07 +0100
committerGravatar Martin Szulecki2012-03-22 16:07:07 +0100
commit7457346a7ad7dddc0188cd1cd6fc5920aabfe39a (patch)
tree4d9aa158fc2fb1e05d3349ca8a5ec22207a9a7e4 /tools/idevice_id.c
parent0331050438d1bd5824237d13240a766a9b503b55 (diff)
downloadlibimobiledevice-7457346a7ad7dddc0188cd1cd6fc5920aabfe39a.tar.gz
libimobiledevice-7457346a7ad7dddc0188cd1cd6fc5920aabfe39a.tar.bz2
Mass replace UUID by UDID, which is the correct term for it
Diffstat (limited to 'tools/idevice_id.c')
-rw-r--r--tools/idevice_id.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/idevice_id.c b/tools/idevice_id.c
index 1facb60..44a542a 100644
--- a/tools/idevice_id.c
+++ b/tools/idevice_id.c
@@ -13,11 +13,11 @@ static void print_usage(int argc, char **argv)
13 char *name = NULL; 13 char *name = NULL;
14 14
15 name = strrchr(argv[0], '/'); 15 name = strrchr(argv[0], '/');
16 printf("Usage: %s [OPTIONS] [UUID]\n", (name ? name + 1: argv[0])); 16 printf("Usage: %s [OPTIONS] [UDID]\n", (name ? name + 1: argv[0]));
17 printf("Prints device name or a list of attached iPhone/iPod Touch devices.\n\n"); 17 printf("Prints device name or a list of attached iPhone/iPod Touch devices.\n\n");
18 printf(" The UUID is a 40-digit hexadecimal number of the device\n"); 18 printf(" The UDID is a 40-digit hexadecimal number of the device\n");
19 printf(" for which the name should be retrieved.\n\n"); 19 printf(" for which the name should be retrieved.\n\n");
20 printf(" -l, --list\t\tlist UUID of all attached devices\n"); 20 printf(" -l, --list\t\tlist UDID of all attached devices\n");
21 printf(" -d, --debug\t\tenable communication debugging\n"); 21 printf(" -d, --debug\t\tenable communication debugging\n");
22 printf(" -h, --help\t\tprints usage information\n"); 22 printf(" -h, --help\t\tprints usage information\n");
23 printf("\n"); 23 printf("\n");
@@ -32,8 +32,8 @@ int main(int argc, char **argv)
32 int ret = 0; 32 int ret = 0;
33 int i; 33 int i;
34 int mode = MODE_SHOW_ID; 34 int mode = MODE_SHOW_ID;
35 char uuid[41]; 35 char udid[41];
36 uuid[0] = 0; 36 udid[0] = 0;
37 37
38 /* parse cmdline args */ 38 /* parse cmdline args */
39 for (i = 1; i < argc; i++) { 39 for (i = 1; i < argc; i++) {
@@ -51,21 +51,21 @@ int main(int argc, char **argv)
51 } 51 }
52 } 52 }
53 53
54 /* check if uuid was passed */ 54 /* check if udid was passed */
55 if (mode == MODE_SHOW_ID) { 55 if (mode == MODE_SHOW_ID) {
56 i--; 56 i--;
57 if (!argv[i] || (strlen(argv[i]) != 40)) { 57 if (!argv[i] || (strlen(argv[i]) != 40)) {
58 print_usage(argc, argv); 58 print_usage(argc, argv);
59 return 0; 59 return 0;
60 } 60 }
61 strcpy(uuid, argv[i]); 61 strcpy(udid, argv[i]);
62 } 62 }
63 63
64 switch (mode) { 64 switch (mode) {
65 case MODE_SHOW_ID: 65 case MODE_SHOW_ID:
66 idevice_new(&phone, uuid); 66 idevice_new(&phone, udid);
67 if (!phone) { 67 if (!phone) {
68 fprintf(stderr, "ERROR: No device with UUID=%s attached.\n", uuid); 68 fprintf(stderr, "ERROR: No device with UDID=%s attached.\n", udid);
69 return -2; 69 return -2;
70 } 70 }
71 71