[PATCH] Set locale in blkparse
authorJens Axboe <axboe@suse.de>
Tue, 6 Sep 2005 12:52:04 +0000 (14:52 +0200)
committerJens Axboe <axboe@suse.de>
Tue, 6 Sep 2005 12:52:04 +0000 (14:52 +0200)
Otherwise the 1000 numerator wont work.

blkparse.c

index e43f89beb6dcf9b1fa32daecf7a2e2d9eb89785f..cf849aba1dad1bd86beb6136b0ed26bd8dffe138 100644 (file)
@@ -28,6 +28,7 @@
 #include <getopt.h>
 #include <errno.h>
 #include <signal.h>
+#include <locale.h>
 
 #include "blktrace.h"
 #include "rbtree.h"
@@ -768,6 +769,8 @@ int main(int argc, char *argv[])
        signal(SIGHUP, handle_sigint);
        signal(SIGTERM, handle_sigint);
 
+       setlocale(LC_NUMERIC, "en_US");
+
        if (!strcmp(dev, "-"))
                ret = do_stdin();
        else