Sophie

Sophie

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

kvm-83-270.el5_11.src.rpm

From 6562e29c25a7506c4e08d866692f91f1a2e3ddcb Mon Sep 17 00:00:00 2001
From: Markus Armbruster <armbru@redhat.com>
Date: Mon, 21 Feb 2011 09:47:40 -0300
Subject: [PATCH 6/8] monitor: Simplify password input mode (Jan Kiszka)

RH-Author: Markus Armbruster <armbru@redhat.com>
Message-id: <1298281662-2327-7-git-send-email-armbru@redhat.com>
Patchwork-id: 18529
O-Subject: [PATCH RHEL5.7 qemu-kvm 6/8] monitor: Simplify password input 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>

Drop the hack to query passwords on all monitor terminals now that they
are requested when the user initially enters 'continue'.

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@6708 c046a42c-6fe2-441c-8c8c-71466251a162
Manually cherry-picked from commit f220174de8d9980316b28a96fa5641e0ec11e54e
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qemu/monitor.c |   20 --------------------
 1 files changed, 0 insertions(+), 20 deletions(-)

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

diff --git a/qemu/monitor.c b/qemu/monitor.c
index 48cc4bf..c6262b2 100644
--- a/qemu/monitor.c
+++ b/qemu/monitor.c
@@ -3195,20 +3195,6 @@ static void monitor_readline_cb(void *opaque, const char *input)
 static void monitor_readline(const char *prompt, int is_password,
                              char *buf, int buf_size)
 {
-    int i;
-    int old_focus[MAX_MON];
-
-    if (is_password) {
-        for (i = 0; i < MAX_MON; i++) {
-            old_focus[i] = 0;
-            if (monitor_hd[i]) {
-                old_focus[i] = monitor_hd[i]->focus;
-                monitor_hd[i]->focus = 0;
-                qemu_chr_send_event(monitor_hd[i], CHR_EVENT_FOCUS);
-            }
-        }
-    }
-
     readline_start(prompt, is_password, monitor_readline_cb, NULL);
     monitor_readline_buf = buf;
     monitor_readline_buf_size = buf_size;
@@ -3216,12 +3202,6 @@ static void monitor_readline(const char *prompt, int is_password,
     while (monitor_readline_started) {
         main_loop_wait(10);
     }
-    /* restore original focus */
-    if (is_password) {
-        for (i = 0; i < MAX_MON; i++)
-            if (old_focus[i])
-                monitor_hd[i]->focus = old_focus[i];
-    }
 }
 
 int monitor_read_bdrv_key(BlockDriverState *bs)
-- 
1.7.4.rc1.16.gd2f15e