monitor: Fix optstring to parse -b parameter
PATCH 1/1 monitor: Fix optstring to parse -b parameter
Without the colon getopt ignores the parameter and optarg is always NULL.
--- monitor/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
monitor/main.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.5.4
Hi Anton,
Quoted 4 lines · 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(-)
I tested your patch and it fixed -b option for me.
Best Regards,
Signature · 3 lines
Anderson Lizardo Instituto Nokia de Tecnologia - INdT Manaus - Brazil
Hi Anton,
Quoted 10 lines · 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(-)monitor/main.c +0
-0
monitor/main.c int main(int argc, char *argv[]) · line 78
Quoted 7 lines
monitor/main.c +1
-1@@ -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
Johan Hedberg
AppliedHi Anton,
Quoted 4 lines · 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(-)
Applied. Thanks.
Johan