[Fai-commit] r5693 - people/michael/experimental/patches
Michael Tautschnig
mt at alioth.debian.org
Fri Jan 8 09:46:12 UTC 2010
Author: mt
Date: 2010-01-08 09:46:12 +0000 (Fri, 08 Jan 2010)
New Revision: 5693
Added:
people/michael/experimental/patches/setup-storage_GIB-support
Modified:
people/michael/experimental/patches/series
Log:
added GiB support patch
Modified: people/michael/experimental/patches/series
===================================================================
--- people/michael/experimental/patches/series 2009-12-31 14:17:35 UTC (rev 5692)
+++ people/michael/experimental/patches/series 2010-01-08 09:46:12 UTC (rev 5693)
@@ -8,3 +8,4 @@
bugfix-556082
setup-storage_lvm-preserve2
bugfix-558139
+setup-storage_GIB-support
Added: people/michael/experimental/patches/setup-storage_GIB-support
===================================================================
--- people/michael/experimental/patches/setup-storage_GIB-support (rev 0)
+++ people/michael/experimental/patches/setup-storage_GIB-support 2010-01-08 09:46:12 UTC (rev 5693)
@@ -0,0 +1,20 @@
+2010-01-08 Michael Tautschnig <mt at debian.org>
+
+ * setup-storage/Parser.pm: Ignore 'i' in GiB, MiB, etc. and treat those units
+ like GB, MB, etc.
+Index: trunk/lib/setup-storage/Parser.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Parser.pm
++++ trunk/lib/setup-storage/Parser.pm
+@@ -298,9 +298,9 @@
+ sub convert_unit
+ {
+ my ($val) = @_;
+- ($val =~ /^(\d+(\.\d+)?)([kMGTP%]?)(B)?\s*$/) or
++ ($val =~ /^(\d+(\.\d+)?)([kMGTP%]?(i)?)(B)?\s*$/) or
+ &FAI::internal_error("convert_unit $val");
+- $val = $1 * (1 / 1024) * (1 / 1024) if ($3 eq "" && defined ($4) && $4 eq "B");
++ $val = $1 * (1 / 1024) * (1 / 1024) if ($3 eq "" && defined ($5) && $5 eq "B");
+ $val = $1 * (1 / 1024) if ($3 eq "k");
+ $val = $1 if ($3 eq "M");
+ $val = $1 * 1024 if ($3 eq "G");
More information about the Fai-commit
mailing list