[PATCH] Move td_verror() into io_ops->queue() hook
[fio.git] / fio.c
diff --git a/fio.c b/fio.c
index 10625f26afd25fd54d72bb896a17c075f0681401..2aeb6f72a5b196e3052876b27c24fd266db90cfe 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -26,6 +26,7 @@
 #include <string.h>
 #include <signal.h>
 #include <time.h>
+#include <locale.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <sys/ipc.h>
@@ -411,7 +412,6 @@ requeue:
                                io_u->xfer_buf += ret;
                                goto requeue;
                        } else {
-                               td_verror(td, io_u->error);
                                put_io_u(td, io_u);
                                break;
                        }
@@ -1005,6 +1005,13 @@ int main(int argc, char *argv[])
 {
        long ps;
 
+       /*
+        * We need locale for number printing, if it isn't set then just
+        * go with the US format.
+        */
+       if (!getenv("LC_NUMERIC"))
+               setlocale(LC_NUMERIC, "en_US");
+
        if (parse_options(argc, argv))
                return 1;