summaryrefslogtreecommitdiffstats
path: root/perl-install/devices.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r--perl-install/devices.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 19baec6f7..29c89a1d5 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -38,11 +38,12 @@ sub size($) {
sub set_loop {
my ($file) = @_;
- foreach (0..9) {
+ foreach (0..7) {
local *F;
my $dev = make("loop$_");
- sysopen F, $dev, 0 or next;
+ sysopen F, $dev, 2 or next;
!ioctl(F, c::LOOP_GET_STATUS(), my $tmp) && $! == 6 or next; #- 6 == ENXIO
+ log::l("trying with loop $dev");
return c::set_loop(fileno F, $file) && $dev;
}
}