Richard W.M. Jones
2009-Sep-23 10:38 UTC
[Libguestfs] [PATCH] virt-cat: Remove some unused Perl module includes.
-- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora -------------- next part -------------->From d15195bad9e50f4d80e84c39100a217a260fc806 Mon Sep 17 00:00:00 2001From: Richard Jones <rjones at trick.home.annexia.org> Date: Wed, 23 Sep 2009 11:11:21 +0100 Subject: [PATCH 3/4] virt-cat: Remove some unused Perl module includes. --- cat/virt-cat.pl | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/cat/virt-cat.pl b/cat/virt-cat.pl index 8db5348..748dbb8 100755 --- a/cat/virt-cat.pl +++ b/cat/virt-cat.pl @@ -25,9 +25,6 @@ use Sys::Guestfs::Lib qw(open_guest get_partitions resolve_windows_path inspect_operating_systems mount_operating_system); use Pod::Usage; use Getopt::Long; -use Data::Dumper; -use File::Temp qw/tempdir/; -use XML::Writer; use Locale::TextDomain 'libguestfs'; =encoding utf8 -- 1.6.2.5
Jim Meyering
2009-Sep-23 11:18 UTC
detecting write failure [Re: [Libguestfs] [PATCH] virt-cat: Remove some unused Perl module includes.
Richard W.M. Jones wrote:> Subject: [PATCH 3/4] virt-cat: Remove some unused Perl module includes. > > --- > cat/virt-cat.pl | 3 --- > 1 files changed, 0 insertions(+), 3 deletions(-) > > diff --git a/cat/virt-cat.pl b/cat/virt-cat.pl > index 8db5348..748dbb8 100755 > --- a/cat/virt-cat.pl > +++ b/cat/virt-cat.pl > @@ -25,9 +25,6 @@ use Sys::Guestfs::Lib qw(open_guest get_partitions resolve_windows_path > inspect_operating_systems mount_operating_system); > use Pod::Usage; > use Getopt::Long; > -use Data::Dumper; > -use File::Temp qw/tempdir/; > -use XML::Writer; > use Locale::TextDomain 'libguestfs';These look fine. Unrelated to this particular change, you may want to add these lines to virt-cat: END { # use File::Coda; # http://meyering.net/code/Coda/ defined fileno STDOUT or return; close STDOUT and return; warn "$ME: failed to close standard output: $!\n"; $? ||= 1; } Otherwise, virt-cat could fail to detect/report write errors. Try this: virt-cat /some/file > /dev/full It should fail. This is a general problem in nearly every perl script that writes to stdout.
Reasonably Related Threads
- [PATCH 0/3] Export and merge into Windows Registry
- [PATCH] Export inspect_linux_kernel in Lib.pm
- [FOR REVIEW ONLY] ESX work in progress
- [PATCH 1/6] Convert config file to XML, and translate networks/bridge for all connections
- [PATCH] Improve cleanup of libguestfs handle with Sys::VirtV2V::GuestfsHandle