summaryrefslogtreecommitdiffstats
path: root/src/vlib/unix
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-09-30 20:04:14 +0200
committerFlorin Coras <florin.coras@gmail.com>2021-10-05 16:44:32 +0000
commit5546e43f7943d6edff6c6587ed4e7233e8002e28 (patch)
tree16b4a8ce7a63c4cf1ce7f367b0d0f1d9268f2849 /src/vlib/unix
parentefd967faff168d037066b6e6824d2a579adbef93 (diff)
build: don't hardcode triplet, allow specifying custom lib dir
Type: fix Change-Id: I33f364fda88914f88f9b976cb83e6d3ff466f0bb Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Diffstat (limited to 'src/vlib/unix')
-rw-r--r--src/vlib/unix/plugin.c9
-rw-r--r--src/vlib/unix/plugin.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/src/vlib/unix/plugin.c b/src/vlib/unix/plugin.c
index 4a7ff2753f2..891e2cb642d 100644
--- a/src/vlib/unix/plugin.c
+++ b/src/vlib/unix/plugin.c
@@ -594,7 +594,12 @@ vlib_plugin_early_init (vlib_main_t * vm)
0x7FFFFFFF /* aka no rate limit */ );
if (pm->plugin_path == 0)
- pm->plugin_path = format (0, "%s%c", vlib_plugin_path, 0);
+ pm->plugin_path = format (0, "%s", vlib_plugin_path);
+
+ if (pm->plugin_path_add)
+ pm->plugin_path = format (pm->plugin_path, ":%s", pm->plugin_path_add);
+
+ pm->plugin_path = format (pm->plugin_path, "%c", 0);
PLUGIN_LOG_DBG ("plugin path %s", pm->plugin_path);
@@ -756,6 +761,8 @@ done:
u8 *s = 0;
if (unformat (input, "path %s", &s))
pm->plugin_path = s;
+ else if (unformat (input, "add-path %s", &s))
+ pm->plugin_path_add = s;
else if (unformat (input, "name-filter %s", &s))
pm->plugin_name_filter = s;
else if (unformat (input, "vat-path %s", &s))
diff --git a/src/vlib/unix/plugin.h b/src/vlib/unix/plugin.h
index e3555fe3ba9..1c46e6b196c 100644
--- a/src/vlib/unix/plugin.h
+++ b/src/vlib/unix/plugin.h
@@ -123,6 +123,7 @@ typedef struct
/* paths and name filters */
u8 *plugin_path;
+ u8 *plugin_path_add;
u8 *plugin_name_filter;
u8 *vat_plugin_path;
u8 *vat_plugin_name_filter;