X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf-text%2Fctf-text.c;h=cbf074e07e76db4f03bfd028803ffbdf94745081;hp=40f2f008c5ad12d853b08c958e17b2f4309821bc;hb=95febab3a71bc0d64d9ebd0ce08787d96a51d475;hpb=4963668994aa255cd9e938eab6e504b07817f79a diff --git a/formats/ctf-text/ctf-text.c b/formats/ctf-text/ctf-text.c index 40f2f008..cbf074e0 100644 --- a/formats/ctf-text/ctf-text.c +++ b/formats/ctf-text/ctf-text.c @@ -78,10 +78,11 @@ enum bt_loglevel { BT_LOGLEVEL_DEBUG = 14, }; - +static struct trace_descriptor *ctf_text_open_trace(const char *path, int flags, void (*packet_seek)(struct stream_pos *pos, size_t index, int whence), FILE *metadata_fp); +static void ctf_text_close_trace(struct trace_descriptor *descriptor); static @@ -545,7 +546,7 @@ error: return ret; } - +static struct trace_descriptor *ctf_text_open_trace(const char *path, int flags, void (*packet_seek)(struct stream_pos *pos, size_t index, int whence), FILE *metadata_fp) @@ -582,6 +583,7 @@ error: return NULL; } +static void ctf_text_close_trace(struct trace_descriptor *td) { struct ctf_text_stream_pos *pos = @@ -590,6 +592,7 @@ void ctf_text_close_trace(struct trace_descriptor *td) g_free(pos); } +static void __attribute__((constructor)) ctf_text_init(void) { int ret; @@ -599,4 +602,8 @@ void __attribute__((constructor)) ctf_text_init(void) assert(!ret); } -/* TODO: finalize */ +static +void __attribute__((destructor)) ctf_text_exit(void) +{ + bt_unregister_format(&ctf_text_format); +}