diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2014-11-27 17:51:50 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-12-15 12:34:53 +0100 |
commit | f6f7d83d8d5c64aed8420f41c4fecabfa65e94c5 (patch) | |
tree | da0b000258e1150500d610e737060b8f3c5b3a7a /android/client | |
parent | 8f3a310e8cf1273717fff15988c4e51ac4629817 (diff) | |
download | bluez-f6f7d83d8d5c64aed8420f41c4fecabfa65e94c5.tar.gz |
android/client: Add short option for printing version
This makes haltest options consistent.
Diffstat (limited to 'android/client')
-rw-r--r-- | android/client/haltest.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/android/client/haltest.c b/android/client/haltest.c index e775d0e4f..92cd8114a 100644 --- a/android/client/haltest.c +++ b/android/client/haltest.c @@ -346,14 +346,10 @@ static void usage(void) printf("options:\n" "\t-i --ivi Initialize only IVI interfaces\n" "\t-n, --no-init Don't initialize any interfaces\n" - "\t --version Print version\n" + "\t-v --version Print version\n" "\t-h, --help Show help options\n"); } -enum { - PRINT_VERSION = 1000 -}; - static void print_version(void) { printf("haltest version %s\n", VERSION); @@ -363,7 +359,7 @@ static const struct option main_options[] = { { "no-init", no_argument, NULL, 'n' }, { "ivi", no_argument, NULL, 'i' }, { "help", no_argument, NULL, 'h' }, - { "version", no_argument, NULL, PRINT_VERSION }, + { "version", no_argument, NULL, 'v' }, { NULL } }; @@ -375,7 +371,7 @@ static void parse_command_line(int argc, char *argv[]) for (;;) { int opt; - opt = getopt_long(argc, argv, "inh", main_options, NULL); + opt = getopt_long(argc, argv, "inhv", main_options, NULL); if (opt < 0) break; @@ -389,7 +385,7 @@ static void parse_command_line(int argc, char *argv[]) case 'h': usage(); exit(0); - case PRINT_VERSION: + case 'v': print_version(); exit(0); default: |