Skip to contentSkip to conversation

xen/common: Support 'tera' suffixes for size parameters

PATCH New Andrew Cooper 1 participant 1 message Jun 2, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/common: Support 'tera' suffixes for size parameters

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
---
 docs/misc/xen-command-line.markdown |    3 ++-
 xen/common/lib.c                    |    2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)
docs/misc/xen-command-line.markdown +2 -1
index b45ba7e..514c7b2 100644
@@ -46,8 +46,9 @@ undefined.
 
 ### Size (`<size>`)
 
-A size parameter may be any integer, with a size suffix
+A size parameter may be any integer, with a single size suffix
 
+* `T` or `t`: TiB (2^40)
 * `G` or `g`: GiB (2^30)
 * `M` or `m`: MiB (2^20)
 * `K` or `k`: KiB (2^10)
xen/common/lib.c +2 -0
index a758025..89c74ad 100644
@@ -459,6 +459,8 @@ unsigned long long parse_size_and_unit(const char *s, const char **ps)
 
     switch ( *s1 )
     {
+    case 'T': case 't':
+        ret <<= 10;
     case 'G': case 'g':
         ret <<= 10;
     case 'M': case 'm':
Signature · 1 line
1.7.10.4