From e7c759d8e86ad4b7b1521368df26bc22e7f823cb Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 27 Oct 2011 16:30:29 +0200 Subject: [PATCH] Add verbose mode switch to btmgmt --- mgmt/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mgmt/main.c b/mgmt/main.c index 1788555c9..648ba9f52 100644 --- a/mgmt/main.c +++ b/mgmt/main.c @@ -577,6 +577,7 @@ static void usage(void) "\tbtmgmt [options] [command parameters]\n"); printf("Options:\n" + "\t--verbose\tEnable extra logging\n" "\t--help\tDisplay help\n"); printf("Commands:\n"); @@ -589,6 +590,7 @@ static void usage(void) } static struct option main_options[] = { + { "verbose", 0, 0, 'v' }, { "help", 0, 0, 'h' }, { 0, 0, 0, 0 } }; @@ -598,8 +600,11 @@ int main(int argc, char *argv[]) int opt, i, mgmt_sk; struct pollfd pollfd; - while ((opt=getopt_long(argc, argv, "+h", main_options, NULL)) != -1) { + while ((opt=getopt_long(argc, argv, "+hv", main_options, NULL)) != -1) { switch (opt) { + case 'v': + monitor = true; + break; case 'h': default: usage(); -- 2.47.3