aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-03-19 11:27:40 +0000
committerPeter Maydell <peter.maydell@linaro.org>2021-03-19 11:27:40 +0000
commit92566947b3ac5ca75f91a34acb188219c455fc71 (patch)
treefb29699e353fe9b93dbbaf4cc1c2b2bc2a5843de /hw
parentcf6b56d4f2107259f52413f979a1d474dad0c1e1 (diff)
parent009ff89328b1da3ea8ba316bf2be2125bc9937c5 (diff)
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches and object-add QAPIfication - QAPIfy object-add and --object - stream: Fail gracefully if permission is denied - storage-daemon: Fix crash on quit when job is still running - curl: Fix use after free - char: Deprecate backend aliases, fix QMP query-chardev-backends - Fix image creation option defaults that exist in both the format and the protocol layer (e.g. 'cluster_size' in qcow2 and rbd; the qcow2 default was incorrectly applied to the rbd layer) # gpg: Signature made Fri 19 Mar 2021 09:18:22 GMT # gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6 # gpg: issuer "kwolf@redhat.com" # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full] # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (42 commits) vl: allow passing JSON to -object qom: move user_creatable_add_opts logic to vl.c and QAPIfy it tests: convert check-qom-proplist to keyval qom: Support JSON in HMP object_add and tools --object char: Simplify chardev_name_foreach() char: Deprecate backend aliases 'tty' and 'parport' char: Skip CLI aliases in query-chardev-backends qom: Add user_creatable_parse_str() hmp: QAPIfy object_add qemu-img: Use user_creatable_process_cmdline() for --object qom: Add user_creatable_add_from_str() qemu-nbd: Use user_creatable_process_cmdline() for --object qemu-io: Use user_creatable_process_cmdline() for --object qom: Factor out user_creatable_process_cmdline() qom: Remove user_creatable_add_dict() qemu-storage-daemon: Implement --object with qmp_object_add() qom: Make "object" QemuOptsList optional qapi/qom: QAPIfy object-add qapi/qom: Add ObjectOptions for x-remote-object qapi/qom: Add ObjectOptions for input-* ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/block/xen-block.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index a3b69e2709..ac82d54063 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -836,17 +836,17 @@ static XenBlockIOThread *xen_block_iothread_create(const char *id,
{
ERRP_GUARD();
XenBlockIOThread *iothread = g_new(XenBlockIOThread, 1);
- QDict *opts;
- QObject *ret_data = NULL;
+ ObjectOptions *opts;
iothread->id = g_strdup(id);
- opts = qdict_new();
- qdict_put_str(opts, "qom-type", TYPE_IOTHREAD);
- qdict_put_str(opts, "id", id);
- qmp_object_add(opts, &ret_data, errp);
- qobject_unref(opts);
- qobject_unref(ret_data);
+ opts = g_new(ObjectOptions, 1);
+ *opts = (ObjectOptions) {
+ .qom_type = OBJECT_TYPE_IOTHREAD,
+ .id = g_strdup(id),
+ };
+ qmp_object_add(opts, errp);
+ qapi_free_ObjectOptions(opts);
if (*errp) {
g_free(iothread->id);