tools/xl: Fix regular expression for autobaloon mode detection based on xen command line.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 tools/xl: Fix regular expression for autobaloon mode detection based on xen command line.
The case of specifying a negative size was handled incorrectly.
From misc/xen-command-line documentation:
dom0_mem (x86)
= List of ( min:<sz> | max:<sz> | <sz> )
If a size is positive, it represents an absolute value.
If a size is negative, it is subtracted from the total available memory.
--- tools/xl/xl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/xl/xl.c +1 -1
@@ -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 ;
Signature · 1 line
2.33.0
Dmitry Isaikin writes ("[PATCH 1/1] tools/xl: Fix regular expression for autobaloon mode detection based on xen command line."):
Quoted 1 line
The case of specifying a negative size was handled incorrectly.
Thank you. The change looks good to me. Did you test that after your change, the functionality works ?
Ian.