parse_size(): add new suffixes

Add new suffixes in parse_size() function. New suffixes are: T as
terabyte, P as petabyte, E as exabyte. Note these units are
multiply of 2 .

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
This commit is contained in:
Goffredo Baroncelli 2012-10-29 18:53:19 +01:00 committed by David Sterba
parent 6318867602
commit 9495b4d228
1 changed files with 6 additions and 0 deletions

View File

@ -1236,6 +1236,12 @@ u64 parse_size(char *s)
if (s[i]) {
c = tolower(s[i]);
switch (c) {
case 'e':
mult *= 1024;
case 'p':
mult *= 1024;
case 't':
mult *= 1024;
case 'g':
mult *= 1024;
case 'm':