[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 1/1] util/async-teardown: wire up query-command-line-options
From: |
Claudio Imbrenda |
Subject: |
[PATCH v2 1/1] util/async-teardown: wire up query-command-line-options |
Date: |
Mon, 20 Mar 2023 14:16:48 +0100 |
The recently introduced -async-teardown commandline option was not
wired up properly and did not show up in the output of the QMP command
query-command-line-options. This means that libvirt will have no way to
discover whether the feature is supported.
This patch fixes the issue by correctly wiring up the commandline
option so that it appears in the output of query-command-line-options.
Reported-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Fixes: c891c24b1a ("os-posix: asynchronous teardown for shutdown on Linux")
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
---
util/async-teardown.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/util/async-teardown.c b/util/async-teardown.c
index 62cdeb0f20..c9b9a3cdb2 100644
--- a/util/async-teardown.c
+++ b/util/async-teardown.c
@@ -12,6 +12,9 @@
*/
#include "qemu/osdep.h"
+#include "qemu/config-file.h"
+#include "qemu/option.h"
+#include "qemu/module.h"
#include <dirent.h>
#include <sys/prctl.h>
#include <sched.h>
@@ -144,3 +147,17 @@ void init_async_teardown(void)
clone(async_teardown_fn, new_stack_for_clone(), CLONE_VM, NULL);
sigprocmask(SIG_SETMASK, &old_signals, NULL);
}
+
+static QemuOptsList qemu_async_teardown_opts = {
+ .name = "async-teardown",
+ .head = QTAILQ_HEAD_INITIALIZER(qemu_async_teardown_opts.head),
+ .desc = {
+ { /* end of list */ }
+ },
+};
+
+static void register_async_teardown(void)
+{
+ qemu_add_opts(&qemu_async_teardown_opts);
+}
+opts_init(register_async_teardown);
--
2.39.2
- [PATCH v2 0/1] util/async-teardown: wire up query-command-line-options, Claudio Imbrenda, 2023/03/20
- [PATCH v2 1/1] util/async-teardown: wire up query-command-line-options,
Claudio Imbrenda <=
- Re: [PATCH v2 1/1] util/async-teardown: wire up query-command-line-options, Markus Armbruster, 2023/03/20
- Re: [PATCH v2 1/1] util/async-teardown: wire up query-command-line-options, Paolo Bonzini, 2023/03/21
- Re: [PATCH v2 1/1] util/async-teardown: wire up query-command-line-options, Daniel P . Berrangé, 2023/03/22
- Re: [PATCH v2 1/1] util/async-teardown: wire up query-command-line-options, Thomas Huth, 2023/03/22
- Re: [PATCH v2 1/1] util/async-teardown: wire up query-command-line-options, Markus Armbruster, 2023/03/22