From: Fabiano Rosas <farosas@suse.de>
To: qemu-devel@nongnu.org
Cc: "Markus Armbruster" <armbru@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>
Subject: [PATCH v2 07/11] qemu-option: Add qemu_opts_parse_list_noisily
Date: Wed, 30 Sep 2026 19:11:01 -0300 [thread overview]
Message-ID: <20260930221105.2262063-8-farosas@suse.de> (raw)
In-Reply-To: <20260930221105.2262063-1-farosas@suse.de>
Add a new function that takes a QemuOptsList pointer and expects
informative messages to be printed instead of returned in an Error
object. This makes the _noisily version simmetric with the
"non-noisily". The next patch will convert the callers to use the
appropriate version.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
include/qemu/option.h | 2 ++
util/qemu-option.c | 14 ++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/include/qemu/option.h b/include/qemu/option.h
index dfe0d9b893..df68da9aa8 100644
--- a/include/qemu/option.h
+++ b/include/qemu/option.h
@@ -134,6 +134,8 @@ QemuOpts *qemu_opts_parse(const char *group, const char *params,
bool permit_abbrev, Error **errp);
QemuOpts *qemu_opts_parse_list(QemuOptsList *list, const char *params,
bool permit_abbrev, Error **errp);
+QemuOpts *qemu_opts_parse_list_noisily(QemuOptsList *list, const char *params,
+ bool permit_abbrev);
QemuOpts *qemu_opts_from_qdict(QemuOptsList *list, const QDict *qdict,
Error **errp);
QDict *qemu_opts_to_qdict_filtered(QemuOpts *opts, QDict *qdict,
diff --git a/util/qemu-option.c b/util/qemu-option.c
index 7cb45f0710..be9404ab7f 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -965,6 +965,20 @@ QemuOpts *qemu_opts_parse_list(QemuOptsList *list, const char *params,
*/
QemuOpts *qemu_opts_parse_noisily(QemuOptsList *list, const char *params,
bool permit_abbrev)
+{
+ return qemu_opts_parse_list_noisily(list, params, permit_abbrev);
+}
+
+/**
+ * Create a QemuOpts in @list and with options parsed from @params.
+ * If @permit_abbrev, the first key=value in @params may omit key=,
+ * and is treated as if key was @list->implied_opt_name.
+ * Report errors with error_report_err(). This is inappropriate in
+ * QMP context. Do not use this function there!
+ * Return the new QemuOpts on success, null pointer on error.
+ */
+QemuOpts *qemu_opts_parse_list_noisily(QemuOptsList *list, const char *params,
+ bool permit_abbrev)
{
Error *err = NULL;
QemuOpts *opts;
--
2.53.0
next prev parent reply other threads:[~2026-09-30 22:14 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 22:10 [PATCH v2 00/11] qemu-options: Spring cleanup Fabiano Rosas
2026-09-30 22:10 ` [PATCH v2 01/11] qemu-option: Use g_autofree when calling get_opt_name_value() Fabiano Rosas
2026-10-01 9:42 ` marcandre.lureau
2026-09-30 22:10 ` [PATCH v2 02/11] tests/unit/test-qemu-opts: Validate help=foo options Fabiano Rosas
2026-10-01 9:42 ` marcandre.lureau
2026-09-30 22:10 ` [PATCH v2 03/11] qemu-option: Remove short form options support Fabiano Rosas
2026-10-01 9:42 ` marcandre.lureau
2026-10-07 7:08 ` Markus Armbruster
2026-10-07 12:43 ` Fabiano Rosas
2026-10-08 4:42 ` Markus Armbruster
2026-10-10 0:04 ` Fabiano Rosas
2026-10-07 8:16 ` Markus Armbruster
2026-09-30 22:10 ` [PATCH v2 04/11] qemu-option: Fix 'help' parameter parsing Fabiano Rosas
2026-10-01 9:42 ` marcandre.lureau
2026-10-01 15:43 ` Fabiano Rosas
2026-09-30 22:10 ` [PATCH v2 05/11] qemu-option: Add qemu_opts_parse_list Fabiano Rosas
2026-10-01 9:42 ` marcandre.lureau
2026-09-30 22:11 ` [PATCH v2 06/11] qemu-option: Change qemu_parse_opts() to take the group name Fabiano Rosas
2026-10-01 9:42 ` marcandre.lureau
2026-09-30 22:11 ` Fabiano Rosas [this message]
2026-10-01 9:42 ` [PATCH v2 07/11] qemu-option: Add qemu_opts_parse_list_noisily marcandre.lureau
2026-10-07 12:54 ` Eric Blake
2026-09-30 22:11 ` [PATCH v2 08/11] qemu-option: Use qemu_opts_parse_list_noisily where appropriate Fabiano Rosas
2026-10-01 9:42 ` marcandre.lureau
2026-09-30 22:11 ` [PATCH v2 09/11] qemu-option: Change qemu_opts_parse_noisily() to take the group Fabiano Rosas
2026-10-01 9:42 ` marcandre.lureau
2026-10-07 12:54 ` Eric Blake
2026-09-30 22:11 ` [PATCH v2 10/11] qemu-option: Check for NULL list at qemu_opts_parse() Fabiano Rosas
2026-10-01 9:42 ` marcandre.lureau
2026-09-30 22:11 ` [PATCH v2 11/11] qemu-option: Remove a few instances of noisily parsing Fabiano Rosas
2026-10-01 9:42 ` marcandre.lureau
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=20260930221105.2262063-8-farosas@suse.de \
--to=farosas@suse.de \
--cc=armbru@redhat.com \
--cc=berrange@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.