diff --git a/xen/common/lib.c b/xen/common/lib.c index 62330205fe..8ebec811b3 100644 --- a/xen/common/lib.c +++ b/xen/common/lib.c @@ -476,6 +476,10 @@ unsigned long long parse_size_and_unit(const char *s, const char **ps) case 'B': case 'b': s1++; break; + case '%': + if ( ps ) + break; + /* fallthrough */ default: ret <<= 10; /* default to kB */ break;