From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com
Subject: [PATCH 5/5] qom: allow user-creatable classes to be in modules
Date: Tue, 29 Oct 2024 13:26:09 +0100 [thread overview]
Message-ID: <20241029122609.514347-6-pbonzini@redhat.com> (raw)
In-Reply-To: <20241029122609.514347-1-pbonzini@redhat.com>
There is no real reason to make user-creatable classes different
from other backends in this respect. This also allows modularized
character devices to be treated by qom-list-properties just like
builtin ones.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
qom/object_interfaces.c | 2 +-
qom/qom-qmp-cmds.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c
index 1f2aa133066..1a6f29c053e 100644
--- a/qom/object_interfaces.c
+++ b/qom/object_interfaces.c
@@ -90,7 +90,7 @@ Object *user_creatable_add_type(const char *type, const char *id,
return NULL;
}
- klass = object_class_by_name(type);
+ klass = module_object_class_by_name(type);
if (!klass) {
error_setg(errp, "invalid object type: %s", type);
return NULL;
diff --git a/qom/qom-qmp-cmds.c b/qom/qom-qmp-cmds.c
index 69a8e17aa80..46e4562300c 100644
--- a/qom/qom-qmp-cmds.c
+++ b/qom/qom-qmp-cmds.c
@@ -186,7 +186,7 @@ ObjectPropertyInfoList *qmp_qom_list_properties(const char *typename,
ObjectPropertyIterator iter;
ObjectPropertyInfoList *prop_list = NULL;
- klass = object_class_by_name(typename);
+ klass = module_object_class_by_name(typename);
if (klass == NULL) {
error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
"Class '%s' not found", typename);
--
2.47.0
next prev parent reply other threads:[~2024-10-29 12:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-29 12:26 [PATCH 0/5] qom: module loading cleanups Paolo Bonzini
2024-10-29 12:26 ` [PATCH 1/5] qom: remove unused function Paolo Bonzini
2024-10-29 12:35 ` Daniel P. Berrangé
2024-10-29 12:26 ` [PATCH 2/5] qom: use object_new_with_class when possible Paolo Bonzini
2024-10-29 19:51 ` Philippe Mathieu-Daudé
2024-10-29 12:26 ` [PATCH 3/5] qom: centralize module-loading functionality Paolo Bonzini
2024-10-29 12:26 ` [PATCH 4/5] qom: let object_new use a module if the type is not present Paolo Bonzini
2024-10-29 12:26 ` Paolo Bonzini [this message]
2024-10-29 17:05 ` [PATCH 0/5] qom: module loading cleanups Richard Henderson
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=20241029122609.514347-6-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@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).