diff options
author | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2014-01-14 12:09:59 +1000 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2014-01-14 12:10:08 +1000 |
commit | 133fe77437d3a23bf1fd70a231b4f29d5fa0571c (patch) | |
tree | 89450efd322bd414e941e30dfc991652892e4a3e /include | |
parent | 73c694565c6144e0c4e15041b5250a04a25107c3 (diff) | |
parent | c950114286ea358a93ce632db0421945e1008395 (diff) | |
download | qemu-133fe77437d3a23bf1fd70a231b4f29d5fa0571c.zip |
Merge remote branch 'luiz/queue/qmp' into qmpq
* luiz/queue/qmp:
migration: qmp_migrate(): keep working after syntax error
qerror: Remove assert_no_error()
qemu-option: Remove qemu_opts_create_nofail
target-i386: Remove assert_no_error usage
hw: Remove assert_no_error usages
qdev: Delete dead code
error: Add error_abort
monitor: add object-add (QMP) and object_add (HMP) command
monitor: add object-del (QMP) and object_del (HMP) command
qom: catch errors in object_property_add_child
qom: fix leak for objects created with -object
rng: initialize file descriptor to -1
qemu-monitor: HMP cpu-add wrapper
vl: add missing transition debug->finish_migrate
Message-Id: 1389045795-18706-1-git-send-email-lcapitulino@redhat.com
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/xilinx.h | 14 | ||||
-rw-r--r-- | include/monitor/monitor.h | 3 | ||||
-rw-r--r-- | include/qapi/error.h | 6 | ||||
-rw-r--r-- | include/qapi/qmp/qerror.h | 1 | ||||
-rw-r--r-- | include/qapi/visitor.h | 3 | ||||
-rw-r--r-- | include/qemu/option.h | 1 | ||||
-rw-r--r-- | include/qemu/typedefs.h | 2 |
7 files changed, 16 insertions, 14 deletions
diff --git a/include/hw/xilinx.h b/include/hw/xilinx.h index 0c0251a2e9..9d6debe4d0 100644 --- a/include/hw/xilinx.h +++ b/include/hw/xilinx.h @@ -59,16 +59,13 @@ xilinx_axiethernet_init(DeviceState *dev, NICInfo *nd, StreamSlave *ds, StreamSlave *cs, hwaddr base, qemu_irq irq, int txmem, int rxmem) { - Error *errp = NULL; - qdev_set_nic_properties(dev, nd); qdev_prop_set_uint32(dev, "rxmem", rxmem); qdev_prop_set_uint32(dev, "txmem", txmem); object_property_set_link(OBJECT(dev), OBJECT(ds), - "axistream-connected", &errp); + "axistream-connected", &error_abort); object_property_set_link(OBJECT(dev), OBJECT(cs), - "axistream-control-connected", &errp); - assert_no_error(errp); + "axistream-control-connected", &error_abort); qdev_init_nofail(dev); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq); @@ -78,14 +75,11 @@ static inline void xilinx_axidma_init(DeviceState *dev, StreamSlave *ds, StreamSlave *cs, hwaddr base, qemu_irq irq, qemu_irq irq2, int freqhz) { - Error *errp = NULL; - qdev_prop_set_uint32(dev, "freqhz", freqhz); object_property_set_link(OBJECT(dev), OBJECT(ds), - "axistream-connected", &errp); + "axistream-connected", &error_abort); object_property_set_link(OBJECT(dev), OBJECT(cs), - "axistream-control-connected", &errp); - assert_no_error(errp); + "axistream-control-connected", &error_abort); qdev_init_nofail(dev); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index 10fa0e390c..22d8b8f3e0 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -93,6 +93,9 @@ int monitor_read_password(Monitor *mon, ReadLineFunc *readline_func, int qmp_qom_set(Monitor *mon, const QDict *qdict, QObject **ret); int qmp_qom_get(Monitor *mon, const QDict *qdict, QObject **ret); +int qmp_object_add(Monitor *mon, const QDict *qdict, QObject **ret); +void object_add(const char *type, const char *id, const QDict *qdict, + Visitor *v, Error **errp); AddfdInfo *monitor_fdset_add_fd(int fd, bool has_fdset_id, int64_t fdset_id, bool has_opaque, const char *opaque, diff --git a/include/qapi/error.h b/include/qapi/error.h index 7d4c6963d3..c0f0c3b432 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -95,4 +95,10 @@ void error_propagate(Error **dst_err, Error *local_err); */ void error_free(Error *err); +/** + * If passed to error_set and friends, abort(). + */ + +extern Error *error_abort; + #endif diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index c30c2f6d7a..73c67b70c2 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -29,7 +29,6 @@ typedef struct QError { QString *qerror_human(const QError *qerror); void qerror_report(ErrorClass err_class, const char *fmt, ...) GCC_FMT_ATTR(2, 3); void qerror_report_err(Error *err); -void assert_no_error(Error *err); /* * QError class list diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h index 48a2a2edfd..29da211b47 100644 --- a/include/qapi/visitor.h +++ b/include/qapi/visitor.h @@ -13,6 +13,7 @@ #ifndef QAPI_VISITOR_CORE_H #define QAPI_VISITOR_CORE_H +#include "qemu/typedefs.h" #include "qapi/qmp/qobject.h" #include "qapi/error.h" #include <stdlib.h> @@ -26,8 +27,6 @@ typedef struct GenericList struct GenericList *next; } GenericList; -typedef struct Visitor Visitor; - void visit_start_handle(Visitor *v, void **obj, const char *kind, const char *name, Error **errp); void visit_end_handle(Visitor *v, Error **errp); diff --git a/include/qemu/option.h b/include/qemu/option.h index 5c0c6dd294..3ea871a3ba 100644 --- a/include/qemu/option.h +++ b/include/qemu/option.h @@ -136,7 +136,6 @@ int qemu_opt_foreach(QemuOpts *opts, qemu_opt_loopfunc func, void *opaque, QemuOpts *qemu_opts_find(QemuOptsList *list, const char *id); QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id, int fail_if_exists, Error **errp); -QemuOpts *qemu_opts_create_nofail(QemuOptsList *list); void qemu_opts_reset(QemuOptsList *list); void qemu_opts_loc_restore(QemuOpts *opts); int qemu_opts_set(QemuOptsList *list, const char *id, diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index a4c1b84d69..45244960b5 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -10,6 +10,8 @@ typedef struct QEMUBH QEMUBH; typedef struct AioContext AioContext; +typedef struct Visitor Visitor; + struct Monitor; typedef struct Monitor Monitor; typedef struct MigrationParams MigrationParams; |