From 7f97b53ea0cadced2321414a2b7054a4811eda6f Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 18 Dec 2017 23:13:49 +0000 Subject: Remove unused code. --- lib/MGA/DrakISO/Utils.pm | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'lib/MGA/DrakISO/Utils.pm') diff --git a/lib/MGA/DrakISO/Utils.pm b/lib/MGA/DrakISO/Utils.pm index 11295c9..b20cb32 100644 --- a/lib/MGA/DrakISO/Utils.pm +++ b/lib/MGA/DrakISO/Utils.pm @@ -11,7 +11,7 @@ use IO::Select; use Exporter; our @ISA = qw(Exporter); -our @EXPORT = qw(directory_usage run_ run_foreach mount_system_fs umount_external_fs); +our @EXPORT = qw(directory_usage run_ mount_system_fs umount_external_fs); sub directory_usage { my ($dir, $o_apparent) = @_; @@ -38,29 +38,6 @@ sub run_ { run_program::raw($options, @cmd); } -sub run_foreach { - my ($foreach, @command) = @_; - print STDERR "running " . join(' ', @command) . "\n"; - my $pid = open3(my $cmd_in, my $cmd_out, undef, @command); - my $selector = IO::Select->new($cmd_out); - while (my @ready = $selector->can_read) { - foreach my $fh (@ready) { - local $_ = scalar <$fh>; - return if /^open3:/; - $foreach->(); - $selector->remove($fh) if eof($fh); - } - } - close($cmd_out); - close($cmd_in); - return waitpid($pid, 0) > 0 && !($? >> 8); -} - -sub mtools_run_ { - local $ENV{MTOOLS_SKIP_CHECK} = 1; - &run_; -} - sub device_allocate_file { my ($device, $size) = @_; run_('dd', "of=$device", 'count=0', 'bs=1', "seek=" . removeXiBSuffix($size)); -- cgit v1.2.1