[PATCH] Make the exit value meaningfull

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fio.c b/fio.c
index ace8c5e..61fd098 100644
--- a/fio.c
+++ b/fio.c
@@ -47,6 +47,7 @@
 
 static volatile int startup_sem;
 static volatile int fio_abort;
+static int exit_value;
 
 struct io_log *agg_io_log[2];
 
@@ -811,6 +812,9 @@
 			continue;
 		}
 
+		if (td->error)
+			exit_value++;
+
 		td_set_runstate(td, TD_REAPED);
 
 		if (td->use_thread) {
@@ -1045,5 +1049,5 @@
 		}
 	}
 
-	return 0;
+	return exit_value;
 }