From: Paolo Bonzini <pbonzini@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
ぷ风过无痕?? <787738581@qq.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: Chardev: delete the QemuOpts reserved in vm_config_groups
Date: Fri, 19 Nov 2021 10:27:57 +0100 [thread overview]
Message-ID: <cc793f13-fb5c-f075-3839-e603d727b557@redhat.com> (raw)
In-Reply-To: <CAMxuvaw1+x0FmG_0aW2YCL2pUPFuO=VC=0nv0QA43MkKnMM7fQ@mail.gmail.com>
On 11/8/21 09:46, Marc-André Lureau wrote:
>> + QemuOpts *opts;
>>
>> chr = qemu_chr_find(id);
>> if (chr == NULL) {
>> @@ -1175,6 +1177,10 @@ void qmp_chardev_remove(const char *id, Error **errp)
>> return;
>> }
>> object_unparent(OBJECT(chr));
>> + /* delete the opts reserved in vm_config_groups list. */
>> + opts = qemu_opts_find(qemu_find_opts("chardev"), id);
>> + if (opts)
>> + qemu_opts_del(opts);
> That seems reasonable to me,
> Reviewed-by: Marc-André Lureau<marcandre.lureau@redhat.com>
I think it should be done instead in an unparent function, i.e. with
something like "oc->unparent = chr_unparent;" in char_class_init.
chr_unparent does the qemu_opts_find/qemu_opts_del.
Thanks,
Paolo
next prev parent reply other threads:[~2021-11-19 9:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-06 10:23 Chardev: delete the QemuOpts reserved in vm_config_groups =?gb18030?B?pNe357n9zt662z8/?=
2021-11-08 8:46 ` Marc-André Lureau
2021-11-09 2:55 ` =?gb18030?B?u9i4tKO6IENoYXJkZXY6IGRlbGV0ZSB0aGUgUWVtdU9wdHMgcmVzZXJ2ZWQgaW4gdm1fY29uZmlnX2dyb3Vwcw==?= =?gb18030?B?pNe357n9zt662z8/?=
2021-11-15 8:14 ` Chardev: delete the QemuOpts reserved in vm_config_groups =?gb18030?B?pNe357n9zt662z8/?=
2021-11-19 9:27 ` Paolo Bonzini [this message]
2021-11-19 9:55 ` =?gb18030?B?u9i4tKO6IENoYXJkZXY6IGRlbGV0ZSB0aGUgUWVtdU9wdHMgcmVzZXJ2ZWQgaW4gdm1fY29uZmlnX2dyb3Vwcw==?= =?gb18030?B?pNe357n9zt662z8/?=
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=cc793f13-fb5c-f075-3839-e603d727b557@redhat.com \
--to=pbonzini@redhat.com \
--cc=787738581@qq.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 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).