diff options
Diffstat (limited to 'perl-install/resize_fat/io.pm')
| -rw-r--r-- | perl-install/resize_fat/io.pm | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/perl-install/resize_fat/io.pm b/perl-install/resize_fat/io.pm index 054fb0858..78e3a3724 100644 --- a/perl-install/resize_fat/io.pm +++ b/perl-install/resize_fat/io.pm @@ -1,4 +1,4 @@ -package resize_fat::io; # $Id$ +package resize_fat::io; use diagnostics; use strict; @@ -17,7 +17,7 @@ sub read($$$) { $buf; } sub write($$$$) { - my ($fs, $pos, $size, $buf) = @_; + my ($fs, $pos, $_size, $buf) = @_; sysseek $fs->{fd}, $pos, 0 or die "seeking to byte #$pos failed on device $fs->{fs_name}"; syswrite $fs->{fd}, $buf or die "writing at byte #$pos failed on device $fs->{fs_name}"; } @@ -50,21 +50,9 @@ sub read_file($$) { $buf; } -sub check_mounted($) { - my ($f) = @_; - - local *F; - open F, "/proc/mounts" or die "error opening /proc/mounts\n"; - foreach (<F>) { - /^$f\s/ and die "device is mounted"; - } -} - sub open { my ($fs) = @_; - check_mounted($fs->{device}); - 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"; } |
