[PATCH] Pretty up stat output

Always convert numbers to a known base. We could have byte range values
or gigabyte range values, reading huge numbers can be difficult.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fio.c b/fio.c
index 10625f2..9c97033 100644
--- 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>
@@ -1005,6 +1006,13 @@
 {
 	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;