xen/common: Support 'tera' suffixes for size parameters
PATCH 1/1 xen/common: Support 'tera' suffixes for size parameters
Signed-off-by Andrew Cooper <[email protected]>
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
@@ -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
@@ -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