Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 340e01248478ba8b78a6d4d1809b1eff > files > 606

kvm-83-270.el5_11.src.rpm

From bfb787b5687730c2881a3c0468b186eb0a107acf Mon Sep 17 00:00:00 2001
From: Markus Armbruster <armbru@redhat.com>
Date: Mon, 21 Feb 2011 09:47:38 -0300
Subject: [PATCH 4/8] monitor: Report encrypted disks in snapshot mode (Jan Kiszka)

RH-Author: Markus Armbruster <armbru@redhat.com>
Message-id: <1298281662-2327-5-git-send-email-armbru@redhat.com>
Patchwork-id: 18527
O-Subject: [PATCH RHEL5.7 qemu-kvm 4/8] monitor: Report encrypted disks in
	snapshot mode (Jan Kiszka)
Bugzilla: 644706
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>

From: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>

If the backing file is encrypted, 'info block' currently does not report
the disk as encrypted. Fix this by using the standard API to check disk
encryption mode. Moreover, switch to a canonical output format.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6706 c046a42c-6fe2-441c-8c8c-71466251a162
Manually cherry-picked from commit 430eb509d2d05bd568c1394213fd12cb447467a7
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qemu/block.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qemu/block.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/qemu/block.c b/qemu/block.c
index 6b4842b..a5b9a7e 100644
--- a/qemu/block.c
+++ b/qemu/block.c
@@ -1389,8 +1389,7 @@ void bdrv_info(void)
 	    }
             term_printf(" ro=%d", bs->read_only);
             term_printf(" drv=%s", bs->drv->format_name);
-            if (bs->encrypted)
-                term_printf(" encrypted");
+            term_printf(" encrypted=%d", bdrv_is_encrypted(bs));
         } else {
             term_printf(" [not inserted]");
         }
-- 
1.7.4.rc1.16.gd2f15e