diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-12-18 23:13:49 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-12-18 23:13:49 +0000 |
commit | 7f97b53ea0cadced2321414a2b7054a4811eda6f (patch) | |
tree | f0121a7ecd1cdf31e95a376b7cda14692880df97 /lib/MGA/DrakISO/Utils.pm | |
parent | fce42d85023e9e0cbd3b7fbd98ff3b734814612a (diff) | |
download | drakiso-7f97b53ea0cadced2321414a2b7054a4811eda6f.tar drakiso-7f97b53ea0cadced2321414a2b7054a4811eda6f.tar.gz drakiso-7f97b53ea0cadced2321414a2b7054a4811eda6f.tar.bz2 drakiso-7f97b53ea0cadced2321414a2b7054a4811eda6f.tar.xz drakiso-7f97b53ea0cadced2321414a2b7054a4811eda6f.zip |
Remove unused code.
Diffstat (limited to 'lib/MGA/DrakISO/Utils.pm')
-rw-r--r-- | lib/MGA/DrakISO/Utils.pm | 25 |
1 files changed, 1 insertions, 24 deletions
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)); |