libpfm/libpfm-3.4-unused.patch
2008-05-02 15:15:12 +00:00

23 lines
621 B
Diff

diff -up libpfm-3.4/examples/self_pipe.c.unused libpfm-3.4/examples/self_pipe.c
--- libpfm-3.4/examples/self_pipe.c.unused 2008-05-02 09:49:25.000000000 -0400
+++ libpfm-3.4/examples/self_pipe.c 2008-05-02 09:49:40.000000000 -0400
@@ -125,6 +125,7 @@ main(int argc, char **argv)
size_t len;
char *name;
char c = '0';
+ int nbytes;
/*
* pass options to library (optional)
@@ -312,8 +313,8 @@ main(int argc, char **argv)
* ping pong loop
*/
while(!quit) {
- write(pr[1], "c", 1);
- read(pw[0], &c, 1);
+ nbytes = write(pr[1], "c", 1);
+ nbytes = read(pw[0], &c, 1);
}
if (pfm_stop(ctx_fd))