From: colazcy <colazcyg@gmail.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH RFC v4 1/1] ui/dbus: add org.qemu.Display1.UIInfo interface
Date: Mon, 31 Aug 2026 11:33:38 +0800 [thread overview]
Message-ID: <62d69a7c-5b6d-4278-86bc-ec21782ffa8d@gmail.com> (raw)
In-Reply-To: <CAJ+F1CJjQm4dHy5U7MbTFSLgAu5Fgu3LdHrJvkvDPQQcxPtztA@mail.gmail.com>
Hi
On 8/30/26 7:48 PM, Marc-André Lureau wrote:
>> +static bool
>> +dbus_ui_info_apply_lookup(GDBusMethodInvocation *invocation,
>> + GVariantDict *dict,
>> + const gchar *key,
>> + const gchar *fmt_str,
>> + void *res)
>> +{
>> + if (g_variant_dict_contains(dict, key) &&
>> + !g_variant_dict_lookup(dict, key, fmt_str, res)) {
>> + g_dbus_method_invocation_return_error(invocation,
>> + DBUS_DISPLAY_ERROR,
>> + DBUS_DISPLAY_ERROR_INVALID,
>> + "%s must have D-Bus signature %s",
>> + key, fmt_str);
>> + return false;
>> + }
>> + return true;
> A bit surprising that the function returns true for unknown/invalid keys, but ok
The function will:
* return false for invalid key-value pairs (values have the wrong type
signature).
* return true otherwise.
So `dbus_ui_info_apply` will ignore extra keys, report errors for
invalid key-value pairs and accept a dictionary whose keys are a subset
of the schema keys. This behavior is expected.
> lgtm, I can pick this patch unless you want to send a non-rfc version before
Okay. This patch is my final version and you can pick it.
Thanks for your guidance.
prev parent reply other threads:[~2026-08-31 3:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 5:46 [PATCH RFC v4 0/1] the org.qemu.Display1.UIInfo interface design Chengyang Zhu
2026-08-30 5:46 ` [PATCH RFC v4 1/1] ui/dbus: add org.qemu.Display1.UIInfo interface Chengyang Zhu
2026-08-30 11:48 ` Marc-André Lureau
2026-08-31 3:33 ` colazcy [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=62d69a7c-5b6d-4278-86bc-ec21782ffa8d@gmail.com \
--to=colazcyg@gmail.com \
--cc=marcandre.lureau@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.