aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/unix
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-03-23 17:36:56 +0100
committerFlorin Coras <florin.coras@gmail.com>2022-03-23 18:40:16 +0000
commitf87acfaf739f7b6361d6299549a897b03b0cc8c6 (patch)
tree6107b984b0a4ae9b6365eb08e307b377b4266ba5 /src/vlib/unix
parentba465b970e88d02467838bd9c272cb6d5cd653ec (diff)
vppinfra: change vlib_register_node so it takes format string for node name
This allows specifying both c string and vector for node name and removes need for crafting temporary string. Type: improvement Change-Id: I0b016cd70aeda0f68eb6f9171c5152f303be7369 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/unix')
-rw-r--r--src/vlib/unix/cli.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/vlib/unix/cli.c b/src/vlib/unix/cli.c
index 03baf3e58c1..c546948b536 100644
--- a/src/vlib/unix/cli.c
+++ b/src/vlib/unix/cli.c
@@ -2928,11 +2928,9 @@ unix_cli_file_add (unix_cli_main_t * cm, char *name, int fd)
.process_log2_n_stack_bytes = 18,
};
- r.name = name;
-
vlib_worker_thread_barrier_sync (vm);
- vlib_register_node (vm, &r);
+ vlib_register_node (vm, &r, "%v", name);
vec_free (name);
n = vlib_get_node (vm, r.index);