aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-01-17 12:28:16 +0100
committerHarald Welte <laforge@gnumonks.org>2013-01-17 12:28:16 +0100
commite5a093986b0b29523afdaf1149daf61748b290ba (patch)
treee76162105ce12a004431cb664437fb4aecd83d68
parentd1e340f0be94a10a96d5da1d5e4d50c6523aaf77 (diff)
pcu_main: Add '-V' to obtain the (compile) version of osmo-pcu0.1.00.1
-rw-r--r--src/pcu_main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp
index a9e224f..f135cfd 100644
--- a/src/pcu_main.cpp
+++ b/src/pcu_main.cpp
@@ -69,10 +69,11 @@ static void handle_options(int argc, char **argv)
{ "config-file", 1, 0, 'c' },
{ "mcc", 1, 0, 'm' },
{ "mnc", 1, 0, 'n' },
+ { "version", 0, 0, 'V' },
{ 0, 0, 0, 0 }
};
- c = getopt_long(argc, argv, "hc:m:n:",
+ c = getopt_long(argc, argv, "hc:m:n:V",
long_options, &option_idx);
if (c == -1)
break;
@@ -92,6 +93,10 @@ static void handle_options(int argc, char **argv)
case 'n':
spoof_mnc = atoi(optarg);
break;
+ case 'V':
+ print_version(1);
+ exit(0);
+ break;
default:
fprintf(stderr, "Unknown option '%c'\n", c);
exit(0);