[PATCH] qemu-storage-daemon: Enable object-add

Kevin Wolf posted 1 patch 3 years, 3 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210204072137.19663-1-kwolf@redhat.com
Maintainers: Kevin Wolf <kwolf@redhat.com>
storage-daemon/qemu-storage-daemon.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH] qemu-storage-daemon: Enable object-add
Posted by Kevin Wolf 3 years, 3 months ago
As we don't have a fully QAPIfied version of object-add yet and it still
has 'gen': false in the schema, it needs to be registered explicitly in
init_qmp_commands() to be available for users.

Fixes: 2af282ec51a27116d0402cab237b8970800f870c
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 storage-daemon/qemu-storage-daemon.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/storage-daemon/qemu-storage-daemon.c b/storage-daemon/qemu-storage-daemon.c
index d8d172cc60..9021a46b3a 100644
--- a/storage-daemon/qemu-storage-daemon.c
+++ b/storage-daemon/qemu-storage-daemon.c
@@ -144,6 +144,8 @@ static void init_qmp_commands(void)
     qmp_init_marshal(&qmp_commands);
     qmp_register_command(&qmp_commands, "query-qmp-schema",
                          qmp_query_qmp_schema, QCO_ALLOW_PRECONFIG);
+    qmp_register_command(&qmp_commands, "object-add", qmp_object_add,
+                         QCO_NO_OPTIONS);
 
     QTAILQ_INIT(&qmp_cap_negotiation_commands);
     qmp_register_command(&qmp_cap_negotiation_commands, "qmp_capabilities",
-- 
2.29.2


Re: [PATCH] qemu-storage-daemon: Enable object-add
Posted by Daniel P. Berrangé 3 years, 3 months ago
On Thu, Feb 04, 2021 at 08:21:37AM +0100, Kevin Wolf wrote:
> As we don't have a fully QAPIfied version of object-add yet and it still
> has 'gen': false in the schema, it needs to be registered explicitly in
> init_qmp_commands() to be available for users.
> 
> Fixes: 2af282ec51a27116d0402cab237b8970800f870c
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  storage-daemon/qemu-storage-daemon.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|