From 8b854734bd13b7f68b72422932de3bf24c84ca15 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Wed, 29 Jul 2009 15:33:22 +0100 Subject: [PATCH] Lib.pm: Use Perl backtick instead of slurp (Aron Griffis). --- perl/lib/Sys/Guestfs/Lib.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index 1e5638e..7a734aa 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -440,9 +440,7 @@ sub file_architecture foreach my $bin (@_initrd_binaries) { if (-f "$dir/bin/$bin") { - open PIPE, "file $dir/bin/$bin |"; - local $/ = undef; - $_ = ; + $_ = `file $dir/bin/$bin`; if (/ELF.*executable, (.+?),/) { return _elf_arch_to_canonical ($1); } -- 1.8.3.1