diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-10-15 12:34:05 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-10-15 12:34:05 +0000 |
commit | 6d5cba8e5b4f47874e8aab377b7b4181aff6faa2 (patch) | |
tree | e901c38ba2bcd402272a561e8818639383f73167 /perl-install/network/tools.pm | |
parent | 2129b98f49dee51358c410363215e5457d4004d8 (diff) | |
download | drakx-6d5cba8e5b4f47874e8aab377b7b4181aff6faa2.tar drakx-6d5cba8e5b4f47874e8aab377b7b4181aff6faa2.tar.gz drakx-6d5cba8e5b4f47874e8aab377b7b4181aff6faa2.tar.bz2 drakx-6d5cba8e5b4f47874e8aab377b7b4181aff6faa2.tar.xz drakx-6d5cba8e5b4f47874e8aab377b7b4181aff6faa2.zip |
cleanup thanks to perl_checker
Diffstat (limited to 'perl-install/network/tools.pm')
-rw-r--r-- | perl-install/network/tools.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 759e6fc66..d573e41d8 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -199,10 +199,14 @@ sub use_floppy { my $floppy = detect_devices::floppy(); $in->ask_okcancel(N("Insert floppy"), N("Insert a FAT formatted floppy in drive %s with %s in root directory and press %s", $floppy, $file, N("Next"))) or return; - eval { fs::mount(devices::make($floppy), '/mnt', 'vfat', 'readonly'); 1 } or my $failed = N("Floppy access error, unable to mount device %s", $floppy); - log::explanations($failed || "Mounting floppy device $floppy in /mnt"); - - return '/mnt', $failed; + if (eval { fs::mount(devices::make($floppy), '/mnt', 'vfat', 'readonly'); 1 }) { + log::explanations("Mounting floppy device $floppy in /mnt"); + '/mnt'; + } else { + my $failed = N("Floppy access error, unable to mount device %s", $floppy); + log::explanations($failed); + undef, $failed; + } } |