[Pkg-libvirt-commits] [libguestfs] 34/36: v2v: Improve handling when one of the input disks is blank (RHBZ#1232192).
Hilko Bengen
bengen at moszumanska.debian.org
Sun Nov 1 17:13:46 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag upstream/1.29.47
in repository libguestfs.
commit c4f8d1d1a31f9b7e04886079174af507799f0ad2
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Thu Jun 18 09:52:54 2015 +0100
v2v: Improve handling when one of the input disks is blank (RHBZ#1232192).
In commit 4c73d1d4f142c6f6211c963beea68773e11fd3ef, I changed the
behaviour of virt-v2v so it ignores all errors from the
g#part_get_parttype method. However that would ignore I/O errors and
similar.
Only ignore the "unrecognised disk label" error from parted, by
testing if the return code is EINVAL.
This fixes commit 4c73d1d4f142c6f6211c963beea68773e11fd3ef.
---
v2v/v2v.ml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 3f49f68..418c836 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -555,7 +555,9 @@ and inspect_source g root_choice =
g#part_get_gpt_type dev (Int32.to_int partnum) = uefi_ESP_guid
and parttype_is_gpt dev =
try g#part_get_parttype dev = "gpt"
- with G.Error msg ->
+ with G.Error msg as exn ->
+ (* If it's _not_ "unrecognised disk label" then re-raise it. *)
+ if g#last_errno () <> G.Errno.errno_EINVAL then raise exn;
if verbose () then printf "%s (ignored)\n" msg;
false
and is_uefi_bootable_device dev =
--
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