diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-11-14 23:09:15 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-11-14 23:09:15 +0000 |
commit | 773013b8e45a6916a74ea64152e51fb6cb951920 (patch) | |
tree | 1fe018ccc96d5ddf11081ea8d57f263b3be6ae00 /perl-install/resize_fat/directory.pm | |
parent | 16caaa0fdfae2bdcec187bdffac3f12d7bb9a8a1 (diff) | |
download | drakx-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/directory.pm')
-rw-r--r-- | perl-install/resize_fat/directory.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/perl-install/resize_fat/directory.pm b/perl-install/resize_fat/directory.pm index f62203e50..22d2a1fae 100644 --- a/perl-install/resize_fat/directory.pm +++ b/perl-install/resize_fat/directory.pm @@ -32,8 +32,8 @@ sub entry_size { $psizeof_format } #- call `f' for each entry of the directory #- if f return true, then modification in the entry are taken back -sub traverse($$$) { - my ($fs, $directory, $f) = @_; +sub traverse($$) { + my ($directory, $f) = @_; for (my $i = 0;; $i++) { my $raw = \substr($directory, $i * $psizeof_format, $psizeof_format); @@ -58,7 +58,7 @@ sub traverse_all($$) { &$f($entry); resize_fat::dir_entry::is_directory($entry) - and traverse($fs, resize_fat::io::read_file($fs, resize_fat::dir_entry::get_cluster($entry)), $traverse_all); + and traverse(resize_fat::io::read_file($fs, resize_fat::dir_entry::get_cluster($entry)), $traverse_all); undef; #- no need to write back (cf traverse) }; @@ -66,14 +66,14 @@ sub traverse_all($$) { my $directory = $resize_fat::isFAT32 ? resize_fat::io::read_file($fs, $fs->{fat32_root_dir_cluster}) : resize_fat::io::read($fs, $fs->{root_dir_offset}, $fs->{root_dir_size}); - traverse($fs, $directory, $traverse_all); + traverse($directory, $traverse_all); + $traverse_all = undef; #- circular reference is no good for perl's poor GC :( } #- function used by construct_dir_tree to translate the `cluster' fields in each #- directory entry -sub remap { +sub remap($$) { my ($fs, $directory) = @_; - - traverse($fs->{fat_remap}, $directory, sub { resize_fat::dir_entry::remap($fs->{fat_remap}, $_[0]) }); + traverse($directory, \&resize_fat::dir_entry::remap); } |