1
0
mirror of synced 2026-04-28 05:04:57 +00:00

Fix wildcard vs regexp in memory configuration parsing.

This commit is contained in:
Axel Beckert
2011-11-15 22:33:15 +01:00
parent 858b47dc2a
commit 1725e269cf
2 changed files with 4 additions and 3 deletions

View File

@@ -375,7 +375,7 @@ sub createXenConfig
#
# The memory size: Convert Gb -> Mb.
#
if ( $ENV{ 'memory' } =~ /^(\d+)Gb*$/i )
if ( $ENV{ 'memory' } =~ /^(\d+)Gb.*$/i )
{
$ENV{ 'memory' } = $1 * 1024;
}
@@ -383,7 +383,7 @@ sub createXenConfig
#
# Remove any trailing Mb.
#
if ( $ENV{ 'memory' } =~ /^(\d+)Mb*$/i )
if ( $ENV{ 'memory' } =~ /^(\d+)Mb.*$/i )
{
$ENV{ 'memory' } = $1;
}