xen-block.c (4f67d30b) | xen-block.c (5f07c4d6) |
---|---|
1/* 2 * Copyright (c) 2018 Citrix Systems Inc. 3 * 4 * This work is licensed under the terms of the GNU GPL, version 2 or later. 5 * See the COPYING file in the top-level directory. 6 */ 7 8#include "qemu/osdep.h" --- 4 unchanged lines hidden (view full) --- 13#include "qapi/error.h" 14#include "qapi/qapi-commands-block-core.h" 15#include "qapi/qapi-commands-qom.h" 16#include "qapi/qapi-visit-block-core.h" 17#include "qapi/qobject-input-visitor.h" 18#include "qapi/visitor.h" 19#include "qapi/qmp/qdict.h" 20#include "qapi/qmp/qstring.h" | 1/* 2 * Copyright (c) 2018 Citrix Systems Inc. 3 * 4 * This work is licensed under the terms of the GNU GPL, version 2 or later. 5 * See the COPYING file in the top-level directory. 6 */ 7 8#include "qemu/osdep.h" --- 4 unchanged lines hidden (view full) --- 13#include "qapi/error.h" 14#include "qapi/qapi-commands-block-core.h" 15#include "qapi/qapi-commands-qom.h" 16#include "qapi/qapi-visit-block-core.h" 17#include "qapi/qobject-input-visitor.h" 18#include "qapi/visitor.h" 19#include "qapi/qmp/qdict.h" 20#include "qapi/qmp/qstring.h" |
21#include "qom/object_interfaces.h" |
|
21#include "hw/xen/xen_common.h" 22#include "hw/block/xen_blkif.h" 23#include "hw/qdev-properties.h" 24#include "hw/xen/xen-block.h" 25#include "hw/xen/xen-backend.h" 26#include "sysemu/blockdev.h" 27#include "sysemu/block-backend.h" 28#include "sysemu/iothread.h" --- 824 unchanged lines hidden (view full) --- 853 g_free(iothread); 854} 855 856static XenBlockIOThread *xen_block_iothread_create(const char *id, 857 Error **errp) 858{ 859 XenBlockIOThread *iothread = g_new(XenBlockIOThread, 1); 860 Error *local_err = NULL; | 22#include "hw/xen/xen_common.h" 23#include "hw/block/xen_blkif.h" 24#include "hw/qdev-properties.h" 25#include "hw/xen/xen-block.h" 26#include "hw/xen/xen-backend.h" 27#include "sysemu/blockdev.h" 28#include "sysemu/block-backend.h" 29#include "sysemu/iothread.h" --- 824 unchanged lines hidden (view full) --- 854 g_free(iothread); 855} 856 857static XenBlockIOThread *xen_block_iothread_create(const char *id, 858 Error **errp) 859{ 860 XenBlockIOThread *iothread = g_new(XenBlockIOThread, 1); 861 Error *local_err = NULL; |
862 QDict *opts; 863 QObject *ret_data; |
|
861 862 iothread->id = g_strdup(id); 863 | 864 865 iothread->id = g_strdup(id); 866 |
864 qmp_object_add(TYPE_IOTHREAD, id, false, NULL, &local_err); | 867 opts = qdict_new(); 868 qdict_put_str(opts, "qom-type", TYPE_IOTHREAD); 869 qdict_put_str(opts, "id", id); 870 qmp_object_add(opts, &ret_data, &local_err); 871 qobject_unref(opts); 872 qobject_unref(ret_data); 873 |
865 if (local_err) { 866 error_propagate(errp, local_err); 867 868 g_free(iothread->id); 869 g_free(iothread); 870 return NULL; 871 } 872 --- 158 unchanged lines hidden --- | 874 if (local_err) { 875 error_propagate(errp, local_err); 876 877 g_free(iothread->id); 878 g_free(iothread); 879 return NULL; 880 } 881 --- 158 unchanged lines hidden --- |