projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ctf: make src.ctf.fs handle a single trace
[babeltrace.git]
/
src
/
cli
/
babeltrace2-plugins.c
diff --git
a/src/cli/babeltrace2-plugins.c
b/src/cli/babeltrace2-plugins.c
index cc950ff21ff1ee3b87bc007a4b05b578e9dca8b3..0093d4cea4fe03d4293d41a584df4749336ab772 100644
(file)
--- a/
src/cli/babeltrace2-plugins.c
+++ b/
src/cli/babeltrace2-plugins.c
@@
-22,7
+22,7
@@
* SOFTWARE.
*/
* SOFTWARE.
*/
-#define BT_LOG_TAG "CLI"
+#define BT_LOG_TAG "CLI
/PLUGINS
"
#include "logging.h"
#include "babeltrace2-plugins.h"
#include "logging.h"
#include "babeltrace2-plugins.h"
@@
-77,6
+77,11
@@
size_t get_loaded_plugins_count(void)
return loaded_plugins->len;
}
return loaded_plugins->len;
}
+const bt_plugin **borrow_loaded_plugins(void)
+{
+ return (const bt_plugin **) loaded_plugins->pdata;
+}
+
const bt_plugin *borrow_loaded_plugin(size_t index)
{
BT_ASSERT(index < loaded_plugins->len);
const bt_plugin *borrow_loaded_plugin(size_t index)
{
BT_ASSERT(index < loaded_plugins->len);
@@
-123,7
+128,7
@@
int load_dynamic_plugins(const bt_value *plugin_paths)
{
int nr_paths, i, ret = 0;
{
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.");
if (nr_paths < 0) {
BT_CLI_LOGE_APPEND_CAUSE(
"Cannot load dynamic plugins: no plugin path.");
@@
-156,11
+161,13
@@
int load_dynamic_plugins(const bt_value *plugin_paths)
}
status = bt_plugin_find_all_from_dir(plugin_path, BT_FALSE,
}
status = bt_plugin_find_all_from_dir(plugin_path, BT_FALSE,
- BT_
FALS
E, &plugin_set);
+ BT_
TRU
E, &plugin_set);
if (status < 0) {
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);
"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\"",
} 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.02355 seconds
and
4
git commands to generate.