From 4f4118c97c4a517775eed941c295594c5cf57bb4 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 27 Apr 2006 13:19:56 +0200 Subject: [PATCH] [PATCH] splice-bench: error checking --- splice-bench.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/splice-bench.c b/splice-bench.c index 65dcd4c..5419eca 100644 --- a/splice-bench.c +++ b/splice-bench.c @@ -372,12 +372,23 @@ int client_splice(int out_fd, int file_fd, int offset) int do_client(int out_fd, int file_fd, int offset) { - if (run_splice) - client_splice(out_fd, file_fd, offset); - if (run_mmap) - client_mmap(out_fd, file_fd, offset); - if (run_rw) - client_rw(out_fd, file_fd, offset); + int ret; + + if (run_splice) { + ret = client_splice(out_fd, file_fd, offset); + if (ret) + return ret; + } + if (run_mmap) { + ret = client_mmap(out_fd, file_fd, offset); + if (ret) + return ret; + } + if (run_rw) { + ret = client_rw(out_fd, file_fd, offset); + if (ret) + return ret; + } return 0; } -- 2.25.1