From f3502ba2dd72d846a388c774a01c6bb833871248 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 14 Feb 2007 01:27:09 +0100 Subject: [PATCH] [PATCH] Exabytes Signed-off-by: Jens Axboe --- init.c | 2 +- parse.c | 3 +++ stat.c | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/init.c b/init.c index f4125b13..f4a37401 100644 --- a/init.c +++ b/init.c @@ -639,7 +639,7 @@ static void fixup_options(struct thread_data *td) static char *to_kmg(unsigned int val) { char *buf = malloc(32); - char post[] = { 0, 'K', 'M', 'G', 'P', 0 }; + char post[] = { 0, 'K', 'M', 'G', 'P', 'E', 0 }; char *p = post; do { diff --git a/parse.c b/parse.c index b09f20d7..7fb2bb63 100644 --- a/parse.c +++ b/parse.c @@ -40,6 +40,9 @@ static unsigned long get_mult_bytes(char c) case 'g': case 'G': return 1024 * 1024 * 1024; + case 'e': + case 'E': + return 1024 * 1024 * 1024 * 1024UL; default: return 1; } diff --git a/stat.c b/stat.c index bfdf390b..f9c69853 100644 --- a/stat.c +++ b/stat.c @@ -22,7 +22,7 @@ static char *num2str(unsigned long num, int maxlen, int base) * 2^10 base right now. */ const unsigned int thousand = 1024; - char postfix[] = { 'K', 'M', 'G', 'P' }; + char postfix[] = { 'K', 'M', 'G', 'P', 'E' }; char *buf; int i; @@ -47,7 +47,7 @@ static char *num2str(unsigned long num, int maxlen, int base) num /= thousand; num += carry; i++; - } while (i <= 4); + } while (i <= 5); return buf; } -- 2.25.1