/*
* Load plugins from /usr/lib/vpp_plugins by default
*/
-char *vlib_plugin_path = "/usr/lib/vpp_plugins";
+char *vlib_plugin_path = NULL;
char *vlib_plugin_app_version = VPP_BUILD_VER;
+char *vat_plugin_path = NULL;
static void
vpp_find_plugin_path ()
return;
*p = 0;
- s = format (0, "%s/lib/vpp_plugins", path);
-#if uword_bits == 64
- s = format (s, ":%s/lib64/vpp_plugins", path);
-#endif
+ s = format (0, "%s/lib/" CLIB_TARGET_TRIPLET "/vpp_plugins:"
+ "%s/lib/vpp_plugins", path, path);
vec_add1 (s, 0);
vlib_plugin_path = (char *) s;
- s = format (0, "%s/lib/vpp_api_test_plugins", path);
-#if uword_bits == 64
- s = format (s, ":%s/lib64/vpp_api_test_plugins", path);
-#endif
+ s = format (0, "%s/lib/" CLIB_TARGET_TRIPLET "/vpp_api_test_plugins:"
+ "%s/lib/vpp_api_test_plugins", path, path);
vec_add1 (s, 0);
vat_plugin_path = (char *) s;
}
*/
vat_plugin_hash_create ();
- vpp_find_plugin_path ();
+ if (!vlib_plugin_path)
+ vpp_find_plugin_path ();
}
/*
}
argv_ = calloc (1, sizeof (char *));
if (argv_ == NULL)
- return 1;
+ {
+ fclose (fp);
+ return 1;
+ }
arg = strndup (argv[0], 1024);
if (arg == NULL)
- return 1;
+ {
+ fclose (fp);
+ free (argv_);
+ return 1;
+ }
argv_[0] = arg;
while (1)
if (i < (argc - 1))
vlib_plugin_path = argv[++i];
}
+ if (!strncmp (argv[i], "test_plugin_path", 16))
+ {
+ if (i < (argc - 1))
+ vat_plugin_path = argv[++i];
+ }
else if (!strncmp (argv[i], "heapsize", 8))
{
sizep = (u8 *) argv[i + 1];
VLIB_CONFIG_FUNCTION (heapsize_config, "heapsize");
static clib_error_t *
-plugin_path_config (vlib_main_t * vm, unformat_input_t * input)
+dummy_path_config (vlib_main_t * vm, unformat_input_t * input)
{
u8 *junk;
return 0;
}
+static clib_error_t *
+plugin_path_config (vlib_main_t * vm, unformat_input_t * input)
+{
+ return dummy_path_config (vm, input);
+}
+
VLIB_CONFIG_FUNCTION (plugin_path_config, "plugin_path");
+static clib_error_t *
+test_plugin_path_config (vlib_main_t * vm, unformat_input_t * input)
+{
+ return dummy_path_config (vm, input);
+}
+
+VLIB_CONFIG_FUNCTION (test_plugin_path_config, "test_plugin_path");
+
void vl_msg_api_post_mortem_dump (void);
void elog_post_mortem_dump (void);