summaryrefslogtreecommitdiffstats
path: root/perl-install/resize_fat
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-06 23:22:23 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-06 23:22:23 +0000
commit995ea591c5076d0a1f809f4b0c5d919db7510c88 (patch)
treee32a887a5e46515dbee32d4b4825f1b91c1ab61d /perl-install/resize_fat
parent21fbfdfead833c685b255edb3c3460198ce89877 (diff)
downloaddrakx-995ea591c5076d0a1f809f4b0c5d919db7510c88.tar
drakx-995ea591c5076d0a1f809f4b0c5d919db7510c88.tar.gz
drakx-995ea591c5076d0a1f809f4b0c5d919db7510c88.tar.bz2
drakx-995ea591c5076d0a1f809f4b0c5d919db7510c88.tar.xz
drakx-995ea591c5076d0a1f809f4b0c5d919db7510c88.zip
no_comment
Diffstat (limited to 'perl-install/resize_fat')
-rw-r--r--perl-install/resize_fat/main.pm17
1 files changed, 11 insertions, 6 deletions
diff --git a/perl-install/resize_fat/main.pm b/perl-install/resize_fat/main.pm
index 0c94586ec..c3eee9381 100644
--- a/perl-install/resize_fat/main.pm
+++ b/perl-install/resize_fat/main.pm
@@ -41,12 +41,17 @@ sub new($$$) {
my ($type, $device, $fs_name) = @_;
my $fs = { device => $device, fs_name => $fs_name } ;
- resize_fat::io::open($fs);
- resize_fat::boot_sector::read($fs);
- $resize_fat::isFAT32 and eval { resize_fat::info_sector::read($fs) };
- resize_fat::fat::read($fs);
- resize_fat::any::flag_clusters($fs);
-
+ eval {
+ resize_fat::io::open($fs);
+ resize_fat::boot_sector::read($fs);
+ $resize_fat::isFAT32 and eval { resize_fat::info_sector::read($fs) };
+ resize_fat::fat::read($fs);
+ resize_fat::any::flag_clusters($fs);
+ };
+ if ($@) {
+ close $fs->{fd};
+ die;
+ }
bless $fs, $type;
}