X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=src%2Flib%2Fplugin%2Fplugin.c;h=16850d80ec2ab68bc8ca26c24138cdb4516e302d;hb=7c7324d323dc3354309e3994714697a84db2c404;hp=58a2419044fc9cd1c34e37d981220fa8079e09b2;hpb=d6f6a5aa1207fc66091bb6cc8d6fe376d89328ac;p=babeltrace.git diff --git a/src/lib/plugin/plugin.c b/src/lib/plugin/plugin.c index 58a24190..16850d80 100644 --- a/src/lib/plugin/plugin.c +++ b/src/lib/plugin/plugin.c @@ -188,6 +188,8 @@ enum bt_plugin_find_all_from_static_status bt_plugin_find_all_from_static( bt_bool fail_on_load_error, const struct bt_plugin_set **plugin_set_out) { + BT_ASSERT_PRE_NO_ERROR(); + /* bt_plugin_so_create_all_from_static() logs errors */ return bt_plugin_so_create_all_from_static(fail_on_load_error, (void *) plugin_set_out); @@ -199,6 +201,7 @@ enum bt_plugin_find_all_from_file_status bt_plugin_find_all_from_file( { enum bt_plugin_find_all_from_file_status status; + BT_ASSERT_PRE_NO_ERROR(); BT_ASSERT_PRE_NON_NULL(path, "Path"); BT_ASSERT_PRE_NON_NULL(path, "Plugin set (output)"); BT_LOGI("Creating plugins from file: path=\"%s\"", path); @@ -282,6 +285,7 @@ enum bt_plugin_find_all_status bt_plugin_find_all(bt_bool find_in_std_env_var, int status = BT_FUNC_STATUS_OK; uint64_t dir_i, plugin_i; + BT_ASSERT_PRE_NO_ERROR(); BT_ASSERT_PRE_NON_NULL(plugin_set_out, "Plugin set (output)"); BT_LOGI("Finding all plugins in standard directories and built-in plugins: " "find-in-std-env-var=%d, find-in-user-dir=%d, " @@ -465,6 +469,7 @@ enum bt_plugin_find_status bt_plugin_find(const char *plugin_name, const struct bt_plugin_set *plugin_set = NULL; uint64_t i; + BT_ASSERT_PRE_NO_ERROR(); BT_ASSERT_PRE_NON_NULL(plugin_name, "Name"); BT_ASSERT_PRE_NON_NULL(plugin_out, "Plugin (output)"); BT_LOGI("Finding named plugin in standard directories and built-in plugins: " @@ -666,6 +671,7 @@ enum bt_plugin_find_all_from_dir_status bt_plugin_find_all_from_dir( enum bt_plugin_find_all_from_dir_status status = BT_FUNC_STATUS_OK; + BT_ASSERT_PRE_NO_ERROR(); BT_ASSERT_PRE_NON_NULL(plugin_set_out, "Plugin set (output)"); BT_LOGI("Creating all plugins in directory: path=\"%s\", recurse=%d", path, recurse);