summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-06-11 13:09:22 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-06-11 13:09:22 +0000
commite1794a5b5b86027373354da1cb9998861c3dcfe8 (patch)
treeca340a5347168bd2072981d5cfcd932fffbd05ec
parent74b7bd702790a02b44e0a8e2be3a8c2ced994ea4 (diff)
downloaddrakx-e1794a5b5b86027373354da1cb9998861c3dcfe8.tar
drakx-e1794a5b5b86027373354da1cb9998861c3dcfe8.tar.gz
drakx-e1794a5b5b86027373354da1cb9998861c3dcfe8.tar.bz2
drakx-e1794a5b5b86027373354da1cb9998861c3dcfe8.tar.xz
drakx-e1794a5b5b86027373354da1cb9998861c3dcfe8.zip
- diskdrake
o fix 1.9TB displayed as 1TB (backport from trunk)
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/common.pm12
-rw-r--r--perl-install/install/NEWS2
3 files changed, 11 insertions, 5 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index e4828f41a..5f1d79e2d 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,5 @@
+- diskdrake
+ o fix 1.9TB displayed as 1TB
- fix ext3 formatting with label and progress bar (#30032)
Version 10.4.127 - 30 March 2007, by Olivier "blino" Blin
diff --git a/perl-install/common.pm b/perl-install/common.pm
index eb8d669d7..e03ce60b4 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -126,15 +126,17 @@ sub formatXiB {
($nb, $base) = ($newnb, $newbase);
$base >= 1024 ? ($newbase = $base / 1024) : ($newnb = $nb / 1024);
};
- foreach (N("B"), N("KB"), N("MB"), N("GB")) {
+ my $suffix;
+ foreach (N("B"), N("KB"), N("MB"), N("GB"), N("TB")) {
$decr->();
if ($newnb < 1 && $newnb * $newbase < 1) {
- my $v = $nb * $base;
- my $s = $v < 10 && int(10 * $v - 10 * int($v));
- return int($v) . ($s ? ".$s" : '') . $_;
+ $suffix = $_;
+ last;
}
}
- int($newnb * $newbase) . N("TB");
+ my $v = $nb * $base;
+ my $s = $v < 10 && int(10 * $v - 10 * int($v));
+ int($v) . ($s ? ".$s" : '') . ($suffix || N("TB"));
}
sub formatTime {
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 9ebf87867..40c9b9304 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,5 @@
+- diskdrake
+ o fix 1.9TB displayed as 1TB
- fix detecting usb drives (#13395)
Version 10.4.128 - 3 April 2007, by Pascal "Pixel" Rigaux