diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2009-04-02 18:44:34 -0400 |
---|---|---|
committer | Masami Hiramatsu <mhiramat@redhat.com> | 2009-04-02 18:44:34 -0400 |
commit | 5aa1f218c5ff8a459c324ac64ee7a9b8046e683d (patch) | |
tree | 323698c22c97a7d466a10990d3d810528d85ba2e /runtime/staprun/relay.c | |
parent | 093421c6ba933754aa52cf6399aae5b8f86d86d9 (diff) | |
download | systemtap-steved-5aa1f218c5ff8a459c324ac64ee7a9b8046e683d.tar.gz systemtap-steved-5aa1f218c5ff8a459c324ac64ee7a9b8046e683d.tar.xz systemtap-steved-5aa1f218c5ff8a459c324ac64ee7a9b8046e683d.zip |
Fix a bug in file size limitation code.
This fixes a bug in stapio, which checks written data size and switches
new file when it exceeds a limit. The problem is that written-data-size
counter ignores the first written-data size when switching files. So,
actual file size always exceeds the limit. This changes stapio to
initialize written-data-size counter with the size of the data which
will be written in new file.
Diffstat (limited to 'runtime/staprun/relay.c')
-rw-r--r-- | runtime/staprun/relay.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/staprun/relay.c b/runtime/staprun/relay.c index 50f295b5..694cb27e 100644 --- a/runtime/staprun/relay.c +++ b/runtime/staprun/relay.c @@ -200,7 +200,7 @@ static void *reader_thread(void *data) perr("Couldn't open file for cpu %d, exiting.", cpu); return(NULL); } - wsize = 0; + wsize = rc; } if (write(out_fd[cpu], buf, rc) != rc) { perr("Couldn't write to output %d for cpu %d, exiting.", out_fd[cpu], cpu); |