Don't overwrite error
authorJens Axboe <jens.axboe@oracle.com>
Wed, 21 Feb 2007 19:14:33 +0000 (20:14 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 21 Feb 2007 19:14:33 +0000 (20:14 +0100)
The first error is usually the most interesting, so don't overwrite
in __td_verror().

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

diff --git a/fio.h b/fio.h
index 304f658..aeb45bf 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -425,6 +425,8 @@ struct thread_data {
 
 #define __td_verror(td, err, msg)                                      \
        do {                                                            \
+               if ((td)->error)                                        \
+                       break;                                          \
                int e = (err);                                          \
                (td)->error = e;                                        \
                snprintf(td->verror, sizeof(td->verror) - 1, "file:%s:%d, error=%s", __FILE__, __LINE__, (msg));        \