mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-hlr.git
synced 2025-11-03 05:33:28 +00:00
Compare commits
2 Commits
1.7.0
...
neels/vtyr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b53ea78009 | ||
|
|
1b40a93031 |
@@ -1,11 +1,11 @@
|
|||||||
AUTOMAKE_OPTIONS = foreign dist-bzip2
|
AUTOMAKE_OPTIONS = foreign dist-bzip2
|
||||||
|
|
||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
doc \
|
|
||||||
src \
|
src \
|
||||||
include \
|
include \
|
||||||
sql \
|
sql \
|
||||||
contrib \
|
contrib \
|
||||||
|
doc \
|
||||||
tests \
|
tests \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,11 @@ if BUILD_MANUALS
|
|||||||
VTY_REFERENCE = osmohlr-vty-reference.xml
|
VTY_REFERENCE = osmohlr-vty-reference.xml
|
||||||
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc
|
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc
|
||||||
|
|
||||||
|
BUILT_REFERENCE_XML = $(builddir)/vty/hlr_vty_reference.xml
|
||||||
|
$(builddir)/vty/hlr_vty_reference.xml: $(top_builddir)/src/osmo-hlr
|
||||||
|
mkdir -p $(builddir)/vty
|
||||||
|
$(top_builddir)/src/osmo-hlr --vty-ref-xml > $@
|
||||||
|
|
||||||
OSMO_REPOSITORY = osmo-hlr
|
OSMO_REPOSITORY = osmo-hlr
|
||||||
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc
|
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc
|
||||||
endif
|
endif
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
12
src/hlr.c
12
src/hlr.c
@@ -576,6 +576,7 @@ static void print_help()
|
|||||||
printf(" -U --db-upgrade Allow HLR database schema upgrades.\n");
|
printf(" -U --db-upgrade Allow HLR database schema upgrades.\n");
|
||||||
printf(" -C --db-check Quit after opening (and upgrading) the database.\n");
|
printf(" -C --db-check Quit after opening (and upgrading) the database.\n");
|
||||||
printf(" -V --version Print the version of OsmoHLR.\n");
|
printf(" -V --version Print the version of OsmoHLR.\n");
|
||||||
|
printf(" --vty-ref-xml Generate the VTY reference XML output and exit.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
@@ -595,6 +596,7 @@ static void handle_options(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
while (1) {
|
while (1) {
|
||||||
int option_index = 0, c;
|
int option_index = 0, c;
|
||||||
|
static int long_option = 0;
|
||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
{"help", 0, 0, 'h'},
|
{"help", 0, 0, 'h'},
|
||||||
{"config-file", 1, 0, 'c'},
|
{"config-file", 1, 0, 'c'},
|
||||||
@@ -607,6 +609,7 @@ static void handle_options(int argc, char **argv)
|
|||||||
{"db-upgrade", 0, 0, 'U' },
|
{"db-upgrade", 0, 0, 'U' },
|
||||||
{"db-check", 0, 0, 'C' },
|
{"db-check", 0, 0, 'C' },
|
||||||
{"version", 0, 0, 'V' },
|
{"version", 0, 0, 'V' },
|
||||||
|
{"vty-ref-xml", 0, &long_option, 1},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -620,6 +623,15 @@ static void handle_options(int argc, char **argv)
|
|||||||
print_usage();
|
print_usage();
|
||||||
print_help();
|
print_help();
|
||||||
exit(0);
|
exit(0);
|
||||||
|
case 0:
|
||||||
|
switch (long_option) {
|
||||||
|
case 1:
|
||||||
|
vty_dump_xml_ref(stdout);
|
||||||
|
exit(0);
|
||||||
|
default:
|
||||||
|
fprintf(stderr, "error parsing cmdline options\n");
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
case 'c':
|
case 'c':
|
||||||
cmdline_opts.config_file = optarg;
|
cmdline_opts.config_file = optarg;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user