[PATCH] Stub changes for vty documentation

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/OpenBSC@lists.osmocom.org/.

Katerina Barone-Adesi kat.obsc at gmail.com
Fri Mar 1 18:31:38 UTC 2013


contrib/dump_all_data.py showed several (null) documentation messages.
This patch aims to show what needs to be documented.
Please do not apply this patch as-is: this is stub documentation, which
needs to be edited by someone familiar with the particular VTY commands.
---
 openbsc/src/libbsc/bsc_vty.c              | 4 ++--
 openbsc/src/libmgcp/mgcp_vty.c            | 4 ++--
 openbsc/src/libmsc/vty_interface_layer3.c | 6 ++++--
 openbsc/src/osmo-bsc/osmo_bsc_vty.c       | 7 ++++---
 4 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index ec92c18..29ec065 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -2644,7 +2644,7 @@ DEFUN(cfg_ts,
 DEFUN(cfg_ts_pchan,
       cfg_ts_pchan_cmd,
       "phys_chan_config PCHAN", /* dynamically generated! */
-      "Physical Channel configuration (TCH/SDCCH/...)")
+      "Physical Channel configuration (TCH/SDCCH/...)\n" "PCHAN\n")
 {
 	struct gsm_bts_trx_ts *ts = vty->index;
 	int pchanc;
@@ -2663,7 +2663,7 @@ DEFUN(cfg_ts_pchan,
 DEFUN_HIDDEN(cfg_ts_pchan_compat,
       cfg_ts_pchan_compat_cmd,
       "phys_chan_config PCHAN",
-      "Physical Channel configuration (TCH/SDCCH/...)")
+      "Physical Channel configuration (TCH/SDCCH/...)\n" "PCHAN\n")
 {
 	struct gsm_bts_trx_ts *ts = vty->index;
 	int pchanc;
diff --git a/openbsc/src/libmgcp/mgcp_vty.c b/openbsc/src/libmgcp/mgcp_vty.c
index 88d793f..9e3051d 100644
--- a/openbsc/src/libmgcp/mgcp_vty.c
+++ b/openbsc/src/libmgcp/mgcp_vty.c
@@ -327,7 +327,7 @@ ALIAS_DEPRECATED(cfg_mgcp_rtp_ip_dscp, cfg_mgcp_rtp_ip_tos_cmd,
 DEFUN(cfg_mgcp_sdp_fmtp_extra,
       cfg_mgcp_sdp_fmtp_extra_cmd,
       "sdp audio fmtp-extra .NAME",
-      "Add extra fmtp for the SDP file\n")
+      "Add extra fmtp for the SDP file\n" "Audio\n" "Fmtp-extra\n" "Name\n")
 {
 	char *txt = argv_concat(argv, argc, 0);
 	if (!txt)
@@ -508,7 +508,7 @@ static int config_write_trunk(struct vty *vty)
 DEFUN(cfg_trunk_sdp_fmtp_extra,
       cfg_trunk_sdp_fmtp_extra_cmd,
       "sdp audio fmtp-extra .NAME",
-      "Add extra fmtp for the SDP file\n")
+      "Add extra fmtp for the SDP file\n" "Audio\n" "Fmtp-extra\n" "Name\n")
 {
 	struct mgcp_trunk_config *trunk = vty->index;
 	char *txt = argv_concat(argv, argc, 0);
diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c
index 441ee1e..efd1e9b 100644
--- a/openbsc/src/libmsc/vty_interface_layer3.c
+++ b/openbsc/src/libmsc/vty_interface_layer3.c
@@ -231,7 +231,7 @@ DEFUN(subscriber_send_pending_sms,
 DEFUN(subscriber_send_sms,
       subscriber_send_sms_cmd,
       "subscriber " SUBSCR_TYPES " ID sms sender " SUBSCR_TYPES " SENDER_ID send .LINE",
-	SUBSCR_HELP "SMS Operations\n" "Send SMS\n" "Actual SMS Text")
+	SUBSCR_HELP "SMS Operations\n" SUBSCR_HELP "Actual SMS Text\n" "LINE\n")
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 	struct gsm_subscriber *subscr = get_subscr_by_argv(gsmnet, argv[0], argv[1]);
@@ -911,11 +911,13 @@ DEFUN(mnccint_def_codec_h,
 	return CMD_SUCCESS;
 }
 
+#define OBSOLETE_MSG "Obsolete\n"
 /* this is just for backwards compatibility as the sms code moved into
  * libosmocore and old config files no longer parse... */
 DEFUN_DEPRECATED(log_level_sms, log_level_sms_cmd,
 	"logging level sms (everything|debug|info|notice|error|fatal)",
-	".HIDDEN")
+	".HIDDEN\n" OBSOLETE_MSG OBSOLETE_MSG OBSOLETE_MSG OBSOLETE_MSG
+	OBSOLETE_MSG OBSOLETE_MSG OBSOLETE_MSG OBSOLETE_MSG)
 {
 	vty_out(vty, "%% 'logging level sms' is now called 'logging level "
 		"lsms', please update your config %s", VTY_NEWLINE);
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
index fb38848..ff235e7 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
@@ -180,7 +180,7 @@ static int config_write_bsc(struct vty *vty)
 DEFUN(cfg_net_bsc_token,
       cfg_net_bsc_token_cmd,
       "token TOKEN",
-      "A token for the BSC to be sent to the MSC")
+      "A token for the BSC to be sent to the MSC\n" "A token\n")
 {
 	struct osmo_msc_data *data = osmo_msc_data(vty);
 
@@ -335,7 +335,8 @@ DEFUN(cfg_net_msc_no_dest,
 DEFUN(cfg_net_msc_ping_time,
       cfg_net_msc_ping_time_cmd,
       "timeout-ping NR",
-      "Set the PING interval, negative for not sending PING")
+      "Set the PING interval, negative for not sending PING.\n"
+      "Timeout in seconds\n")
 {
 	struct osmo_msc_data *data = osmo_msc_data(vty);
 	data->ping_timeout = atoi(argv[0]);
@@ -345,7 +346,7 @@ DEFUN(cfg_net_msc_ping_time,
 DEFUN(cfg_net_msc_pong_time,
       cfg_net_msc_pong_time_cmd,
       "timeout-pong NR",
-      "Set the time to wait for a PONG.")
+      "Set the time to wait for a PONG.\n" "Timeout in seconds\n")
 {
 	struct osmo_msc_data *data = osmo_msc_data(vty);
 	data->pong_timeout = atoi(argv[0]);
-- 
1.8.1.2





More information about the OpenBSC mailing list