diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-07-29 15:33:22 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-07-29 15:33:22 +0100 |
commit | 8b854734bd13b7f68b72422932de3bf24c84ca15 (patch) | |
tree | 488ed0f39975ce4e337af68f7c6b197b06474635 /perl | |
parent | 25c4b0190c22e3bdc5594aff994c8e8f99db5ab3 (diff) | |
download | libguestfs-8b854734bd13b7f68b72422932de3bf24c84ca15.tar.gz libguestfs-8b854734bd13b7f68b72422932de3bf24c84ca15.tar.xz libguestfs-8b854734bd13b7f68b72422932de3bf24c84ca15.zip |
Lib.pm: Use Perl backtick instead of slurp (Aron Griffis).
Diffstat (limited to 'perl')
-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); } |