string-format: introduce function to format a bt_error
[babeltrace.git] / src / cli / babeltrace2-plugins.c
index 28ee50a51b10d30258bc7f53e35f950bc464f39f..8fdfe3e726008671bea3a81f37661750b1194699 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "babeltrace2-plugins.h"
 
+#include <stdbool.h>
 #include <babeltrace2/babeltrace.h>
 
 /* Array of bt_plugin * */
@@ -129,10 +130,8 @@ int load_dynamic_plugins(const bt_value *plugin_paths)
        int nr_paths, i, ret = 0;
 
        nr_paths = bt_value_array_get_length(plugin_paths);
-       if (nr_paths < 0) {
-               BT_CLI_LOGE_APPEND_CAUSE(
-                       "Cannot load dynamic plugins: no plugin path.");
-               ret = -1;
+       if (nr_paths == 0) {
+               BT_LOGI_STR("No dynamic plugin path.");
                goto end;
        }
 
@@ -161,7 +160,7 @@ int load_dynamic_plugins(const bt_value *plugin_paths)
                }
 
                status = bt_plugin_find_all_from_dir(plugin_path, BT_FALSE,
-                       BT_FALSE, &plugin_set);
+                       BT_TRUE, &plugin_set);
                if (status < 0) {
                        BT_CLI_LOGE_APPEND_CAUSE(
                                "Unable to load dynamic plugins from directory: "
This page took 0.02479 seconds and 4 git commands to generate.