From 4284892973d9ca067086d24cfd689524ac681025 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 6 Mar 2002 16:07:04 +0000 Subject: (find_free_loop): fix --- perl-install/devices.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'perl-install') diff --git a/perl-install/devices.pm b/perl-install/devices.pm index 38df41d5c..051ec990d 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -39,12 +39,10 @@ sub del_loop { sub find_free_loop { foreach (0..7) { my $dev = make("loop$_"); - { - local *F; - sysopen F, $dev, 2 or next; - !ioctl(F, c::LOOP_GET_STATUS(), my $tmp) && $! == 6 or next; #- 6 == ENXIO - close F; - } + local *F; + sysopen F, $dev, 2 or next; + !ioctl(F, c::LOOP_GET_STATUS(), my $tmp) && $! == 6 or next; #- 6 == ENXIO + close F; return $dev; } die "no free loop found"; -- cgit v1.2.1