[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Add chardev option to disable signal.
From: |
Kusanagi Kouichi |
Subject: |
Re: [Qemu-devel] [PATCH] Add chardev option to disable signal. |
Date: |
Sat, 17 Oct 2009 19:59:58 +0900 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On 2009-10-16 09:04:51 -0500, Anthony Liguori wrote:
> Kusanagi Kouichi wrote:
> >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 <address@hidden>
> >---
> > qemu-char.c | 6 +++---
> > qemu-config.c | 3 +++
> > 2 files changed, 6 insertions(+), 3 deletions(-)
> >
> >diff --git a/qemu-char.c b/qemu-char.c
> >index 8084a67..dd23e63 100644
> >--- a/qemu-char.c
> >+++ b/qemu-char.c
> >@@ -727,7 +727,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;
> >@@ -740,7 +740,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;
>
> Would be nice to eliminate the DT_NOGRAPHIC check here. In fact,
> looking at the other nographic check, they look bogus.
>
> So how about eliminating DT_NOGRAPHIC entirely and replacing it with
> DT_NONE + appropriate serial config?
That sounds good.
> Regards,
>
> Anthony Liguori