summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/iphone_id.c15
-rw-r--r--tools/iphonesyslog.c1
2 files changed, 7 insertions, 9 deletions
diff --git a/tools/iphone_id.c b/tools/iphone_id.c
index ab36e7c..c9ae2db 100644
--- a/tools/iphone_id.c
+++ b/tools/iphone_id.c
@@ -3,7 +3,6 @@
3#include <stdlib.h> 3#include <stdlib.h>
4#include <libiphone/libiphone.h> 4#include <libiphone/libiphone.h>
5#include <libiphone/lockdown.h> 5#include <libiphone/lockdown.h>
6#include <usbmuxd.h>
7 6
8#define MODE_NONE 0 7#define MODE_NONE 0
9#define MODE_SHOW_ID 1 8#define MODE_SHOW_ID 1
@@ -18,7 +17,7 @@ static void print_usage(int argc, char **argv)
18 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");
19 printf(" The UUID is a 40-digit hexadecimal number of the device\n"); 18 printf(" The UUID is a 40-digit hexadecimal number of the device\n");
20 printf(" for which the name should be retrieved.\n\n"); 19 printf(" for which the name should be retrieved.\n\n");
21 printf(" -l, --list\t\tlist all attached devices\n"); 20 printf(" -l, --list\t\tlist UUID of all attached devices\n");
22 printf(" -d, --debug\t\tenable communication debugging\n"); 21 printf(" -d, --debug\t\tenable communication debugging\n");
23 printf(" -h, --help\t\tprints usage information\n"); 22 printf(" -h, --help\t\tprints usage information\n");
24 printf("\n"); 23 printf("\n");
@@ -28,7 +27,7 @@ int main(int argc, char **argv)
28{ 27{
29 iphone_device_t phone = NULL; 28 iphone_device_t phone = NULL;
30 lockdownd_client_t client = NULL; 29 lockdownd_client_t client = NULL;
31 usbmuxd_device_info_t *dev_list; 30 char **dev_list = NULL;
32 char *devname = NULL; 31 char *devname = NULL;
33 int ret = 0; 32 int ret = 0;
34 int i; 33 int i;
@@ -96,14 +95,14 @@ int main(int argc, char **argv)
96 return ret; 95 return ret;
97 case MODE_LIST_DEVICES: 96 case MODE_LIST_DEVICES:
98 default: 97 default:
99 if (usbmuxd_get_device_list(&dev_list) < 0) { 98 if (iphone_get_device_list(&dev_list, &i) < 0) {
100 fprintf(stderr, "ERROR: usbmuxd is not running!\n"); 99 fprintf(stderr, "ERROR: Unable to retrieve device list!\n");
101 return -1; 100 return -1;
102 } 101 }
103 for (i = 0; dev_list[i].handle > 0; i++) { 102 for (i = 0; dev_list[i] != NULL; i++) {
104 printf("handle=%d product_id=%04x uuid=%s\n", dev_list[i].handle, dev_list[i].product_id, dev_list[i].uuid); 103 printf("%s\n", dev_list[i]);
105 } 104 }
106 usbmuxd_free_device_list(dev_list); 105 iphone_free_device_list(dev_list);
107 return 0; 106 return 0;
108 } 107 }
109} 108}
diff --git a/tools/iphonesyslog.c b/tools/iphonesyslog.c
index 10b3fb6..8fa3b04 100644
--- a/tools/iphonesyslog.c
+++ b/tools/iphonesyslog.c
@@ -51,7 +51,6 @@ int main(int argc, char *argv[])
51 char uuid[41]; 51 char uuid[41];
52 int port = 0; 52 int port = 0;
53 uuid[0] = 0; 53 uuid[0] = 0;
54 uint32_t handle = 0;
55 54
56 signal(SIGINT, clean_exit); 55 signal(SIGINT, clean_exit);
57 signal(SIGQUIT, clean_exit); 56 signal(SIGQUIT, clean_exit);