[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH] Don't set distro for non-Linux guests



'distro' isn't used anywhere for Windows guests. However, if it's set, it's
required to be matched in virt-v2v.conf. Rather than have to update the config
again, just don't set it for Windows guests.
---
 lib/Sys/VirtConvert/Converter.pm |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/Sys/VirtConvert/Converter.pm b/lib/Sys/VirtConvert/Converter.pm
index 28c57d5..6b9f8f9 100644
--- a/lib/Sys/VirtConvert/Converter.pm
+++ b/lib/Sys/VirtConvert/Converter.pm
@@ -102,7 +102,8 @@ sub convert
     my %desc;
 
     $desc{os}               = $g->inspect_get_type($root);
-    $desc{distro}           = $g->inspect_get_distro($root);
+    $desc{distro}           = $g->inspect_get_distro($root)
+        if $desc{os} eq 'linux';
     $desc{product_name}     = $g->inspect_get_product_name($root);
     $desc{major_version}    = $g->inspect_get_major_version($root);
     $desc{minor_version}    = $g->inspect_get_minor_version($root);
-- 
1.7.4.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]