Message ID | 6be4aba579bda042bef4cf0991a92444d0c3f05e.1631781599.git.isaikin-dmitry@yandex.ru (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v2] tools/xl: fix autoballoon regex | expand |
On 16.09.2021 11:34, Dmitry Isaikin wrote: > --- a/tools/xl/xl.c > +++ b/tools/xl/xl.c > @@ -81,7 +81,7 @@ static int auto_autoballoon(void) > return 1; /* default to on */ > > ret = regcomp(®ex, > - "(^| )dom0_mem=((|min:|max:)[0-9]+[bBkKmMgG]?,?)+($| )", > + "(^| )dom0_mem=((|min:|max:)-?[0-9]+[bBkKmMgG]?,?)+($| )", Wouldn't this be a good opportunity to also add [tT] to the list of permitted granularity suffixes? The hypervisor's parse_size_and_unit() has been supporting this for quite some time ... Jan
diff --git a/tools/xl/xl.c b/tools/xl/xl.c index 4107d10fd4..a9f7e769fd 100644 --- a/tools/xl/xl.c +++ b/tools/xl/xl.c @@ -81,7 +81,7 @@ static int auto_autoballoon(void) return 1; /* default to on */ ret = regcomp(®ex, - "(^| )dom0_mem=((|min:|max:)[0-9]+[bBkKmMgG]?,?)+($| )", + "(^| )dom0_mem=((|min:|max:)-?[0-9]+[bBkKmMgG]?,?)+($| )", REG_NOSUB | REG_EXTENDED); if (ret) return 1;