summaryrefslogtreecommitdiffstats
path: root/tools/ideviceprovision.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ideviceprovision.c')
-rw-r--r--tools/ideviceprovision.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/ideviceprovision.c b/tools/ideviceprovision.c
index 4b96821..8cf3de6 100644
--- a/tools/ideviceprovision.c
+++ b/tools/ideviceprovision.c
@@ -24,6 +24,8 @@
24#include <config.h> 24#include <config.h>
25#endif 25#endif
26 26
27#define TOOL_NAME "ideviceprovision"
28
27#include <stdio.h> 29#include <stdio.h>
28#include <stdlib.h> 30#include <stdlib.h>
29#include <string.h> 31#include <string.h>
@@ -69,10 +71,11 @@ static void print_usage(int argc, char **argv)
69 printf(" \tspecified by FILE.\n"); 71 printf(" \tspecified by FILE.\n");
70 printf("\n"); 72 printf("\n");
71 printf("The following OPTIONS are accepted:\n"); 73 printf("The following OPTIONS are accepted:\n");
72 printf(" -d, --debug enable communication debugging\n");
73 printf(" -u, --udid UDID target specific device by UDID\n"); 74 printf(" -u, --udid UDID target specific device by UDID\n");
74 printf(" -x, --xml print XML output when using the 'dump' command\n"); 75 printf(" -x, --xml print XML output when using the 'dump' command\n");
76 printf(" -d, --debug enable communication debugging\n");
75 printf(" -h, --help prints usage information\n"); 77 printf(" -h, --help prints usage information\n");
78 printf(" -v, --version prints version information\n");
76 printf("\n"); 79 printf("\n");
77 printf("Homepage: <" PACKAGE_URL ">\n"); 80 printf("Homepage: <" PACKAGE_URL ">\n");
78 printf("Bug Reports: <" PACKAGE_BUGREPORT ">\n"); 81 printf("Bug Reports: <" PACKAGE_BUGREPORT ">\n");
@@ -376,6 +379,10 @@ int main(int argc, char *argv[])
376 print_usage(argc, argv); 379 print_usage(argc, argv);
377 return 0; 380 return 0;
378 } 381 }
382 else if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--version")) {
383 printf("%s %s\n", TOOL_NAME, PACKAGE_VERSION);
384 return 0;
385 }
379 else { 386 else {
380 print_usage(argc, argv); 387 print_usage(argc, argv);
381 return 0; 388 return 0;
@@ -440,7 +447,7 @@ int main(int argc, char *argv[])
440 return -1; 447 return -1;
441 } 448 }
442 449
443 if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &client, "ideviceprovision"))) { 450 if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &client, TOOL_NAME))) {
444 fprintf(stderr, "ERROR: Could not connect to lockdownd, error code %d\n", ldret); 451 fprintf(stderr, "ERROR: Could not connect to lockdownd, error code %d\n", ldret);
445 idevice_free(device); 452 idevice_free(device);
446 return -1; 453 return -1;