[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xen/common: Support 'tera' suffixes for size parameters



Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Keir Fraser <keir@xxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>
---
 docs/misc/xen-command-line.markdown |    3 ++-
 xen/common/lib.c                    |    2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/docs/misc/xen-command-line.markdown 
b/docs/misc/xen-command-line.markdown
index b45ba7e..514c7b2 100644
--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -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)
diff --git a/xen/common/lib.c b/xen/common/lib.c
index a758025..89c74ad 100644
--- a/xen/common/lib.c
+++ b/xen/common/lib.c
@@ -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':
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.