/[fai]/people/michael/features/setup_harddisks_2/implementation/lib/sizes.pm
ViewVC logotype

Diff of /people/michael/features/setup_harddisks_2/implementation/lib/sizes.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4862 by mt, Tue Apr 8 17:11:50 2008 UTC revision 4863 by mt, Tue Apr 8 19:50:23 2008 UTC
# Line 414  sub do_partition_real { Line 414  sub do_partition_real {
414    if ($end != $start) {    if ($end != $start) {
415    
416      # the end of the current range (may be the end of the disk or some      # the end of the current range (may be the end of the disk or some
417      # preserved partition      # preserved partition or an ntfs volume to be resized)
418      my $end_of_range = -1;      my $end_of_range = -1;
419    
420     # minimum space required by all partitions, i.e., the lower ends of the     # minimum space required by all partitions, i.e., the lower ends of the
# Line 430  sub do_partition_real { Line 430  sub do_partition_real {
430      foreach my $p (@{$worklist}) {      foreach my $p (@{$worklist}) {
431    
432        # we have found the delimiter        # we have found the delimiter
433        if ($FAI::configs{$config}{partitions}{$p}{size}{preserve}) {        if ($FAI::configs{$config}{partitions}{$p}{size}{preserve} ||
434            ($FAI::configs{$config}{partitions}{$p}{size}{resize} &&
435              ($current_disk->{partitions}->{$p}->{filesystem} eq "ntfs"))) {
436          $end_of_range = $current_disk->{partitions}->{$p}->{begin_byte};          $end_of_range = $current_disk->{partitions}->{$p}->{begin_byte};
437    
438          # logical partitions require the space for the EPBR to be left          # logical partitions require the space for the EPBR to be left
# Line 500  sub do_partition_real { Line 502  sub do_partition_real {
502        $current_disk->{sector_size};        $current_disk->{sector_size};
503    }    }
504    
505    # partition starts at where we currently are    # partition starts at where we currently are, or remains fixed in case of
506      # resized ntfs
507      if ($FAI::configs{$config}{partitions}{$part_id}{size}{resize} &&
508        ($current_disk->{partitions}->{$part_id}->{filesystem} eq "ntfs")) {
509        ($next_start <= $current_disk->{partitions}->{$part_id}->{begin_byte})
510          or die "Cannot preserve start byte of ntfs volume on partition $part_id, space before it is too small\n";
511        $next_start = $current_disk->{partitions}->{$part_id}->{begin_byte};
512      }
513    $FAI::configs{$config}{partitions}{$part_id}{start_byte} =    $FAI::configs{$config}{partitions}{$part_id}{start_byte} =
514      $next_start;      $next_start;
515    

Legend:
Removed from v.4862  
changed lines
  Added in v.4863

  ViewVC Help
Powered by ViewVC 1.1.5