1
0
mirror of synced 2026-04-13 23:23:41 +00:00

Refactoring: xt-create-xen-config: Use s/// to strip trailing MB size suffixes

This commit is contained in:
Axel Beckert
2013-10-28 22:28:40 +01:00
parent c82cb31adc
commit 2c020323f6
2 changed files with 4 additions and 8 deletions

View File

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

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