diff options
-rw-r--r-- | perl/lib/Sys/Guestfs/Lib.pm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index 1e5638e3..7a734aa0 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; - $_ = <PIPE>; + $_ = `file $dir/bin/$bin`; if (/ELF.*executable, (.+?),/) { return _elf_arch_to_canonical ($1); } |