X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt-newlib%2Ftracefile.c;h=312829c9601cbc163989154dac4cc07095c84c14;hb=ea45889aea3f0b25ddd071d82261a733f492e9f1;hp=65f618b8f2babf46f1f069ccc2b02439d0b17e34;hpb=bed09760c8a10bc768d5bd9a888a687ccebf81a4;p=lttv.git diff --git a/ltt/branches/poly/ltt-newlib/tracefile.c b/ltt/branches/poly/ltt-newlib/tracefile.c index 65f618b8..312829c9 100644 --- a/ltt/branches/poly/ltt-newlib/tracefile.c +++ b/ltt/branches/poly/ltt-newlib/tracefile.c @@ -1359,6 +1359,13 @@ LttEvent *ltt_tracefile_read(LttTracefile *tf) g_error("Can not map block"); return NULL; } + /* seek to the first event */ + err = ltt_seek_next_event(tf); + if(unlikely(err == ERANGE)) { + g_error("event id is out of range\n"); + return NULL; + } + pos = tf->event.offset; } }