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/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/20473 ) Change subject: vty: fix vty_dump_element(): do not print empty <attributes> ...................................................................... vty: fix vty_dump_element(): do not print empty <attributes> Some attributes like CMD_ATTR_LIB_COMMAND are not being printed to the XML VTY reference (despite being set), so we should not print empty "<attributes scope='global'></attributes>". Change-Id: Ie7e53b080c10564bfef6f0e8ddeb470e46fad387 Related: SYS#4937 --- M src/vty/command.c 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/20473/1 diff --git a/src/vty/command.c b/src/vty/command.c index 29d823e..fd5c045 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -631,6 +631,10 @@ { 0, NULL } }; +/* Public attributes (to be printed in the VTY / XML reference) */ +#define CMD_ATTR_PUBLIC_MASK \ + (CMD_ATTR_IMMEDIATE | CMD_ATTR_NODE_EXIT) + /* Get a flag character for a global VTY command attribute */ static char cmd_attr_get_flag(unsigned int attr) { @@ -670,7 +674,7 @@ print_func(data, " <command id='%s'>%s", xml_string, newline); /* Print global attributes and their description */ - if (cmd->attr != 0x00) { /* ... if at least one flag is set */ + if (cmd->attr & CMD_ATTR_PUBLIC_MASK) { /* ... only public ones */ print_func(data, " <attributes scope='global'>%s", newline); for (i = 0; i < ARRAY_SIZE(cmd_attr_desc) - 1; i++) { -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/20473 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie7e53b080c10564bfef6f0e8ddeb470e46fad387 Gerrit-Change-Number: 20473 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy <vyanitskiy at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201007/904e52b1/attachment.htm>