diff options
author | Kusanagi Kouichi <slash@ac.auone-net.jp> | 2009-10-16 22:31:38 +0900 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-27 12:28:42 -0500 |
commit | 5989020bc11f8ba448d6fb79f4562f882a693d89 (patch) | |
tree | eeb6011f5c58dd02055b5def8fcbe5575a636b22 /qemu-char.c | |
parent | 30d335d68d93705eb346387c03bb6aca0f52454a (diff) |
Add chardev option to disable signal.
If I am using vga and serial which is stdio and hit C-c on
serial console, qemu terminates. That is annoying for me.
So make it configurable whether signal is generated when C-c is hit.
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r-- | qemu-char.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qemu-char.c b/qemu-char.c index 0fd402c46d..23d2a07109 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -729,7 +729,7 @@ static void term_exit(void) fcntl(0, F_SETFL, old_fd0_flags); } -static void term_init(void) +static void term_init(QemuOpts *opts) { struct termios tty; @@ -742,7 +742,7 @@ static void term_init(void) tty.c_oflag |= OPOST; tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN); /* if graphical mode, we allow Ctrl-C handling */ - if (display_type == DT_NOGRAPHIC) + if (!qemu_opt_get_bool(opts, "signal", display_type != DT_NOGRAPHIC)) tty.c_lflag &= ~ISIG; tty.c_cflag &= ~(CSIZE|PARENB); tty.c_cflag |= CS8; @@ -775,7 +775,7 @@ static CharDriverState *qemu_chr_open_stdio(QemuOpts *opts) chr->chr_close = qemu_chr_close_stdio; qemu_set_fd_handler2(0, stdio_read_poll, stdio_read, NULL, chr); stdio_nb_clients++; - term_init(); + term_init(opts); return chr; } |