aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-12-13 11:34:07 -0500
committerSteven Rostedt <rostedt@goodmis.org>2009-12-13 11:34:07 -0500
commit8883a04e689e370e3ca3383003909d3d0b8558bf (patch)
treee275cb4498f033952cc3af3180ede6150c20ff8a
parent8f2de2b4080a3d871810b77dff983f0d89b551ad (diff)
Fix do_read() in case a multiple read is needed
Fix a bug where we tried to read more than needed if a second read is needed. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--trace-input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trace-input.c b/trace-input.c
index 0d50bf0..9e61d20 100644
--- a/trace-input.c
+++ b/trace-input.c
@@ -62,7 +62,7 @@ static int do_read(struct tracecmd_input *handle, void *data, int size)
62 int r; 62 int r;
63 63
64 do { 64 do {
65 r = read(handle->fd, data, size); 65 r = read(handle->fd, data, size - tot);
66 tot += r; 66 tot += r;
67 67
68 if (!r) 68 if (!r)