Not all platforms have ENODATA
authorJens Axboe <jens.axboe@oracle.com>
Mon, 2 Jun 2008 10:19:50 +0000 (12:19 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 2 Jun 2008 10:19:50 +0000 (12:19 +0200)
So use EIO instead.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c

diff --git a/fio.c b/fio.c
index 43197b76a7649c54279f2dc82da036f9e023de09..bbfc41e50d3d845da3ef7693a11499e05a1fcb82 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -395,7 +395,7 @@ static void do_verify(struct thread_data *td)
                                 * zero read, fail
                                 */
                                if (!bytes) {
                                 * zero read, fail
                                 */
                                if (!bytes) {
-                                       td_verror(td, ENODATA, "full resid");
+                                       td_verror(td, EIO, "full resid");
                                        put_io_u(td, io_u);
                                        break;
                                }
                                        put_io_u(td, io_u);
                                        break;
                                }
@@ -523,7 +523,7 @@ static void do_io(struct thread_data *td)
                                 * zero read, fail
                                 */
                                if (!bytes) {
                                 * zero read, fail
                                 */
                                if (!bytes) {
-                                       td_verror(td, ENODATA, "full resid");
+                                       td_verror(td, EIO, "full resid");
                                        put_io_u(td, io_u);
                                        break;
                                }
                                        put_io_u(td, io_u);
                                        break;
                                }
@@ -600,7 +600,7 @@ sync_done:
                if (check_min_rate(td, &comp_time)) {
                        if (exitall_on_terminate)
                                terminate_threads(td->groupid);
                if (check_min_rate(td, &comp_time)) {
                        if (exitall_on_terminate)
                                terminate_threads(td->groupid);
-                       td_verror(td, ENODATA, "check_min_rate");
+                       td_verror(td, EIO, "check_min_rate");
                        break;
                }
 
                        break;
                }