summaryrefslogtreecommitdiffstats
path: root/perl-install/resize_fat
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/resize_fat')
-rw-r--r--perl-install/resize_fat/c_rewritten.pm8
-rw-r--r--perl-install/resize_fat/fat.pm9
-rw-r--r--perl-install/resize_fat/io.pm6
3 files changed, 10 insertions, 13 deletions
diff --git a/perl-install/resize_fat/c_rewritten.pm b/perl-install/resize_fat/c_rewritten.pm
index d74ecb5d3..1447c8da0 100644
--- a/perl-install/resize_fat/c_rewritten.pm
+++ b/perl-install/resize_fat/c_rewritten.pm
@@ -1,14 +1,14 @@
package resize_fat::c_rewritten; # $Id$
use strict;
-use vars qw($VERSION @ISA);
require DynaLoader;
-@ISA = qw(DynaLoader);
-$VERSION = '0.01';
+our @ISA = qw(DynaLoader);
+our $VERSION = '0.01';
+our @EXPORT_OK = qw(next set_next);
-bootstrap resize_fat::c_rewritten $VERSION;
+resize_fat::c_rewritten->bootstrap($VERSION);
1;
diff --git a/perl-install/resize_fat/fat.pm b/perl-install/resize_fat/fat.pm
index bb762e28e..71c50790e 100644
--- a/perl-install/resize_fat/fat.pm
+++ b/perl-install/resize_fat/fat.pm
@@ -5,9 +5,7 @@ use strict;
use resize_fat::any;
use resize_fat::io;
-use resize_fat::c_rewritten;
-
-1;
+use resize_fat::c_rewritten qw(next set_next);
sub read($) {
my ($fs) = @_;
@@ -97,9 +95,6 @@ sub endianness($$) {
$r;
}
-*next = \&resize_fat::c_rewritten::next;
-*set_next = \&resize_fat::c_rewritten::set_next;
-
sub get_free($) {
@@ -136,3 +131,5 @@ sub set_available($$) {
my ($fs, $cluster) = @_;
set_next ($fs, $cluster, 0);
}
+
+1;
diff --git a/perl-install/resize_fat/io.pm b/perl-install/resize_fat/io.pm
index 7643a0953..bd7d32263 100644
--- a/perl-install/resize_fat/io.pm
+++ b/perl-install/resize_fat/io.pm
@@ -61,11 +61,11 @@ sub check_mounted($) {
}
}
-sub open($) {
+sub open {
my ($fs) = @_;
check_mounted($fs->{device});
- sysopen F, $fs->{fs_name}, 2 or sysopen F, $fs->{fs_name}, 0 or die "error opening device $fs->{fs_name} for writing\n";
- $fs->{fd} = *F;
+ sysopen $fs->{fd}, $fs->{fs_name}, 2 or
+ sysopen $fs->{fd}, $fs->{fs_name}, 0 or die "error opening device $fs->{fs_name} for writing\n";
}