summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-06-03 10:26:08 +0000
committerOlivier Blin <oblin@mandriva.org>2005-06-03 10:26:08 +0000
commit24e8f03ffad6ca629cb2b2494cc76255bb7017a1 (patch)
treeb90414f76fcd94555d7d3ad99d7e6d7866857345
parent0e59ba8adaedee1fd083712147635e3db6399a1d (diff)
downloaddrakx-backup-do-not-use-24e8f03ffad6ca629cb2b2494cc76255bb7017a1.tar
drakx-backup-do-not-use-24e8f03ffad6ca629cb2b2494cc76255bb7017a1.tar.gz
drakx-backup-do-not-use-24e8f03ffad6ca629cb2b2494cc76255bb7017a1.tar.bz2
drakx-backup-do-not-use-24e8f03ffad6ca629cb2b2494cc76255bb7017a1.tar.xz
drakx-backup-do-not-use-24e8f03ffad6ca629cb2b2494cc76255bb7017a1.zip
do not use a loop device to read ISO image IDs, read them directly in the file ...
-rw-r--r--perl-install/install_any.pm12
1 files changed, 4 insertions, 8 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index c1eda5734..da92d7f51 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -118,14 +118,10 @@ sub look_for_ISO_images() {
$iso_dir =~ s!^/sysroot!!; $iso_dir =~ s![^/]*\.iso$!!;
foreach my $iso_file (glob("$iso_dir/*.iso")) {
- #- FIXME: I sux, it isn't needed to use a loop device for that, just read in the file
- my $iso_dev = devices::set_loop($iso_file) or return;
- if (sysopen($F, $iso_dev, 0)) {
- my $iso_ids = $get_iso_ids->($F);
- push @{$iso_images{media}}, { file => $iso_file, %$iso_ids };
- close($F); #- needed to delete loop device
- }
- devices::del_loop($iso_dev);
+ sysopen($F, $iso_file, 0) or next;
+ my $iso_ids = $get_iso_ids->($F);
+ $iso_ids->{file} = $iso_file;
+ push @{$iso_images{media}}, $iso_ids;
}
1;
}