X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmain.c;h=7da2a99d46452f7e614875b51ece887249b166ef;hb=8af8e4c5fec518b63c7877b49b228acc2b947177;hp=a1bfcd087726a8f6349d3f4240fea13b0ac3ea7a;hpb=41f18f3ef43db3c0f71b5bf232d27f7004673aef;p=lttv.git diff --git a/ltt/branches/poly/lttv/main.c b/ltt/branches/poly/lttv/main.c index a1bfcd08..7da2a99d 100644 --- a/ltt/branches/poly/lttv/main.c +++ b/ltt/branches/poly/lttv/main.c @@ -7,6 +7,8 @@ #include #include #include +#include + void lttv_option_init(int argc, char **argv); void lttv_option_destroy(); @@ -41,6 +43,7 @@ static void lttv_module_option(void *hook_data); static void lttv_module_path_option(void *hook_data); +static void lttv_help(void); /* Since everything is done in modules, the main program only takes care of the infrastructure. */ @@ -98,7 +101,11 @@ int main(int argc, char **argv) { "add a directory to the module search path", "directory to add to the path", LTTV_OPT_STRING, &a_module_path, lttv_module_path_option, NULL); - + + lttv_option_add("help",'h', "basic help", "none", + LTTV_OPT_NONE, NULL, lttv_help, NULL); + + lttv_hooks_call(before_options, NULL); lttv_option_parse(argc, argv); lttv_hooks_call(after_options, NULL); @@ -139,3 +146,11 @@ void lttv_module_path_option(void *hook_data) { lttv_module_path_add(a_module_path); } + +void lttv_help() +{ + printf("Linux Trace Toolkit Visualizer\n"); + printf("\n"); + lttv_option_show_help(); + printf("\n"); +}