summaryrefslogtreecommitdiffstats
path: root/perl-install/resize_fat/main.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-14 23:09:15 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-14 23:09:15 +0000
commit773013b8e45a6916a74ea64152e51fb6cb951920 (patch)
tree1fe018ccc96d5ddf11081ea8d57f263b3be6ae00 /perl-install/resize_fat/main.pm
parent16caaa0fdfae2bdcec187bdffac3f12d7bb9a8a1 (diff)
downloaddrakx-773013b8e45a6916a74ea64152e51fb6cb951920.tar
drakx-773013b8e45a6916a74ea64152e51fb6cb951920.tar.gz
drakx-773013b8e45a6916a74ea64152e51fb6cb951920.tar.bz2
drakx-773013b8e45a6916a74ea64152e51fb6cb951920.tar.xz
drakx-773013b8e45a6916a74ea64152e51fb6cb951920.zip
no_comment
Diffstat (limited to 'perl-install/resize_fat/main.pm')
-rw-r--r--perl-install/resize_fat/main.pm13
1 files changed, 8 insertions, 5 deletions
diff --git a/perl-install/resize_fat/main.pm b/perl-install/resize_fat/main.pm
index 762d18bca..ade04122c 100644
--- a/perl-install/resize_fat/main.pm
+++ b/perl-install/resize_fat/main.pm
@@ -45,12 +45,13 @@ sub new($$$) {
resize_fat::boot_sector::read($fs);
$resize_fat::isFAT32 and eval { resize_fat::info_sector::read($fs) };
resize_fat::fat::read($fs);
- resize_fat::fat::check($fs);
resize_fat::any::flag_clusters($fs);
bless $fs, $type;
}
+sub DESTROY { resize_fat::c_rewritten::free_all() }
+
#- copy all clusters >= <start_cluster> to a new place on the partition, less
#- than <start_cluster>. Only copies files, not directories.
#- (use of buffer needed because the seeks slow like hell the hard drive)
@@ -65,7 +66,9 @@ sub copy_clusters {
};
for (; $cluster < $fs->{nb_clusters} + 2; $cluster++) {
resize_fat::c_rewritten::flag($cluster) == $resize_fat::any::FILE or next;
- push @buffer, $fs->{fat_remap}[$cluster], resize_fat::io::read_cluster($fs, $cluster);
+ push @buffer,
+ resize_fat::c_rewritten::fat_remap($cluster),
+ resize_fat::io::read_cluster($fs, $cluster);
@buffer > 50 and &$flush();
}
&$flush();
@@ -85,8 +88,8 @@ sub construct_dir_tree {
resize_fat::c_rewritten::flag($cluster) == $resize_fat::any::DIRECTORY or next;
resize_fat::io::write_cluster($fs,
- $fs->{fat_remap}[$cluster],
- resize_fat::directory::remap($fs, resize_fat::io::read_cluster($fs, $cluster)));
+ resize_fat::c_rewritten::fat_remap($cluster),
+ resize_fat::directory::remap($fs, resize_fat::io::read_cluster($fs, $cluster)));
}
sync();
@@ -101,7 +104,7 @@ sub construct_dir_tree {
my $cluster = $fs->{fat32_root_dir_cluster};
resize_fat::io::write_cluster($fs,
- $fs->{fat_remap}[$cluster],
+ resize_fat::c_rewritten::fat_remap($cluster),
resize_fat::directory::remap($fs, resize_fat::io::read_cluster($fs, $cluster)));
} else {
resize_fat::io::write($fs, $fs->{root_dir_offset}, $fs->{root_dir_size},