summaryrefslogtreecommitdiffstats
path: root/perl-install/resize_fat/directory.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/resize_fat/directory.pm')
-rw-r--r--perl-install/resize_fat/directory.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/resize_fat/directory.pm b/perl-install/resize_fat/directory.pm
index 46e810021..f62203e50 100644
--- a/perl-install/resize_fat/directory.pm
+++ b/perl-install/resize_fat/directory.pm
@@ -24,10 +24,11 @@ my @fields = (
'first_cluster',
'length',
);
+my $psizeof_format = psizeof($format);
1;
-sub entry_size { psizeof($format) }
+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
@@ -35,7 +36,7 @@ sub traverse($$$) {
my ($fs, $directory, $f) = @_;
for (my $i = 0;; $i++) {
- my $raw = \substr($directory, $i * psizeof($format), psizeof($format));
+ my $raw = \substr($directory, $i * $psizeof_format, $psizeof_format);
#- empty entry means end of directory
$$raw =~ /^\0*$/ and return $directory;