X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=ltt%2Fbranches%2Fpoly%2Fltt%2Ftracefile.c;h=a2f7bbadcc380376751ea64acaa6016ba8bd6afb;hb=f7afe191fd58f0bf4bab9c9514c261535b99d32b;hp=e3829fbfbe6ca5006fa7390739ee3b03c88cbc7a;hpb=b445142a71748192520cfd645b4963e23070a486;p=lttv.git diff --git a/ltt/branches/poly/ltt/tracefile.c b/ltt/branches/poly/ltt/tracefile.c index e3829fbf..a2f7bbad 100644 --- a/ltt/branches/poly/ltt/tracefile.c +++ b/ltt/branches/poly/ltt/tracefile.c @@ -404,7 +404,7 @@ void getCpuFileInfo(LttTrace *t, char* cpu) *are released as well. ****************************************************************************/ -LttTrace *ltt_trace_open(char *pathname) +LttTrace *ltt_trace_open(const char *pathname) { LttTrace * t; LttSystemDescription * sys_description; @@ -463,6 +463,16 @@ LttTrace *ltt_trace_open(char *pathname) return t; } +/****************************************************************************** + * When we copy a trace, we want all the opening actions to happen again : + * the trace will be reopened and totally independant from the original. + * That's why we call ltt_trace_open. + *****************************************************************************/ +LttTrace *ltt_trace_copy(LttTrace *self) +{ + return ltt_trace_open(self->pathname); +} + void ltt_trace_close(LttTrace *t) { int i;