Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11385 )

Change subject: gtphub: Add --version cmdline option
......................................................................

gtphub: Add --version cmdline option

Related: OS#3576
Change-Id: Icdb2bd9ec90511b51428800d17f8ce81f6804670
---
M src/gprs/gtphub_main.c
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gprs/gtphub_main.c b/src/gprs/gtphub_main.c
index a1a2c1d..f824016 100644
--- a/src/gprs/gtphub_main.c
+++ b/src/gprs/gtphub_main.c
@@ -238,6 +238,7 @@
        printf("  -e,--log-level <nr>      Set a global log level.\n");
        printf("  -r,--restart-file <path> File for counting restarts [%s].\n",
               ccfg->restart_counter_file);
+       printf("  -V,--version         Print the version number.\n");
 }

 static void list_categories(void)
@@ -265,10 +266,11 @@
                        {"timestamp", 0, 0, 'T'},
                        {"log-level", 1, 0, 'e'},
                        {"restart-file", 1, 0, 'r'},
+                       { "version", 0, 0, 'V' },
                        {NULL, 0, 0, 0}
                };

-               c = getopt_long(argc, argv, "hd:Dc:sTe:r:",
+               c = getopt_long(argc, argv, "hd:Dc:sTe:r:V",
                                long_options, &option_index);
                if (c == -1) {
                        if (optind < argc) {
@@ -310,6 +312,10 @@
                case 'r':
                        ccfg->restart_counter_file = optarg;
                        break;
+               case 'V':
+                       print_version(1);
+                       exit(EXIT_SUCCESS);
+                       break;
                default:
                        LOGP(DGTPHUB, LOGL_FATAL, "Invalid command line 
argument, abort.\n");
                        exit(1);

--
To view, visit https://gerrit.osmocom.org/11385
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Icdb2bd9ec90511b51428800d17f8ce81f6804670
Gerrit-Change-Number: 11385
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osm...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)

Reply via email to