mirror of https://gerrit.osmocom.org/libosmocore
vty list: fix deprecation/hidden bit logic
If a command is both hidden and deprecated, still don't show it for the 'list' command. We currently have no such nodes, as it seems, though. Related: OS#3584 Change-Id: I07ec15cab057a3e09064e0420a69121ee8eb4253
This commit is contained in:
parent
cf8def25d5
commit
a7557fe0f5
|
@ -2728,8 +2728,7 @@ gDEFUN(config_list, config_list_cmd, "list", "Print command list\n")
|
|||
|
||||
for (i = 0; i < vector_active(cnode->cmd_vector); i++)
|
||||
if ((cmd = vector_slot(cnode->cmd_vector, i)) != NULL
|
||||
&& !(cmd->attr == CMD_ATTR_DEPRECATED
|
||||
|| cmd->attr == CMD_ATTR_HIDDEN))
|
||||
&& !(cmd->attr & (CMD_ATTR_DEPRECATED | CMD_ATTR_HIDDEN)))
|
||||
vty_out(vty, " %s%s", cmd->string, VTY_NEWLINE);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue