diff options
Diffstat (limited to 'tools/idevicedebugserverproxy.c')
| -rw-r--r-- | tools/idevicedebugserverproxy.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/idevicedebugserverproxy.c b/tools/idevicedebugserverproxy.c index 338a3c0..c0a0eff 100644 --- a/tools/idevicedebugserverproxy.c +++ b/tools/idevicedebugserverproxy.c | |||
| @@ -23,6 +23,8 @@ | |||
| 23 | #include <config.h> | 23 | #include <config.h> |
| 24 | #endif | 24 | #endif |
| 25 | 25 | ||
| 26 | #define TOOL_NAME "idevicedebugserverproxy" | ||
| 27 | |||
| 26 | #include <stdio.h> | 28 | #include <stdio.h> |
| 27 | #include <stdlib.h> | 29 | #include <stdlib.h> |
| 28 | #include <string.h> | 30 | #include <string.h> |
| @@ -73,9 +75,10 @@ static void print_usage(int argc, char **argv) | |||
| 73 | printf("Proxy debugserver connection from device to a local socket at PORT.\n"); | 75 | printf("Proxy debugserver connection from device to a local socket at PORT.\n"); |
| 74 | printf("\n"); | 76 | printf("\n"); |
| 75 | printf("OPTIONS:\n"); | 77 | printf("OPTIONS:\n"); |
| 76 | printf(" -d, --debug\t\tenable communication debugging\n"); | ||
| 77 | printf(" -u, --udid UDID\ttarget specific device by UDID\n"); | 78 | printf(" -u, --udid UDID\ttarget specific device by UDID\n"); |
| 79 | printf(" -d, --debug\t\tenable communication debugging\n"); | ||
| 78 | printf(" -h, --help\t\tprints usage information\n"); | 80 | printf(" -h, --help\t\tprints usage information\n"); |
| 81 | printf(" -v, --version\t\tprints version information\n"); | ||
| 79 | printf("\n"); | 82 | printf("\n"); |
| 80 | printf("Homepage: <" PACKAGE_URL ">\n"); | 83 | printf("Homepage: <" PACKAGE_URL ">\n"); |
| 81 | printf("Bug Reports: <" PACKAGE_BUGREPORT ">\n"); | 84 | printf("Bug Reports: <" PACKAGE_BUGREPORT ">\n"); |
| @@ -213,7 +216,7 @@ static void* connection_handler(void* data) | |||
| 213 | 216 | ||
| 214 | debug("%s: client_fd = %d\n", __func__, socket_info->client_fd); | 217 | debug("%s: client_fd = %d\n", __func__, socket_info->client_fd); |
| 215 | 218 | ||
| 216 | derr = debugserver_client_start_service(socket_info->device, &socket_info->debugserver_client, "idevicedebugserverproxy"); | 219 | derr = debugserver_client_start_service(socket_info->device, &socket_info->debugserver_client, TOOL_NAME); |
| 217 | if (derr != DEBUGSERVER_E_SUCCESS) { | 220 | if (derr != DEBUGSERVER_E_SUCCESS) { |
| 218 | fprintf(stderr, "Could not start debugserver on device!\nPlease make sure to mount a developer disk image first.\n"); | 221 | fprintf(stderr, "Could not start debugserver on device!\nPlease make sure to mount a developer disk image first.\n"); |
| 219 | return NULL; | 222 | return NULL; |
| @@ -295,6 +298,10 @@ int main(int argc, char *argv[]) | |||
| 295 | print_usage(argc, argv); | 298 | print_usage(argc, argv); |
| 296 | return EXIT_SUCCESS; | 299 | return EXIT_SUCCESS; |
| 297 | } | 300 | } |
| 301 | else if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--version")) { | ||
| 302 | printf("%s %s\n", TOOL_NAME, PACKAGE_VERSION); | ||
| 303 | return EXIT_SUCCESS; | ||
| 304 | } | ||
| 298 | else if (atoi(argv[i]) > 0) { | 305 | else if (atoi(argv[i]) > 0) { |
| 299 | local_port = atoi(argv[i]); | 306 | local_port = atoi(argv[i]); |
| 300 | continue; | 307 | continue; |
