From bb20b86db9acb7a6f653fd40c45d46a9df6b2a75 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 30 Jun 2021 18:32:29 +0200 Subject: ui: Fix the "-display sdl,window_close=..." parameter According to the QAPI schema, there is a "-" and not a "_" between "window" and "close", and we're also talking about "window-close" in the long parameter description in qemu-options.hx, so we should make sure that we rather use the variant with the "-" by default instead of only allowing the one with the "_" here. The old way still stays enabled for compatibility, but we deprecate it, so that we can switch to a QAPIfied parameter one day more easily. Signed-off-by: Thomas Huth Message-Id: <20210630163231.467987-3-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'softmmu') diff --git a/softmmu/vl.c b/softmmu/vl.c index cee6339580..36b761677d 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -1089,7 +1089,12 @@ static void parse_display(const char *p) } else { goto invalid_sdl_args; } - } else if (strstart(opts, ",window_close=", &nextopt)) { + } else if (strstart(opts, ",window_close=", &nextopt) || + strstart(opts, ",window-close=", &nextopt)) { + if (strstart(opts, ",window_close=", NULL)) { + warn_report("window_close with an underscore is deprecated," + " please use window-close instead."); + } opts = nextopt; dpy.has_window_close = true; if (strstart(opts, "on", &nextopt)) { -- cgit v1.2.3