modify parse_size_and_unit() to support percentage
authorJuergen Gross <jgross@suse.com>
Tue, 11 Dec 2018 08:42:20 +0000 (09:42 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 11 Dec 2018 08:42:20 +0000 (09:42 +0100)
commitee507ce9a1e8ef58e75ca3b59bc3db44313c661c
treebfa8bdf3b7d9b0963d88e686387dbfde66205a59
parent63b52584a3cf28cb84d6585b294cf574db97d585
modify parse_size_and_unit() to support percentage

Modify parse_size_and_unit() to support a value followed by a '%'
character. In this case ps is required to be non-NULL to ensure the
caller can detect that case. The returned value will be the integer
value s was pointing to and *ps will point to the '%' character.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/lib.c