osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11384
Change subject: Add --version cmdline option ...................................................................... Add --version cmdline option Related: OS#3577 Change-Id: Ibdda54acddde0ac03e202286736d56b6fa51a365 --- M src/main.c 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/84/11384/1 diff --git a/src/main.c b/src/main.c index 560995e..0661498 100644 --- a/src/main.c +++ b/src/main.c @@ -81,6 +81,7 @@ printf("OsmoSIPcon: MNCC to SIP bridge\n"); printf(" -h --help\tthis text\n"); printf(" -c --config-file NAME\tThe config file to use [%s]\n", config_file); + printf(" -V --version\tPrint the version number\n"); } static void handle_options(int argc, char **argv) @@ -90,10 +91,11 @@ static struct option long_options[] = { {"help", 0, 0, 'h'}, {"config-file", 1, 0, 'c'}, + {"version", 0, 0, 'V' }, {NULL, 0, 0, 0} }; - c = getopt_long(argc, argv, "hc:", + c = getopt_long(argc, argv, "hc:V", long_options, &option_index); if (c == -1) break; @@ -105,6 +107,10 @@ case 'c': config_file = optarg; break; + case 'V': + print_version(1); + exit(EXIT_SUCCESS); + break; } } } -- To view, visit https://gerrit.osmocom.org/11384 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibdda54acddde0ac03e202286736d56b6fa51a365 Gerrit-Change-Number: 11384 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osm...@sysmocom.de>