[Pkg-libvirt-commits] [libguestfs] 38/63: v2v: -i disk: Add a clearer error message if the disk doesn't exist or is not readable.

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 3 14:43:29 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.27.39-1
in repository libguestfs.

commit 922da70651a81c24f0fefc9f3885e1cda3250b5a
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Fri Sep 5 09:54:32 2014 +0100

    v2v: -i disk: Add a clearer error message if the disk doesn't exist or is not readable.
---
 v2v/input_disk.ml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/v2v/input_disk.ml b/v2v/input_disk.ml
index fce11c2..8d69a08 100644
--- a/v2v/input_disk.ml
+++ b/v2v/input_disk.ml
@@ -35,6 +35,9 @@ class input_disk verbose input_format disk = object
       disk
 
   method source () =
+    (* Check the input file exists and is readable. *)
+    Unix.access disk [R_OK];
+
     (* What name should we use for the guest?  We try to derive it from
      * the filename passed in.  Users can override this using the
      * `-on name' option.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list