diff options
author | Martin Szulecki | 2014-03-27 09:49:07 +0100 |
---|---|---|
committer | Martin Szulecki | 2014-03-27 09:49:07 +0100 |
commit | 9920211fb0c8d52dfa478af1104fbd6e174ed781 (patch) | |
tree | 6268504f5f3a52b8c3ee6c8e0a2809dfda6d4874 /tools/idevicename.c | |
parent | 35ce2b89b0cd26f3eb128ed038d3713019111706 (diff) | |
download | libimobiledevice-9920211fb0c8d52dfa478af1104fbd6e174ed781.tar.gz libimobiledevice-9920211fb0c8d52dfa478af1104fbd6e174ed781.tar.bz2 |
idevicename: Update usage output to match other tools and add debug option
Diffstat (limited to 'tools/idevicename.c')
-rw-r--r-- | tools/idevicename.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/idevicename.c b/tools/idevicename.c index e930f57..c5f293d 100644 --- a/tools/idevicename.c +++ b/tools/idevicename.c @@ -33,8 +33,9 @@ static void print_usage() printf("Usage: idevicename [OPTIONS] [NAME]\n"); printf("Display the device name or set it to NAME if specified.\n"); printf("\n"); - printf(" --udid|-u UDID use UDID to target a specific device\n"); - printf(" --help|-h print usage information\n"); + printf(" -d, --debug\t\tenable communication debugging\n"); + printf(" -u, --udid UDID\tuse UDID to target a specific device\n"); + printf(" -h, --help\t\tprint usage information\n"); printf("\n"); } @@ -51,7 +52,7 @@ int main(int argc, char** argv) { NULL, 0, NULL, 0} }; - while ((c = getopt_long(argc, argv, "u:h", longopts, &optidx)) != -1) { + while ((c = getopt_long(argc, argv, "du:h", longopts, &optidx)) != -1) { switch (c) { case 'u': udid = strdup(optarg); @@ -59,6 +60,9 @@ int main(int argc, char** argv) case 'h': print_usage(); return 0; + case 'd': + idevice_set_debug_level(1); + break; default: print_usage(); return -1; |