mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 15:34:30 +00:00
lib: Add some hash name differentiation for Command Hash's
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
7bee25fa20
commit
c81d78cf1c
@ -255,6 +255,9 @@ static bool cmd_hash_cmp(const void *a, const void *b)
|
||||
/* Install top node of command vector. */
|
||||
void install_node(struct cmd_node *node)
|
||||
{
|
||||
#define CMD_HASH_STR_SIZE 256
|
||||
char hash_name[CMD_HASH_STR_SIZE];
|
||||
|
||||
vector_set_index(cmdvec, node->node, node);
|
||||
node->cmdgraph = graph_new();
|
||||
node->cmd_vector = vector_init(VECTOR_MIN_SIZE);
|
||||
@ -263,8 +266,10 @@ void install_node(struct cmd_node *node)
|
||||
cmd_token_new(START_TKN, CMD_ATTR_NORMAL, NULL, NULL);
|
||||
graph_new_node(node->cmdgraph, token,
|
||||
(void (*)(void *)) & cmd_token_del);
|
||||
node->cmd_hash = hash_create_size(16, cmd_hash_key, cmd_hash_cmp,
|
||||
"Command Hash");
|
||||
|
||||
snprintf(hash_name, sizeof(hash_name), "Command Hash: %s", node->name);
|
||||
node->cmd_hash =
|
||||
hash_create_size(16, cmd_hash_key, cmd_hash_cmp, hash_name);
|
||||
}
|
||||
|
||||
/* Return prompt character of specified node. */
|
||||
|
Loading…
Reference in New Issue
Block a user