libosmocore[master]: vty: derive node name from prompt, use as XML ids

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Sep 20 16:01:19 UTC 2017


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/3979/3/src/vty/command.c
File src/vty/command.c:

Line 158: 	if (!*node->name)
> node->name is a char[], and if it is unset, it starts with 0 as from struct
(Note that if the user set a name during struct composition, we don't do the prompt derive dance. So we can always define proper names later.)

(One consideration was to make the node name talloc'd, but it would clutter struct cmd_node initialization. Having an array also makes deriving the name from the prompt less complex, allocation wise. Of course the name is limited in size, but 64 characters ought to be enough for anyone.....)


-- 
To view, visit https://gerrit.osmocom.org/3979
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8fa555570268b231c5e01727c661da92fad265de
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list