summaryrefslogtreecommitdiffstats
path: root/perl-install/resize_fat/fat.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/resize_fat/fat.pm')
-rw-r--r--perl-install/resize_fat/fat.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/perl-install/resize_fat/fat.pm b/perl-install/resize_fat/fat.pm
index 83426471a..33572624a 100644
--- a/perl-install/resize_fat/fat.pm
+++ b/perl-install/resize_fat/fat.pm
@@ -46,6 +46,10 @@ sub allocate_remap {
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) }
+
$fs->{last_free_cluster} = 2;
for ($cluster = 2; $cluster < $fs->{nb_clusters} + 2; $cluster++) {
if ($cluster < $cut_point) {