summaryrefslogtreecommitdiff
path: root/blktrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'blktrace.c')
-rw-r--r--blktrace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/blktrace.c b/blktrace.c
index b14daf2..49cfca6 100644
--- 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;