Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@tieto.com>
To: linux-bluetooth@vger.kernel.org
Cc: Szymon Janc <szymon.janc@tieto.com>
Subject: [PATCH 3/3] android/client: Add short option for printing version
Date: Thu, 27 Nov 2014 18:04:40 +0100	[thread overview]
Message-ID: <1417107880-13118-3-git-send-email-szymon.janc@tieto.com> (raw)
In-Reply-To: <1417107880-13118-1-git-send-email-szymon.janc@tieto.com>

This makes haltest options consistent.
---
 android/client/haltest.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/android/client/haltest.c b/android/client/haltest.c
index 0eaa43d..d514122 100644
--- a/android/client/haltest.c
+++ b/android/client/haltest.c
@@ -338,14 +338,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);
@@ -355,7 +351,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 }
 };
 
@@ -367,7 +363,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;
 
@@ -381,7 +377,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:
-- 
1.9.1


  parent reply	other threads:[~2014-11-27 17:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27 17:04 [PATCH 1/3] android/hal-utils: Refactor btproperty2str Szymon Janc
2014-11-27 17:04 ` [PATCH 2/3] android/client: Add option to initialize only IVI roles Szymon Janc
2014-11-27 17:04 ` Szymon Janc [this message]
2014-12-15 11:41 ` [PATCH 1/3] android/hal-utils: Refactor btproperty2str Szymon Janc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417107880-13118-3-git-send-email-szymon.janc@tieto.com \
    --to=szymon.janc@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox