From: Thomas Huth <thuth@redhat.com>
To: Claudio Imbrenda <imbrenda@linux.ibm.com>, pbonzini@redhat.com
Cc: qemu-devel@nongnu.org, david@redhat.com, borntraeger@de.ibm.com,
frankja@linux.ibm.com, fiuczy@linux.ibm.com, pasic@linux.ibm.com,
nsg@linux.ibm.com, berrange@redhat.com, alex.bennee@linaro.org,
armbru@redhat.com
Subject: Re: [PATCH v7 1/1] util/async-teardown: wire up query-command-line-options
Date: Mon, 15 May 2023 09:27:56 +0200 [thread overview]
Message-ID: <158a4dd5-80df-b235-fcdc-5ba4433f2c89@redhat.com> (raw)
In-Reply-To: <20230505120051.36605-2-imbrenda@linux.ibm.com>
On 05/05/2023 14.00, Claudio Imbrenda wrote:
> Add new -run-with option with an async-teardown=on|off parameter. It is
> visible in the output of query-command-line-options QMP command, so it
> can be discovered and used by libvirt.
>
> The option -async-teardown is now redundant, deprecate it.
...
> diff --git a/os-posix.c b/os-posix.c
> index 5adc69f560..ef910aaf94 100644
> --- a/os-posix.c
> +++ b/os-posix.c
> @@ -36,6 +36,8 @@
> #include "qemu/log.h"
> #include "sysemu/runstate.h"
> #include "qemu/cutils.h"
> +#include "qemu/config-file.h"
> +#include "qemu/option.h"
>
> #ifdef CONFIG_LINUX
> #include <sys/prctl.h>
> @@ -152,9 +154,20 @@ int os_parse_cmd_args(int index, const char *optarg)
> daemonize = 1;
> break;
> #if defined(CONFIG_LINUX)
> + /* deprecated */
> case QEMU_OPTION_asyncteardown:
> init_async_teardown();
> break;
> + case QEMU_OPTION_run_with:
> + QemuOpts *opts = qemu_opts_parse_noisily(qemu_find_opts("run-with"),
> + optarg, false);
> + if (!opts) {
> + exit(1);
> + }
> + if (qemu_opt_get_bool(opts, "async-teardown", false)) {
> + init_async_teardown();
> + }
> + break;
> #endif
This is causing now a compiler error with GCC 8.5 here:
../../devel/qemu/os-posix.c: In function ‘os_parse_cmd_args’:
../../devel/qemu/os-posix.c:162:9: error: a label can only be part
of a statement and a declaration is not a statement
QemuOpts *opts = qemu_opts_parse_noisily(qemu_find_opts("run-with"),
^~~~~~~~
I'll fix it up by adding some curly braces on top, no need to resend:
diff --git a/os-posix.c b/os-posix.c
--- a/os-posix.c
+++ b/os-posix.c
@@ -158,7 +158,7 @@ int os_parse_cmd_args(int index, const char *optarg)
case QEMU_OPTION_asyncteardown:
init_async_teardown();
break;
- case QEMU_OPTION_run_with:
+ case QEMU_OPTION_run_with: {
QemuOpts *opts = qemu_opts_parse_noisily(qemu_find_opts("run-with"),
optarg, false);
if (!opts) {
@@ -168,6 +168,7 @@ int os_parse_cmd_args(int index, const char *optarg)
init_async_teardown();
}
break;
+ }
#endif
default:
return -1;
Thomas
prev parent reply other threads:[~2023-05-15 7:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 12:00 [PATCH v7 0/1] util/async-teardown: appear in query-command-line-options Claudio Imbrenda
2023-05-05 12:00 ` [PATCH v7 1/1] util/async-teardown: wire up query-command-line-options Claudio Imbrenda
2023-05-08 13:46 ` Thomas Huth
2023-05-15 7:27 ` Thomas Huth [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=158a4dd5-80df-b235-fcdc-5ba4433f2c89@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=fiuczy@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=nsg@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).