qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] display: stop using DT_NOGRAPHIC, use DT_NONE


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] display: stop using DT_NOGRAPHIC, use DT_NONE
Date: Fri, 28 Jun 2013 12:24:44 +0100

On 19 June 2013 13:34, Michael Tokarev <address@hidden> wrote:
> It looks like initially there was -nographic option to turn
> off display, now there's another option of the same sort,
> -display none.  But code in other places of qemu checks for
> DT_NOGRAPHIC and does not work well with -display none.
> Make DT_NOGRAPHIC an internal version which selects DT_NONE,
> and check for that in all other places where previously we
> checked for DT_NOGRAPHIC.
>
> While at it, rename two private variants of display (DT_DEFAULT
> and DT_NOGRAPHIC) to use two underscores and make them negative,
> and set DT_NONE to 0.
>
> This should fix the issue of non-working sun serial console
> with the suggested replacement of -nographic which is
> -display none.

Note that "-display none" and "-nographic" aren't exactly
equivalent -- the latter is an option which turns on a bunch
of behaviour including but not limited to "-display none".

> I'm not still sure we really want to check for display type
> in qemu-char.c where we allow/disallow signals delivery from
> terminal, -- for other display types (CURSES) this makes no
> good sense.

...in particular I don't think "-display none" should
mean "don't allow ctrl-c" (though -nographic should
continue to have that effect), and this patch currently
introduces that behaviour change.

> --- a/include/sysemu/sysemu.h
> +++ b/include/sysemu/sysemu.h
> @@ -87,12 +87,12 @@ void do_info_slirp(Monitor *mon);
>
>  typedef enum DisplayType
>  {
> -    DT_DEFAULT,
> +    DT__DEFAULT = -1,   /* private */
> +    DT__NOGRAPHIC = -2, /* private */
> +    DT_NONE = 0,

I think these could use a slightly longer comment than just "private",
eg "private, used internally by vl.c only".

>      DT_CURSES,
>      DT_SDL,
>      DT_GTK,
> -    DT_NOGRAPHIC,
> -    DT_NONE,
>  } DisplayType;

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]