1
0
mirror of synced 2026-02-26 00:03:55 +00:00

Also recognize M and G as size unit for --memory (Closes: #691320)

Document all recognized units.
This commit is contained in:
Axel Beckert
2012-11-13 22:55:53 +01:00
parent 446e157b80
commit 442021849d
3 changed files with 7 additions and 2 deletions

View File

@@ -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.

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;
}

2
debian/changelog vendored
View File

@@ -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