aboutsummaryrefslogtreecommitdiff
path: root/qom/object_interfaces.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-10-07 18:49:02 +0200
committerKevin Wolf <kwolf@redhat.com>2020-10-15 16:06:27 +0200
commitc9ac1458430e4794adc8f0418d263befc3917886 (patch)
tree5c11a59fbf6f7435b78d568b255af9408bd00249 /qom/object_interfaces.c
parent0e301d44271b370ed0d46c2e85c2a5bda041c57c (diff)
downloadqemu-c9ac1458430e4794adc8f0418d263befc3917886.zip
qemu-c9ac1458430e4794adc8f0418d263befc3917886.tar.gz
qemu-c9ac1458430e4794adc8f0418d263befc3917886.tar.bz2
qom: Add user_creatable_print_help_from_qdict()
This adds a function that, given a QDict of non-help options, prints help for user creatable objects. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20201007164903.282198-4-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qom/object_interfaces.c')
-rw-r--r--qom/object_interfaces.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c
index 3fd1da1..ed896fe 100644
--- a/qom/object_interfaces.c
+++ b/qom/object_interfaces.c
@@ -279,6 +279,15 @@ bool user_creatable_print_help(const char *type, QemuOpts *opts)
return false;
}
+void user_creatable_print_help_from_qdict(QDict *args)
+{
+ const char *type = qdict_get_try_str(args, "qom-type");
+
+ if (!type || !user_creatable_print_type_properites(type)) {
+ user_creatable_print_types();
+ }
+}
+
bool user_creatable_del(const char *id, Error **errp)
{
Object *container;