linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] monitor: Fix optstring to parse -b parameter
@ 2012-06-15 11:43 Anton Weber
  2012-06-25 13:04 ` Anderson Lizardo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Anton Weber @ 2012-06-15 11:43 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anton Weber

Without the colon getopt ignores the parameter and optarg is always NULL.
---
 monitor/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/monitor/main.c b/monitor/main.c
index 90e32c5..0b8ae30 100644
--- a/monitor/main.c
+++ b/monitor/main.c
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
 	for (;;) {
 		int opt;
 
-		opt = getopt_long(argc, argv, "bvh", main_options, NULL);
+		opt = getopt_long(argc, argv, "b:vh", main_options, NULL);
 		if (opt < 0)
 			break;
 
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] monitor: Fix optstring to parse -b parameter
  2012-06-15 11:43 [PATCH] monitor: Fix optstring to parse -b parameter Anton Weber
@ 2012-06-25 13:04 ` Anderson Lizardo
  2012-06-26 15:33 ` Gustavo Padovan
  2012-06-28  7:36 ` Johan Hedberg
  2 siblings, 0 replies; 4+ messages in thread
From: Anderson Lizardo @ 2012-06-25 13:04 UTC (permalink / raw)
  To: Anton Weber; +Cc: linux-bluetooth

Hi Anton,

On Fri, Jun 15, 2012 at 7:43 AM, Anton Weber <ant@antweb.me> wrote:
> Without the colon getopt ignores the parameter and optarg is always NULL.
> ---
>  monitor/main.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

I tested your patch and it fixed -b option for me.

Best Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] monitor: Fix optstring to parse -b parameter
  2012-06-15 11:43 [PATCH] monitor: Fix optstring to parse -b parameter Anton Weber
  2012-06-25 13:04 ` Anderson Lizardo
@ 2012-06-26 15:33 ` Gustavo Padovan
  2012-06-28  7:36 ` Johan Hedberg
  2 siblings, 0 replies; 4+ messages in thread
From: Gustavo Padovan @ 2012-06-26 15:33 UTC (permalink / raw)
  To: Anton Weber; +Cc: linux-bluetooth

Hi Anton,

* Anton Weber <ant@antweb.me> [2012-06-15 13:43:00 +0200]:

> Without the colon getopt ignores the parameter and optarg is always NULL.
> ---
>  monitor/main.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/monitor/main.c b/monitor/main.c
> index 90e32c5..0b8ae30 100644
> --- a/monitor/main.c
> +++ b/monitor/main.c
> @@ -73,7 +73,7 @@ int main(int argc, char *argv[])
>  	for (;;) {
>  		int opt;
>  
> -		opt = getopt_long(argc, argv, "bvh", main_options, NULL);
> +		opt = getopt_long(argc, argv, "b:vh", main_options, NULL);
>  		if (opt < 0)
>  			break;

Ack.

	Gustavo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] monitor: Fix optstring to parse -b parameter
  2012-06-15 11:43 [PATCH] monitor: Fix optstring to parse -b parameter Anton Weber
  2012-06-25 13:04 ` Anderson Lizardo
  2012-06-26 15:33 ` Gustavo Padovan
@ 2012-06-28  7:36 ` Johan Hedberg
  2 siblings, 0 replies; 4+ messages in thread
From: Johan Hedberg @ 2012-06-28  7:36 UTC (permalink / raw)
  To: Anton Weber; +Cc: linux-bluetooth

Hi Anton,

On Fri, Jun 15, 2012, Anton Weber wrote:
> Without the colon getopt ignores the parameter and optarg is always NULL.
> ---
>  monitor/main.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied. Thanks.

Johan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-28  7:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-15 11:43 [PATCH] monitor: Fix optstring to parse -b parameter Anton Weber
2012-06-25 13:04 ` Anderson Lizardo
2012-06-26 15:33 ` Gustavo Padovan
2012-06-28  7:36 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).