Remove warnings when using bt_plugin_create_all_from_dir()
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 29 May 2017 18:47:52 +0000 (14:47 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 9 Jun 2017 20:58:12 +0000 (16:58 -0400)
commit50ad9320ef034cba9c1b997d57c69e09f1152d87
treeaff2f9098792ef0145efd3e00660360312af4b2f
parent7f8b9578155e3a870d7e6e7520313a45392151c6
Remove warnings when using bt_plugin_create_all_from_dir()

bt_plugin_create_all_from_dir() expects an existing directory, otherwise
it fails with a WARN-level log message because it's the user's
responsibility to ensure this.

A few functions of the library and the CLI call this with nonexisting
paths, resulting in warnings under normal usage (for example, default
plugin search paths which do not exist; this is not an error nor a
warning).

This patch fixes this by testing the existence of the paths passed to
bt_plugin_create_all_from_dir() with g_file_test(), skipping (usually
with a VERBOSE-level message) when it's not the case.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
cli/babeltrace.c
lib/plugin/plugin-so.c
lib/plugin/plugin.c
This page took 0.027323 seconds and 4 git commands to generate.