cli: update error message in set_stream_intersections
[babeltrace.git] / src / cli / babeltrace2-plugins.c
index 6be4e154832e41bb36fefc4ba8b99d066cc476f8..0093d4cea4fe03d4293d41a584df4749336ab772 100644 (file)
@@ -128,7 +128,7 @@ int load_dynamic_plugins(const bt_value *plugin_paths)
 {
        int nr_paths, i, ret = 0;
 
-       nr_paths = bt_value_array_get_size(plugin_paths);
+       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.");
@@ -161,11 +161,13 @@ 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_LOGE("Unable to load dynamic plugins from directory: "
+                       BT_CLI_LOGE_APPEND_CAUSE(
+                               "Unable to load dynamic plugins from directory: "
                                "path=\"%s\"", plugin_path);
-                       continue;
+                       ret = status;
+                       goto end;
                } else if (status ==
                                BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_NOT_FOUND) {
                        BT_LOGI("No plugins found in directory: path=\"%s\"",
This page took 0.024266 seconds and 4 git commands to generate.