Plugin symbol resolving fix
[babeltrace.git] / converter / babeltrace.c
index 748cd6b80040977d51afde9357fef108f2009e90..568d5b8f98d9102282c40a08904bddb35b057a37 100644 (file)
@@ -40,6 +40,8 @@
 
 #include <babeltrace/iterator.h>
 #include <babeltrace/plugin/component-factory.h>
+#include <babeltrace/ref.h>
+#include <babeltrace/values.h>
 #include <popt.h>
 #include <errno.h>
 #include <stdlib.h>
@@ -733,6 +735,7 @@ int main(int argc, char **argv)
        struct bt_trace_descriptor *td_write;
        struct bt_context *ctx;
        struct bt_component_factory *component_factory;
+       struct bt_value *components = NULL;
        int i;
 
        call_plugins_hooks();
@@ -772,6 +775,13 @@ int main(int argc, char **argv)
                goto end;
        }
 
+       components = bt_component_factory_get_components(component_factory);
+       if (!components || bt_value_array_is_empty(components)) {
+               printf_error("No plugins found, exiting.");
+               ret = -1;
+               goto end;
+       }
+
        if (opt_input_paths->len == 0) {
                ret = -1;
                goto end;
@@ -907,6 +917,8 @@ end:
        free(opt_debug_info_dir);
        free(opt_debug_info_target_prefix);
        g_ptr_array_free(opt_input_paths, TRUE);
+       BT_PUT(components);
+       BT_PUT(component_factory);
        if (partial_error)
                exit(EXIT_FAILURE);
        else
This page took 0.023333 seconds and 4 git commands to generate.