[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libguestfs
Subject:    [Libguestfs] [PATCH] perl: Canonicalize /dev/vd* paths in old inspection code (RHBZ#691724).
From:       "Richard W.M. Jones" <rjones () redhat ! com>
Date:       2011-03-29 11:22:19
Message-ID: 20110329112219.GG20473 () amd ! home ! annexia ! org
[Download RAW message or body]

This code is still deprecated.  This is just for fixing a bug in
the old virt-inspector which we still support in RHEL 6.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v

["0001-perl-Canonicalize-dev-vd-paths-in-old-inspection-cod.patch" (text/plain)]

>From 759f4369de965f46f4a93b3a75dada050f87e223 Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones@redhat.com>
Date: Tue, 29 Mar 2011 12:20:57 +0100
Subject: [PATCH] perl: Canonicalize /dev/vd* paths in old inspection code (RHBZ#691724).

---
 perl/lib/Sys/Guestfs/Lib.pm |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm
index 97d0e8e..95c18a5 100644
--- a/perl/lib/Sys/Guestfs/Lib.pm
+++ b/perl/lib/Sys/Guestfs/Lib.pm
@@ -922,6 +922,9 @@ sub _find_filesystem
         if (m{^/dev/hd(.*)} && exists $fses->{"/dev/sd$1"}) {
             return ("/dev/sd$1", $fses->{"/dev/sd$1"});
         }
+        if (m{^/dev/vd(.*)} && exists $fses->{"/dev/sd$1"}) {
+            return ("/dev/sd$1", $fses->{"/dev/sd$1"});
+        }
         if (m{^/dev/xvd(.*)} && exists $fses->{"/dev/sd$1"}) {
             return ("/dev/sd$1", $fses->{"/dev/sd$1"});
         }
-- 
1.7.4.1



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic