X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=converter%2Fbabeltrace.c;h=d6a9faa0d92b17600aee8c057efe76d3c073243b;hb=b86d17b103112c5b0061e70450fae38acd67a546;hp=88d8423ec043b431444f6df7795744e01e69ca29;hpb=5e86a07184ae8412f8c76b0392930e7f3be65454;p=babeltrace.git diff --git a/converter/babeltrace.c b/converter/babeltrace.c index 88d8423e..d6a9faa0 100644 --- a/converter/babeltrace.c +++ b/converter/babeltrace.c @@ -279,12 +279,6 @@ int main(int argc, char **argv) printf_verbose("Verbose mode active.\n"); printf_debug("Debug mode active.\n"); - - if (bt_value_array_is_empty(cfg->plugin_paths)) { - fprintf(stderr, "No plugin path specified, aborting...\n"); - ret = -1; - goto end; - } component_factory = bt_component_factory_create(); if (!component_factory) { fprintf(stderr, "Failed to create component factory.\n"); @@ -292,14 +286,17 @@ int main(int argc, char **argv) goto end; } - first_plugin_path_value = bt_value_array_get(cfg->plugin_paths, 0); - bt_value_string_get(first_plugin_path_value, &first_plugin_path); - - ret = bt_component_factory_load_recursive(component_factory, - first_plugin_path); - if (ret) { - fprintf(stderr, "Failed to load plugins.\n"); - goto end; + if (cfg->plugin_paths && !bt_value_array_is_empty(cfg->plugin_paths)) { + first_plugin_path_value = bt_value_array_get( + cfg->plugin_paths, 0); + bt_value_string_get(first_plugin_path_value, + &first_plugin_path); + ret = bt_component_factory_load_recursive(component_factory, + first_plugin_path); + if (ret) { + fprintf(stderr, "Failed to dynamically load plugins.\n"); + goto end; + } } ret = bt_component_factory_load_static(component_factory);