Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP1:GA
xen.15298
5c0f786c-parse_size_and_unit-percent.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5c0f786c-parse_size_and_unit-percent.patch of Package xen.15298
# Commit ee507ce9a1e8ef58e75ca3b59bc3db44313c661c # Date 2018-12-11 09:42:20 +0100 # Author Juergen Gross <jgross@suse.com> # Committer Jan Beulich <jbeulich@suse.com> 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> --- a/xen/common/lib.c +++ b/xen/common/lib.c @@ -476,6 +476,10 @@ unsigned long long parse_size_and_unit(c case 'B': case 'b': s1++; break; + case '%': + if ( ps ) + break; + /* fallthrough */ default: ret <<= 10; /* default to kB */ break;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor