diff options
author | Gustavo Padovan <gustavo@padovan.org> | 2012-04-26 23:00:37 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-04-27 15:16:08 +0300 |
commit | 0c8e425395827785e6f3fcfd0df6af8a771f0565 (patch) | |
tree | c65736935f39df152067963a359a90e2d13e9be4 /monitor/main.c | |
parent | 4b93cdd7bea7b435bc7d34104999bbd2d838d077 (diff) | |
download | bluez-0c8e425395827785e6f3fcfd0df6af8a771f0565.tar.gz |
monitor: add version information
Diffstat (limited to 'monitor/main.c')
-rw-r--r-- | monitor/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/monitor/main.c b/monitor/main.c index 3c4886f30..4e8b43309 100644 --- a/monitor/main.c +++ b/monitor/main.c @@ -58,6 +58,7 @@ static void usage(void) static const struct option main_options[] = { { "btsnoop", required_argument, NULL, 'b' }, + { "version", no_argument, NULL, 'v' }, { "help", no_argument, NULL, 'h' }, { } }; @@ -72,7 +73,7 @@ int main(int argc, char *argv[]) for (;;) { int opt; - opt = getopt_long(argc, argv, "bh", main_options, NULL); + opt = getopt_long(argc, argv, "bvh", main_options, NULL); if (opt < 0) break; @@ -80,6 +81,9 @@ int main(int argc, char *argv[]) case 'b': btsnoop_open(optarg); break; + case 'v': + printf("%s\n", VERSION); + return EXIT_SUCCESS; case 'h': usage(); return EXIT_SUCCESS; |