diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-05 23:01:15 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-05 23:01:15 +0000 |
commit | 379a6ae8083af9436540e1dad1f282daa86a0ae7 (patch) | |
tree | 2cb53fa2bf9b5165b338e1cc85c8dedc5bf25879 /console.h | |
parent | bf12623527dda8847375e7066eedfeb3740f6cd7 (diff) | |
download | qemu-379a6ae8083af9436540e1dad1f282daa86a0ae7.tar.gz qemu-379a6ae8083af9436540e1dad1f282daa86a0ae7.tar.bz2 qemu-379a6ae8083af9436540e1dad1f282daa86a0ae7.zip |
monitor: Rework modal password input (Jan Kiszka)
Currently, waiting for the user to type in some password blocks the
whole VM because monitor_readline starts its own I/O loop. And this loop
also screws up reading passwords from virtual console.
Patch below fixes the shortcomings by using normal I/O processing also
for waiting on a password. To keep to modal property for the monitor
terminal, the command handler is temporarily replaced by a password
handler and a callback infrastructure is established to process the
result before switching back to command mode.
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@6710 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'console.h')
-rw-r--r-- | console.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -304,7 +304,11 @@ void term_flush(void); void term_print_help(void); void monitor_suspend(void); void monitor_resume(void); -int monitor_read_bdrv_key(BlockDriverState *bs); + +#include "block.h" +void monitor_read_bdrv_key_start(BlockDriverState *bs, + BlockDriverCompletionFunc *completion_cb, + void *opaque); /* readline.c */ typedef void ReadLineFunc(void *opaque, const char *str); |