projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: lttng-live format: do not error out on empty streams hang up
[babeltrace.git]
/
formats
/
ctf
/
ctf.c
diff --git
a/formats/ctf/ctf.c
b/formats/ctf/ctf.c
index 980ebc9a9602d47323524194e60752089851134e..1ba9017fdbd5124972bb13ab3fa2c97e4c1b1d68 100644
(file)
--- a/
formats/ctf/ctf.c
+++ b/
formats/ctf/ctf.c
@@
-2571,8
+2571,13
@@
int ctf_open_mmap_stream_read(struct ctf_trace *td,
}
ret = prepare_mmap_stream_definition(td, file_stream, packet_seek);
}
ret = prepare_mmap_stream_definition(td, file_stream, packet_seek);
- if (ret)
+ if (ret) {
+ /* We need to check for EOF here for empty files. */
+ if (unlikely(file_stream->pos.offset == EOF)) {
+ ret = 0;
+ }
goto error_index;
goto error_index;
+ }
/*
* For now, only a single clock per trace is supported.
/*
* For now, only a single clock per trace is supported.
This page took
0.022871 seconds
and
4
git commands to generate.