projects
/
blktrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
7f0062f
)
Check setvbuf return value
author
Eric Sandeen
<sandeen@redhat.com>
Fri, 16 Dec 2011 19:05:02 +0000
(13:05 -0600)
committer
Jens Axboe
<jaxboe@fusionio.com>
Wed, 1 Feb 2012 12:14:24 +0000
(13:14 +0100)
Check for setvbuf failure.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
blktrace.c
patch
|
blob
|
blame
|
history
diff --git
a/blktrace.c
b/blktrace.c
index b14daf20c29cf740415ab7ff2d9f36707060a22d..49cfca61352ddca5233f669e76edb1bea54f84e2 100644
(file)
--- a/
blktrace.c
+++ b/
blktrace.c
@@
-2183,7
+2183,10
@@
static int handle_args(int argc, char *argv[])
piped_output = 1;
handle_pfds = handle_pfds_entries;
pfp = stdout;
- setvbuf(pfp, NULL, _IONBF, 0);
+ if (setvbuf(pfp, NULL, _IONBF, 0)) {
+ perror("setvbuf stdout");
+ return 1;
+ }
} else
handle_pfds = handle_pfds_file;
return 0;