X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Flttv%2Fmain.c;h=29aa288e43a5715ec8dc284004c6bb3d3e8dc76e;hb=76373d36bc73cd876b20a1ca173aeb35b1209d0c;hp=f984df1414c656f26557059adc4487081c1a64dd;hpb=3754677c8ad59f7ed1194114bfd6ed9b0ad79037;p=lttv.git diff --git a/ltt/branches/poly/lttv/lttv/main.c b/ltt/branches/poly/lttv/lttv/main.c index f984df14..29aa288e 100644 --- a/ltt/branches/poly/lttv/lttv/main.c +++ b/ltt/branches/poly/lttv/lttv/main.c @@ -16,6 +16,9 @@ * MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -26,6 +29,7 @@ #include #include #include +#include /* The main program maintains a few central data structures and relies @@ -147,9 +151,9 @@ int main(int argc, char **argv) { GError *error = NULL; LttvModule *module_module = lttv_module_require("module", &error); - if(error != NULL) g_error(error->message); + if(error != NULL) g_error("%s", error->message); LttvModule *module_option = lttv_module_require("option", &error); - if(error != NULL) g_error(error->message); + if(error != NULL) g_error("%s", error->message); /* Initialize the module loading */ @@ -237,7 +241,7 @@ void lttv_module_option(void *hook_data) GError *error = NULL; lttv_module_require(a_module, &error); - if(error != NULL) g_error(error->message); + if(error != NULL) g_error("%s", error->message); } @@ -261,8 +265,8 @@ void lttv_debug(void *hook_data) void lttv_fatal(void *hook_data) { - //g_log_set_always_fatal(G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); - g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); + g_log_set_always_fatal(G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); + //g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); g_info("Critical log from glib will abort execution"); }