summaryrefslogtreecommitdiffstats
path: root/perl-install/loopback.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/loopback.pm')
-rw-r--r--perl-install/loopback.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/perl-install/loopback.pm b/perl-install/loopback.pm
index 5d1200d90..90097e3eb 100644
--- a/perl-install/loopback.pm
+++ b/perl-install/loopback.pm
@@ -76,12 +76,11 @@ sub create {
log::l("creating loopback file $f ($part->{size} sectors)");
- local *F;
my $block_size = 128;
my $s = "\0" x (512 * $block_size);
- sysopen F, $f, 2 | c::O_CREAT() or die "failed to create loopback file";
+ sysopen(my $F, $f, 2 | c::O_CREAT()) or die "failed to create loopback file";
for (my $i = 0; $i < $part->{size}; $i += $block_size) {
- syswrite F, $s or die "failed to create loopback file";
+ syswrite $F, $s or die "failed to create loopback file";
}
}