From 9a768e7b5f9ab5879bf3c8f5be3d1267156d5a94 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 18 Jun 2004 05:46:57 +0000 Subject: in iso install, use ISOPATH environment variable instead of loopback device filename (limited to 64 chars) --- mdk-stage1/disk.c | 1 + perl-install/c/stuff.xs.pl | 8 -------- perl-install/install_any.pm | 7 +------ 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/mdk-stage1/disk.c b/mdk-stage1/disk.c index 1b6082fd0..864469ef9 100644 --- a/mdk-stage1/disk.c +++ b/mdk-stage1/disk.c @@ -342,6 +342,7 @@ static enum return_type try_with_device(char *dev_name) umount(disk_own_mount); return try_with_device(dev_name); } + add_to_env("ISOPATH", location_full); add_to_env("METHOD", "disk-iso"); } else { symlink(location_full, IMAGE_LOCATION); diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl index c4049eb95..f6c6c4098 100644 --- a/perl-install/c/stuff.xs.pl +++ b/perl-install/c/stuff.xs.pl @@ -704,14 +704,6 @@ standard_charset() OUTPUT: RETVAL -void -get_loopback_name(int fd) - INIT: - struct loop_info loopinfo; - PPCODE: - if (!ioctl(fd, LOOP_GET_STATUS, &loopinfo)) - XPUSHs(sv_2mortal(newSVpv(loopinfo.lo_name, 0))); - void get_iso_volume_ids(int fd) INIT: diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 300913446..c9d122d6e 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -89,12 +89,7 @@ sub look_for_ISOs() { sysopen(my $F, $iso_images{loopdev}, 0) or return; put_in_hash(\%iso_images, $get_iso_ids->($F)); - #- may not work if it the orginal iso image path was longer than 64 chars - my ($loopfile) = c::get_loopback_name(fileno($F)) or return; - $loopfile =~ s!^/sysroot!!; - my $iso_dir = dirname($loopfile); - - foreach my $iso_file (glob("$iso_dir/*.iso")) { + foreach my $iso_file (glob("$ENV{ISOPATH}/*.iso")) { my $iso_dev = devices::set_loop($iso_file) or return; if (sysopen($F, $iso_dev, 0)) { my $iso_ids = $get_iso_ids->($F); -- cgit v1.2.1