Revision bc0129d9
b/monitor.c | ||
---|---|---|
2722 | 2722 |
char *buf, int buf_size) |
2723 | 2723 |
{ |
2724 | 2724 |
int i; |
2725 |
int old_focus[MAX_MON]; |
|
2725 | 2726 |
|
2726 | 2727 |
if (is_password) { |
2727 |
for (i = 0; i < MAX_MON; i++) |
|
2728 |
if (monitor_hd[i] && monitor_hd[i]->focus == 0) |
|
2728 |
for (i = 0; i < MAX_MON; i++) { |
|
2729 |
old_focus[i] = 0; |
|
2730 |
if (monitor_hd[i]) { |
|
2731 |
old_focus[i] = monitor_hd[i]->focus; |
|
2732 |
monitor_hd[i]->focus = 0; |
|
2729 | 2733 |
qemu_chr_send_event(monitor_hd[i], CHR_EVENT_FOCUS); |
2734 |
} |
|
2735 |
} |
|
2730 | 2736 |
} |
2737 |
|
|
2731 | 2738 |
readline_start(prompt, is_password, monitor_readline_cb, NULL); |
2732 | 2739 |
monitor_readline_buf = buf; |
2733 | 2740 |
monitor_readline_buf_size = buf_size; |
... | ... | |
2735 | 2742 |
while (monitor_readline_started) { |
2736 | 2743 |
main_loop_wait(10); |
2737 | 2744 |
} |
2745 |
/* restore original focus */ |
|
2746 |
if (is_password) { |
|
2747 |
for (i = 0; i < MAX_MON; i++) |
|
2748 |
if (old_focus[i]) |
|
2749 |
monitor_hd[i]->focus = old_focus[i]; |
|
2750 |
} |
|
2738 | 2751 |
} |
b/vl.c | ||
---|---|---|
8381 | 8381 |
} |
8382 | 8382 |
break; |
8383 | 8383 |
case QEMU_OPTION_nographic: |
8384 |
serial_devices[0] = "stdio"; |
|
8385 |
parallel_devices[0] = "null"; |
|
8386 |
monitor_device = "stdio"; |
|
8387 | 8384 |
nographic = 1; |
8388 | 8385 |
break; |
8389 | 8386 |
#ifdef CONFIG_CURSES |
... | ... | |
8781 | 8778 |
} |
8782 | 8779 |
} |
8783 | 8780 |
|
8781 |
if (nographic) { |
|
8782 |
if (serial_device_index == 0) |
|
8783 |
serial_devices[0] = "stdio"; |
|
8784 |
if (parallel_device_index == 0) |
|
8785 |
parallel_devices[0] = "null"; |
|
8786 |
if (strncmp(monitor_device, "vc", 2) == 0) |
|
8787 |
monitor_device = "stdio"; |
|
8788 |
} |
|
8789 |
|
|
8784 | 8790 |
#ifndef _WIN32 |
8785 | 8791 |
if (daemonize) { |
8786 | 8792 |
pid_t pid; |
Also available in: Unified diff