Also recognize M and G as size unit for --memory (Closes: #691320)
Document all recognized units.
This commit is contained in:
@@ -106,6 +106,9 @@ xen-create-image - Easily create new Xen instances with networking and OpenSSH.
|
||||
|
||||
--memory=size
|
||||
Setup the amount of memory allocated to the new instance.
|
||||
As suffix recognized size units are "M", "MB", "G" and
|
||||
"GB" (case does not matter). If there's no unit given,
|
||||
megabytes are assumed.
|
||||
|
||||
--modules=/path/to/modules
|
||||
Set the path to the kernel modules to use for domU.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -6,6 +6,8 @@ xen-tools (4.3.1+dev-1) UNRELEASED; urgency=low
|
||||
- Move code for --boot feature to END block. Fixes missing SSH
|
||||
fingerprint display if --boot was used. (Closes: #679183)
|
||||
- Use local parameter instead of global variable in unMountImage.
|
||||
- Also recognize "M" and "G" instead of "MB" and "GB" as size unit for
|
||||
--memory. (Closes: #691320) Document the recognized units.
|
||||
|
||||
-- Axel Beckert <abe@debian.org> Tue, 13 Nov 2012 18:05:05 +0100
|
||||
|
||||
|
||||
Reference in New Issue
Block a user