X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Foption.c;h=4a42f747531fb54158504b1d9a0fc1f8625b5b3e;hb=a521ac8f8134a60feadf4314d20325b1a6e970fa;hp=aa8656f85a030eb77962c0b90b87d22b1df20f70;hpb=eccb53529c117e1c39bd558e1db7fb801e054fb8;p=lttv.git diff --git a/ltt/branches/poly/lttv/option.c b/ltt/branches/poly/lttv/option.c index aa8656f8..4a42f747 100644 --- a/ltt/branches/poly/lttv/option.c +++ b/ltt/branches/poly/lttv/option.c @@ -1,7 +1,9 @@ - -#include #include +#include "lttv.h" +#include "option.h" +#include "hook.h" + /* Extensible array of popt command line options. Modules add options as they are loaded and initialized. */ @@ -10,8 +12,6 @@ typedef struct _lttv_option { void *hook_data; } lttv_option; -extern lttv_attributes *attributes_global; - static GArray *lttv_options_command; static GArray *lttv_options_command_popt; @@ -46,16 +46,16 @@ void lttv_option_init(int argc, char **argv) { hooks_options_before = lttv_hooks_new(); hooks_options_after = lttv_hooks_new(); - lttv_attributes_set_pointer_pathname(attributes_global, + lttv_attributes_set_pointer_pathname(lttv_global_attributes(), "hooks/options/before", hooks_options_before); - lttv_attributes_set_pointer_pathname(attributes_global, + lttv_attributes_set_pointer_pathname(lttv_global_attributes(), "hooks/options/after", hooks_options_after); lttv_options_command_popt = g_array_new(0,0,sizeof(struct poptOption)); lttv_options_command = g_array_new(0,0,sizeof(lttv_option)); - hooks_init_after = lttv_attributes_get_pointer_pathname(attributes_global, + hooks_init_after = lttv_attributes_get_pointer_pathname(lttv_global_attributes(), "hooks/init/after"); lttv_hooks_add(hooks_init_after, lttv_options_command_parse, NULL); @@ -66,10 +66,10 @@ void lttv_option_destroy() { g_array_free(lttv_options_command_popt,TRUE) ; g_array_free(lttv_options_command,TRUE) ; - lttv_attributes_set_pointer_pathname(attributes_global, + lttv_attributes_set_pointer_pathname(lttv_global_attributes(), "hooks/options/before", NULL); - lttv_attributes_set_pointer_pathname(attributes_global, + lttv_attributes_set_pointer_pathname(lttv_global_attributes(), "hooks/options/after", NULL); lttv_hooks_destroy(hooks_options_before);