[Fai-commit] r6713 - trunk/lib/setup-storage

Michael Tautschnig mt at alioth.debian.org
Sat Oct 22 13:02:19 UTC 2011


Author: mt
Date: 2011-10-22 13:02:19 +0000 (Sat, 22 Oct 2011)
New Revision: 6713

Modified:
   trunk/lib/setup-storage/Sizes.pm
Log:
setup-storage/Sizes.pm: fix 100%-on-gpt configuration issue

* setup-storage/Sizes.pm: Use (virtual) end of disk for 100% size computation
  instead of disk size to fix 100%-on-gpt configuration issue

Closes: #619136



Modified: trunk/lib/setup-storage/Sizes.pm
===================================================================
--- trunk/lib/setup-storage/Sizes.pm	2011-10-22 12:53:58 UTC (rev 6712)
+++ trunk/lib/setup-storage/Sizes.pm	2011-10-22 13:02:19 UTC (rev 6713)
@@ -460,7 +460,7 @@
     $next_start;
 
   if (1 == $part_id) {
-    $max_avail = $current_disk->{size} - $next_start;
+    $max_avail = $current_disk->{end_byte} + 1 - $next_start;
     $max_avail = "${max_avail}B";
   }
   my ($start, $end) = &FAI::make_range($part->{size}->{range}, $max_avail);
@@ -671,7 +671,7 @@
     }
 
     # the size of a 100% partition (the 100% available to the user)
-    my $max_avail = $current_disk->{size} - $next_start;
+    my $max_avail = $current_disk->{end_byte} + 1 - $next_start;
     # expressed in bytes
     $max_avail = "${max_avail}B";
 




More information about the Fai-commit mailing list