[PATCH] monitor: Fix optstring to parse -b parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux