aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-09-29 22:03:51 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2020-10-08 19:36:35 +0200
commit30863e8720459d38cdb0f2c7755e5be63aa0cc7b (patch)
treed7d1c707c837b6579e9fe9495c03df5681d33b39
parent0fbdfefebc30e389c69f132abda42f79bf8bd620 (diff)
vty: add attributes to VTY commands indicating when they apply
-rw-r--r--CommonLibs/trx_vty.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c
index 3fcf888..cf36547 100644
--- a/CommonLibs/trx_vty.c
+++ b/CommonLibs/trx_vty.c
@@ -415,12 +415,13 @@ static int vty_intv_name_2_id(const char* str) {
INTV_STR_VAL(per-hour) \
INTV_STR_VAL(per-day)
-DEFUN(cfg_ctr_error_threshold, cfg_ctr_error_threshold_cmd,
- "ctr-error-threshold " THRESHOLD_ARGS " <0-65535> " INTV_ARGS,
- "Threshold rate for error counter\n"
- THRESHOLD_STRS
- "Value to set for threshold\n"
- INTV_STRS)
+DEFUN_ATTR(cfg_ctr_error_threshold, cfg_ctr_error_threshold_cmd,
+ "ctr-error-threshold " THRESHOLD_ARGS " <0-65535> " INTV_ARGS,
+ "Threshold rate for error counter\n"
+ THRESHOLD_STRS
+ "Value to set for threshold\n"
+ INTV_STRS,
+ CMD_ATTR_IMMEDIATE)
{
int rc;
struct ctr_threshold ctr;
@@ -446,12 +447,13 @@ DEFUN(cfg_ctr_error_threshold, cfg_ctr_error_threshold_cmd,
return CMD_SUCCESS;
}
-DEFUN(cfg_no_ctr_error_threshold, cfg_no_ctr_error_threshold_cmd,
- "no ctr-error-threshold " THRESHOLD_ARGS " <0-65535> " INTV_ARGS,
- NO_STR "Threshold rate for error counter\n"
- THRESHOLD_STRS
- "Value to set for threshold\n"
- INTV_STRS)
+DEFUN_ATTR(cfg_no_ctr_error_threshold, cfg_no_ctr_error_threshold_cmd,
+ "no ctr-error-threshold " THRESHOLD_ARGS " <0-65535> " INTV_ARGS,
+ NO_STR "Threshold rate for error counter\n"
+ THRESHOLD_STRS
+ "Value to set for threshold\n"
+ INTV_STRS,
+ CMD_ATTR_IMMEDIATE)
{
int rc;
struct ctr_threshold ctr;