qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 06/12] vl: drop no_quit variable


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v3 06/12] vl: drop no_quit variable
Date: Mon, 5 Feb 2018 10:56:21 +0100
User-agent: NeoMutt/20171215

On Fri, Feb 02, 2018 at 09:35:52AM -0600, Eric Blake wrote:
> On 02/02/2018 05:10 AM, Gerd Hoffmann wrote:
> > Not used any more, delete it.
> > 
> > Signed-off-by: Gerd Hoffmann <address@hidden>
> > ---
> >  vl.c | 7 ++-----
> >  1 file changed, 2 insertions(+), 5 deletions(-)
> > 
> > diff --git a/vl.c b/vl.c
> 
> > @@ -4368,7 +4364,8 @@ int main(int argc, char **argv, char **envp)
> >          error_report("-no-frame, -alt-grab and -ctrl-grab are only valid "
> >                       "for SDL, ignoring option");
> >      }
> > -    if (no_quit && (display_type != DT_GTK && display_type != DT_SDL)) {
> > +    if (dpy.has_window_close &&
> > +        (display_type != DT_GTK && display_type != DT_SDL)) {
> >          error_report("-no-quit is only valid for GTK and SDL, "
> >                       "ignoring option");
> 
> Does this mean we should move the 'window-close' field out of the common
> base type and into DisplayGTK/DisplaySDL instead (where sdl would need
> its own type instead of DisplayNoOpts)?

Well, strictly speaking that would be more accurate, but backward
compatibility with -no-quit would become more messy then.  Also cocoa
could probably add support for the window-close option without too much
effort.

> I guess the difference is how
> long we have been flagging this error message -

The message is there as long as I remember.  It's a warning only though,
it will not prevent qemu from starting.

> if we rearrange the QAPI
> type, this code is dead and you've broken the command line that tries to
> do window type none combined with -no-quit;

Depends on how you code things up...

With window-close being in the common section you can just set it when
you see '-no-quit'.

With window-close being in the display specific options you have
remember you have seen '-no-quit', then later when we know what the
display type is run

  switch (displaytype) {
  case sdl: sdl.window_close = true; break;

At that point you can do whatever you want in the default branch ...

> but if that command line has
> already been documented as broken, it is no real loss.  But if we
> haven't had enough of a deprecation period yet, then keeping
> window-close global to all variants of the union and doing the runtime
> rejection check lets us finish the deprecation period.

Which deprecation period?  -no-quit isn't deprecated.

cheers,
  Gerd




reply via email to

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