diff options
author | Goffredo Baroncelli <kreijack@gmail.com> | 2012-10-29 18:53:19 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-01-17 18:27:54 +0100 |
commit | 9495b4d228cb11773ba223228e6ea11f486b28e1 (patch) | |
tree | 5728d5400709592919031ecce684a1b5b749a0a2 /utils.c | |
parent | 631886760203135f6cedb861466604e428217c71 (diff) |
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>
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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': |