This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/20526 ) Change subject: osmo-trx: add commandline option --vty-ref-xml ...................................................................... osmo-trx: add commandline option --vty-ref-xml The commandline option --vty-ref-xml is needed to enable automatic generation of the VTY reference manual. Change-Id: I34dd36183e013ab005f39b235c4ab561590befb7 Related: SYS#4937, OS#1601 --- M Transceiver52M/osmo-trx.cpp 1 file changed, 15 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp index 4a92447..c32f1ff 100644 --- a/Transceiver52M/osmo-trx.cpp +++ b/Transceiver52M/osmo-trx.cpp @@ -247,9 +247,10 @@ static void print_help() { fprintf(stdout, "Options:\n" - " -h, --help This text\n" - " -C, --config Filename The config file to use\n" - " -V, --version Print the version of OsmoTRX\n" + " -h, --help This text\n" + " -C, --config Filename The config file to use\n" + " -V, --version Print the version of OsmoTRX\n" + " --vty-ref-xml Generate the VTY reference XML output and exit.\n" ); } @@ -266,10 +267,12 @@ unsigned int i; std::vector<std::string> rx_paths, tx_paths; bool rx_paths_set = false, tx_paths_set = false; + static int long_option = 0; static struct option long_options[] = { {"help", 0, 0, 'h'}, {"config", 1, 0, 'C'}, {"version", 0, 0, 'V'}, + {"vty-ref-xml", 0, &long_option, 1}, {NULL, 0, 0, 0} }; @@ -280,6 +283,15 @@ print_help(); exit(0); break; + 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 'a': print_deprecated(option); osmo_talloc_replace_string(trx, &trx->cfg.dev_args, optarg); -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/20526 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I34dd36183e013ab005f39b235c4ab561590befb7 Gerrit-Change-Number: 20526 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy <vyanitskiy at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201009/45844c4b/attachment.htm>