laforge has uploaded this change for review.
osmo-e1d: Add the usual '-V' / '--version' command line argument
Change-Id: Ie2d79c44e580ffa6555f87b969206047ffb7eb6f
---
M src/osmo-e1d.c
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/00/30000/1
diff --git a/src/osmo-e1d.c b/src/osmo-e1d.c
index 281cfc7..2a07763 100644
--- a/src/osmo-e1d.c
+++ b/src/osmo-e1d.c
@@ -100,6 +100,7 @@
{
printf(" Some useful help...\n");
printf(" -h --help This text.\n");
+ printf(" -V --version Print the version of osmo-e1d.\n");
printf(" -d --debug option --debug=DE1D:DXFR enable debugging.\n");
printf(" -c --config-file filename The config file to use.\n");
}
@@ -110,12 +111,13 @@
int option_index = 0, c;
static const struct option long_options[] = {
{"help", 0, 0, 'h'},
+ {"version", 0, 0, 'V'},
{"debug", 1, 0, 'd'},
{"config-file", 1, 0, 'c'},
{0, 0, 0, 0}
};
- c = getopt_long(argc, argv, "hd:c:", long_options, &option_index);
+ c = getopt_long(argc, argv, "hVd:c:", long_options, &option_index);
if (c == -1)
break;
@@ -124,6 +126,10 @@
print_help();
exit(0);
break;
+ case 'V':
+ print_version(1);
+ exit(0);
+ break;
case 'd':
log_parse_category_mask(osmo_stderr_target, optarg);
break;
To view, visit change 30000. To unsubscribe, or for help writing mail filters, visit settings.