2006-12-01 12:57:55 by steve
Don't ignore Mb/Gb on memory size.
This commit is contained in:
parent
4edb6bfbea
commit
14fa7e2fb5
@ -96,7 +96,7 @@ xt-create-config - Create a Xen configuration file for a new guest
|
||||
--
|
||||
http://www.steve.org.uk/
|
||||
|
||||
$Id: xt-create-xen-config,v 1.25 2006-11-29 23:35:20 steve Exp $
|
||||
$Id: xt-create-xen-config,v 1.26 2006-12-01 12:57:55 steve Exp $
|
||||
|
||||
=cut
|
||||
|
||||
@ -203,7 +203,7 @@ sub parseCommandLineArguments
|
||||
|
||||
if ( $VERSION )
|
||||
{
|
||||
my $REVISION = '$Revision: 1.25 $';
|
||||
my $REVISION = '$Revision: 1.26 $';
|
||||
if ( $REVISION =~ /1.([0-9.]+) / )
|
||||
{
|
||||
$REVISION = $1;
|
||||
@ -302,9 +302,17 @@ sub createXenConfig
|
||||
|
||||
|
||||
#
|
||||
# The memory size: Strip any trailing size characters "M", "G", etc.
|
||||
# The memory size: Convert Gb -> Mb.
|
||||
#
|
||||
if ( $ENV{'memory'} =~ /([0-9]+)/ )
|
||||
if ( $EMV{'memory'} =~ /^(\d+)Gb*$/i )
|
||||
{
|
||||
$ENV{'memory'} = $1 * 1024;
|
||||
}
|
||||
|
||||
#
|
||||
# Remove any trailing Mb.
|
||||
#
|
||||
if ( $ENV{'memory'} =~ /^(\d+)Mb*$/i )
|
||||
{
|
||||
$ENV{'memory'} = $1;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user