From 24e8f03ffad6ca629cb2b2494cc76255bb7017a1 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 3 Jun 2005 10:26:08 +0000 Subject: do not use a loop device to read ISO image IDs, read them directly in the file ... --- perl-install/install_any.pm | 12 ++++-------- 1 file 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; } -- cgit v1.2.1