diff options
Diffstat (limited to 'perl-install/resize_fat/fat.pm')
-rw-r--r-- | perl-install/resize_fat/fat.pm | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/perl-install/resize_fat/fat.pm b/perl-install/resize_fat/fat.pm index 33572624a..0d8a32dfa 100644 --- a/perl-install/resize_fat/fat.pm +++ b/perl-install/resize_fat/fat.pm @@ -44,11 +44,8 @@ sub allocate_remap { #-log::ld("resize_fat: [$cluster,", &next($fs, $cluster), "...]->$new_cluster..."); }; - resize_fat::c_rewritten::allocate_fat_remap($fs->{fat_size}); - - #- patch to reset contents of memory allocated by allocate_fat_remap - #- divide by 4 because fat_size is in bytes. - foreach (0..$fs->{fat_size}/4 - 1) { resize_fat::c_rewritten::set_fat_remap($_, 0) } + #- this must call allocate_fat_remap that zeroes the buffer allocated. + resize_fat::c_rewritten::allocate_fat_remap($fs->{nb_clusters} + 2); $fs->{last_free_cluster} = 2; for ($cluster = 2; $cluster < $fs->{nb_clusters} + 2; $cluster++) { |