[Pkg-libvirt-commits] [libguestfs] 175/266: v2v: Simplify conversion dispatch code.
Hilko Bengen
bengen at moszumanska.debian.org
Fri Oct 3 14:41:58 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.35-1
in repository libguestfs.
commit 93943a0f779cdda7d5df3225efeab9adbc68123a
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Aug 25 21:31:05 2014 +0100
v2v: Simplify conversion dispatch code.
Refactoring, no functional change.
---
v2v/v2v.ml | 26 +++++++++-----------------
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index cdd1e35..f6d2876 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -165,27 +165,19 @@ let rec main () =
msg (f_"Converting %s to run on KVM") prod
);
- match inspect.i_type with
- | "linux" ->
- (match inspect.i_distro with
- | "fedora"
- | "rhel" | "centos" | "scientificlinux" | "redhat-based"
- | "sles" | "suse-based" | "opensuse" ->
-
+ match inspect.i_type, inspect.i_distro with
+ | "linux", ("fedora"
+ | "rhel" | "centos" | "scientificlinux" | "redhat-based"
+ | "sles" | "suse-based" | "opensuse") ->
(* RHEV doesn't support serial console so remove any on conversion. *)
let keep_serial_console = output#keep_serial_console in
+ Convert_linux.convert ~keep_serial_console verbose g inspect source
- Convert_linux.convert ~keep_serial_console
- verbose g inspect source
-
- | distro ->
- error (f_"virt-v2v is unable to convert this guest type (linux/distro=%s)") distro
- );
-
- | "windows" -> Convert_windows.convert verbose g inspect source
+ | "windows", _ -> Convert_windows.convert verbose g inspect source
- | typ ->
- error (f_"virt-v2v is unable to convert this guest type (type=%s)") typ in
+ | typ, distro ->
+ error (f_"virt-v2v is unable to convert this guest type (%s/%s)")
+ typ distro in
if do_copy then (
(* Trim the filesystems to reduce transfer size. *)
--
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