From 9920211fb0c8d52dfa478af1104fbd6e174ed781 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Thu, 27 Mar 2014 09:49:07 +0100 Subject: idevicename: Update usage output to match other tools and add debug option --- tools/idevicename.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tools/idevicename.c') 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; -- cgit v1.1-32-gdbae