Commit f220174de8d9980316b28a96fa5641e0ec11e54e

Authored by aliguori
1 parent c0f4ce77

monitor: Simplify password input mode (Jan Kiszka)

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
Showing 1 changed file with 0 additions and 20 deletions
monitor.c
@@ -2912,20 +2912,6 @@ static void monitor_readline_cb(void *opaque, const char *input) @@ -2912,20 +2912,6 @@ static void monitor_readline_cb(void *opaque, const char *input)
2912 static void monitor_readline(const char *prompt, int is_password, 2912 static void monitor_readline(const char *prompt, int is_password,
2913 char *buf, int buf_size) 2913 char *buf, int buf_size)
2914 { 2914 {
2915 - int i;  
2916 - int old_focus[MAX_MON];  
2917 -  
2918 - if (is_password) {  
2919 - for (i = 0; i < MAX_MON; i++) {  
2920 - old_focus[i] = 0;  
2921 - if (monitor_hd[i]) {  
2922 - old_focus[i] = monitor_hd[i]->focus;  
2923 - monitor_hd[i]->focus = 0;  
2924 - qemu_chr_send_event(monitor_hd[i], CHR_EVENT_FOCUS);  
2925 - }  
2926 - }  
2927 - }  
2928 -  
2929 readline_start(prompt, is_password, monitor_readline_cb, NULL); 2915 readline_start(prompt, is_password, monitor_readline_cb, NULL);
2930 monitor_readline_buf = buf; 2916 monitor_readline_buf = buf;
2931 monitor_readline_buf_size = buf_size; 2917 monitor_readline_buf_size = buf_size;
@@ -2933,12 +2919,6 @@ static void monitor_readline(const char *prompt, int is_password, @@ -2933,12 +2919,6 @@ static void monitor_readline(const char *prompt, int is_password,
2933 while (monitor_readline_started) { 2919 while (monitor_readline_started) {
2934 main_loop_wait(10); 2920 main_loop_wait(10);
2935 } 2921 }
2936 - /* restore original focus */  
2937 - if (is_password) {  
2938 - for (i = 0; i < MAX_MON; i++)  
2939 - if (old_focus[i])  
2940 - monitor_hd[i]->focus = old_focus[i];  
2941 - }  
2942 } 2922 }
2943 2923
2944 int monitor_read_bdrv_key(BlockDriverState *bs) 2924 int monitor_read_bdrv_key(BlockDriverState *bs)