Refactoring: xt-create-xen-config: Use s/// to strip trailing MB size suffixes
This commit is contained in:
@@ -369,10 +369,7 @@ sub createXenConfig
|
||||
#
|
||||
# Remove any trailing Mb.
|
||||
#
|
||||
if ( $ENV{ 'memory' } =~ /^(\d+)Mb?.*$/i )
|
||||
{
|
||||
$ENV{ 'memory' } = $1;
|
||||
}
|
||||
$ENV{ 'memory' } =~ s/^(\d+)Mb?.*$/$1/i;
|
||||
|
||||
#
|
||||
# The maxmem size: Convert Gb -> Mb.
|
||||
@@ -387,10 +384,7 @@ sub createXenConfig
|
||||
#
|
||||
# Remove any trailing Mb.
|
||||
#
|
||||
if ( $ENV{ 'maxmem' } =~ /^(\d+)Mb?.*$/i )
|
||||
{
|
||||
$ENV{ 'maxmem' } = $1;
|
||||
}
|
||||
$ENV{ 'maxmem' } =~ s/^(\d+)Mb?.*$/$1/i;
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -30,6 +30,8 @@ xen-tools (4.4~dev-1) UNRELEASED; urgency=low
|
||||
* Abort early and with proper error message if "xen-delete-image --test"
|
||||
is not used with "--dir". (Closes: #704878)
|
||||
* xen-delete-image: Exit with return code != 0 in all error cases.
|
||||
* Refactoring: xt-create-xen-config: Use s/// to strip trailing MB size
|
||||
suffixes.
|
||||
* Bump Standards-Version to 3.9.5 (no changes).
|
||||
|
||||
-- Axel Beckert <abe@debian.org> Fri, 23 Aug 2013 21:13:07 +0200
|
||||
|
||||
Reference in New Issue
Block a user