[PATCH] Exabytes
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/init.c b/init.c
index f4125b1..f4a3740 100644
--- a/init.c
+++ b/init.c
@@ -639,7 +639,7 @@
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 b09f20d..7fb2bb6 100644
--- a/parse.c
+++ b/parse.c
@@ -40,6 +40,9 @@
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 bfdf390..f9c6985 100644
--- a/stat.c
+++ b/stat.c
@@ -22,7 +22,7 @@
* 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 @@
num /= thousand;
num += carry;
i++;
- } while (i <= 4);
+ } while (i <= 5);
return buf;
}