summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell2015-06-23 11:38:00 +0200
committerPeter Maydell2015-06-23 11:38:00 +0200
commita3206972a9eab65ec8e8f9ae320ad628ba4b58f1 (patch)
treef5109b0cced9784dde30aa2877aea30651933eee /hw
parentm68k: fix usp processing on interrupt entry and exception exit (diff)
parentInclude monitor/monitor.h exactly where needed (diff)
downloadqemu-a3206972a9eab65ec8e8f9ae320ad628ba4b58f1.tar.gz
qemu-a3206972a9eab65ec8e8f9ae320ad628ba4b58f1.tar.xz
qemu-a3206972a9eab65ec8e8f9ae320ad628ba4b58f1.zip
Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-06-22' into staging
Monitor patches # gpg: Signature made Mon Jun 22 18:56:18 2015 BST using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-monitor-2015-06-22: (24 commits) Include monitor/monitor.h exactly where needed Include qapi/qmp/qerror.h exactly where needed qerror: Move #include out of qerror.h qerror: Finally unused, clean up qmp: Wean off qerror_report() tpm: Avoid qerror_report() outside QMP command handlers qerror: Clean up QERR_ macros to expand into a single string qerror: Eliminate QERR_DEVICE_NOT_FOUND vl: Use error_report() for --display errors vl: Avoid qerror_report() outside QMP command handlers QemuOpts: Wean off qerror_report_err() qdev-monitor: Propagate errors through qdev_device_add() qdev-monitor: Propagate errors through set_property() qdev-monitor: Convert qbus_find() to Error qdev-monitor: Fix check for full bus qdev-monitor: Stop error avalanche in qbus_find_recursive() disas: Remove uses of CPU env monitor: Split mon_get_cpu fn to remove ENV_GET_CPU monitor: Fix failure path for "S" argument monitor: Point to "help" command on syntax error ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/9pfs/virtio-9p.c1
-rw-r--r--hw/char/serial-pci.c1
-rw-r--r--hw/char/virtio-serial-bus.c1
-rw-r--r--hw/core/nmi.c2
-rw-r--r--hw/core/platform-bus.c1
-rw-r--r--hw/core/qdev-properties-system.c4
-rw-r--r--hw/core/qdev-properties.c13
-rw-r--r--hw/core/qdev.c9
-rw-r--r--hw/display/g364fb.c1
-rw-r--r--hw/display/qxl.c1
-rw-r--r--hw/display/tcx.c1
-rw-r--r--hw/dma/xilinx_axidma.c1
-rw-r--r--hw/i386/pc.c2
-rw-r--r--hw/ide/ahci.c2
-rw-r--r--hw/intc/openpic.c6
-rw-r--r--hw/misc/ivshmem.c2
-rw-r--r--hw/net/rocker/qmp-norocker.c8
-rw-r--r--hw/net/xilinx_axienet.c1
-rw-r--r--hw/pci/pci-stub.c3
-rw-r--r--hw/pci/pci.c1
-rw-r--r--hw/pci/pcie.c1
-rw-r--r--hw/pci/pcie_aer.c4
-rw-r--r--hw/pci/shpc.c1
-rw-r--r--hw/ppc/spapr_pci.c8
-rw-r--r--hw/ppc/spapr_vio.c1
-rw-r--r--hw/ppc/virtex_ml507.c2
-rw-r--r--hw/s390x/event-facility.c1
-rw-r--r--hw/s390x/s390-virtio-bus.c1
-rw-r--r--hw/s390x/s390-virtio.c4
-rw-r--r--hw/s390x/virtio-ccw.c2
-rw-r--r--hw/scsi/vhost-scsi.c1
-rw-r--r--hw/timer/hpet.c1
-rw-r--r--hw/tpm/tpm_passthrough.c1
-rw-r--r--hw/usb/bus.c1
-rw-r--r--hw/usb/ccid-card-emulated.c1
-rw-r--r--hw/usb/ccid-card-passthru.c2
-rw-r--r--hw/usb/dev-network.c2
-rw-r--r--hw/usb/dev-serial.c2
-rw-r--r--hw/usb/dev-smartcard-reader.c1
-rw-r--r--hw/usb/dev-storage.c1
-rw-r--r--hw/usb/hcd-ehci.h1
-rw-r--r--hw/usb/host-libusb.c1
-rw-r--r--hw/usb/redirect.c9
-rw-r--r--hw/virtio/virtio-rng.c1
44 files changed, 56 insertions, 55 deletions
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index 4964da0d7e..6ef8af3f64 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -13,6 +13,7 @@
#include "hw/virtio/virtio.h"
#include "hw/i386/pc.h"
+#include "qemu/error-report.h"
#include "qemu/sockets.h"
#include "virtio-9p.h"
#include "fsdev/qemu-fsdev.h"
diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
index 653064fadf..1c8b9be5cc 100644
--- a/hw/char/serial-pci.c
+++ b/hw/char/serial-pci.c
@@ -27,7 +27,6 @@
#include "hw/char/serial.h"
#include "hw/pci/pci.h"
-#include "qapi/qmp/qerror.h"
#define PCI_SERIAL_MAX_PORTS 4
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index d451b22386..78c73e5abe 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -20,6 +20,7 @@
#include "qemu/iov.h"
#include "monitor/monitor.h"
+#include "qemu/error-report.h"
#include "qemu/queue.h"
#include "hw/sysbus.h"
#include "trace.h"
diff --git a/hw/core/nmi.c b/hw/core/nmi.c
index 5260d6c1ec..de1d1f8cb1 100644
--- a/hw/core/nmi.c
+++ b/hw/core/nmi.c
@@ -67,7 +67,7 @@ void nmi_monitor_handle(int cpu_index, Error **errp)
if (ns.handled) {
error_propagate(errp, ns.errp);
} else {
- error_set(errp, QERR_UNSUPPORTED);
+ error_setg(errp, QERR_UNSUPPORTED);
}
}
diff --git a/hw/core/platform-bus.c b/hw/core/platform-bus.c
index 0f052b3338..70e0518901 100644
--- a/hw/core/platform-bus.c
+++ b/hw/core/platform-bus.c
@@ -20,7 +20,6 @@
*/
#include "hw/platform-bus.h"
-#include "monitor/monitor.h"
#include "exec/address-spaces.h"
#include "sysemu/sysemu.h"
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index 0309fe5767..aa794ca445 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -326,8 +326,8 @@ static void set_vlan(Object *obj, Visitor *v, void *opaque,
hubport = net_hub_port_find(id);
if (!hubport) {
- error_set(errp, QERR_INVALID_PARAMETER_VALUE,
- name, prop->info->name);
+ error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
+ name, prop->info->name);
return;
}
*ptr = hubport;
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index a1606deaca..47c1e8f3c5 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -1,6 +1,7 @@
#include "net/net.h"
#include "hw/qdev.h"
#include "qapi/qmp/qerror.h"
+#include "qemu/error-report.h"
#include "sysemu/block-backend.h"
#include "hw/block/block.h"
#include "net/hub.h"
@@ -570,8 +571,8 @@ static void set_pci_devfn(Object *obj, Visitor *v, void *opaque,
if (local_err) {
error_propagate(errp, local_err);
} else if (value < -1 || value > 255) {
- error_set(errp, QERR_INVALID_PARAMETER_VALUE, name ? name : "null",
- "pci_devfn");
+ error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
+ name ? name : "null", "pci_devfn");
} else {
*ptr = value;
}
@@ -640,8 +641,8 @@ static void set_blocksize(Object *obj, Visitor *v, void *opaque,
}
/* value of 0 means "unset" */
if (value && (value < min || value > max)) {
- error_set(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE,
- dev->id?:"", name, (int64_t)value, min, max);
+ error_setg(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE,
+ dev->id ? : "", name, (int64_t)value, min, max);
return;
}
@@ -923,8 +924,8 @@ void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,
break;
default:
case -EINVAL:
- error_set(errp, QERR_PROPERTY_VALUE_BAD,
- object_get_typename(OBJECT(dev)), prop->name, value);
+ error_setg(errp, QERR_PROPERTY_VALUE_BAD,
+ object_get_typename(OBJECT(dev)), prop->name, value);
break;
case -ENOENT:
error_setg(errp, "Property '%s.%s' can't find value '%s'",
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index a6353c177f..b2f404a765 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -32,6 +32,7 @@
#include "qapi/qmp/qerror.h"
#include "qapi/visitor.h"
#include "qapi/qmp/qjson.h"
+#include "qemu/error-report.h"
#include "hw/hotplug.h"
#include "hw/boards.h"
#include "qapi-event.h"
@@ -276,13 +277,13 @@ void qdev_unplug(DeviceState *dev, Error **errp)
HotplugHandlerClass *hdc;
if (dev->parent_bus && !qbus_is_hotpluggable(dev->parent_bus)) {
- error_set(errp, QERR_BUS_NO_HOTPLUG, dev->parent_bus->name);
+ error_setg(errp, QERR_BUS_NO_HOTPLUG, dev->parent_bus->name);
return;
}
if (!dc->hotpluggable) {
- error_set(errp, QERR_DEVICE_NO_HOTPLUG,
- object_get_typename(OBJECT(dev)));
+ error_setg(errp, QERR_DEVICE_NO_HOTPLUG,
+ object_get_typename(OBJECT(dev)));
return;
}
@@ -1026,7 +1027,7 @@ static void device_set_realized(Object *obj, bool value, Error **errp)
Error *local_err = NULL;
if (dev->hotplugged && !dc->hotpluggable) {
- error_set(errp, QERR_DEVICE_NO_HOTPLUG, object_get_typename(obj));
+ error_setg(errp, QERR_DEVICE_NO_HOTPLUG, object_get_typename(obj));
return;
}
diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c
index 52a9733bfd..7f83a007b7 100644
--- a/hw/display/g364fb.c
+++ b/hw/display/g364fb.c
@@ -18,6 +18,7 @@
*/
#include "hw/hw.h"
+#include "qemu/error-report.h"
#include "ui/console.h"
#include "ui/pixel_ops.h"
#include "trace.h"
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 722146ec3a..f87a5ee602 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -25,7 +25,6 @@
#include "qemu/timer.h"
#include "qemu/queue.h"
#include "qemu/atomic.h"
-#include "monitor/monitor.h"
#include "sysemu/sysemu.h"
#include "trace.h"
diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index f3faf78bf8..a0b6bc58de 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -27,6 +27,7 @@
#include "ui/pixel_ops.h"
#include "hw/loader.h"
#include "hw/sysbus.h"
+#include "qemu/error-report.h"
#define TCX_ROM_FILE "QEMU,tcx.bin"
#define FCODE_MAX_ROM_SIZE 0x10000
diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c
index d06002dde8..cf842a3cc7 100644
--- a/hw/dma/xilinx_axidma.c
+++ b/hw/dma/xilinx_axidma.c
@@ -26,7 +26,6 @@
#include "qemu/timer.h"
#include "hw/ptimer.h"
#include "qemu/log.h"
-#include "qapi/qmp/qerror.h"
#include "qemu/main-loop.h"
#include "hw/stream.h"
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 3f0d435da9..7072930cfc 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -31,7 +31,6 @@
#include "hw/ide.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_bus.h"
-#include "monitor/monitor.h"
#include "hw/nvram/fw_cfg.h"
#include "hw/timer/hpet.h"
#include "hw/i386/smbios.h"
@@ -57,6 +56,7 @@
#include "sysemu/arch_init.h"
#include "qemu/bitmap.h"
#include "qemu/config-file.h"
+#include "qemu/error-report.h"
#include "hw/acpi/acpi.h"
#include "hw/acpi/cpu_hotplug.h"
#include "hw/cpu/icc_bus.h"
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 9e5d86297c..b4b65c100a 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -27,7 +27,7 @@
#include <hw/pci/pci.h>
#include <hw/sysbus.h>
-#include "monitor/monitor.h"
+#include "qemu/error-report.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
#include "internal.h"
diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
index 87fe2e865d..14ab0e31b8 100644
--- a/hw/intc/openpic.c
+++ b/hw/intc/openpic.c
@@ -1556,9 +1556,9 @@ static void openpic_realize(DeviceState *dev, Error **errp)
};
if (opp->nb_cpus > MAX_CPU) {
- error_set(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE,
- TYPE_OPENPIC, "nb_cpus", (uint64_t)opp->nb_cpus,
- (uint64_t)0, (uint64_t)MAX_CPU);
+ error_setg(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE,
+ TYPE_OPENPIC, "nb_cpus", (uint64_t)opp->nb_cpus,
+ (uint64_t)0, (uint64_t)MAX_CPU);
return;
}
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 231c35fdef..cc76989a39 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -22,7 +22,7 @@
#include "hw/pci/msix.h"
#include "sysemu/kvm.h"
#include "migration/migration.h"
-#include "qapi/qmp/qerror.h"
+#include "qemu/error-report.h"
#include "qemu/event_notifier.h"
#include "qemu/fifo8.h"
#include "sysemu/char.h"
diff --git a/hw/net/rocker/qmp-norocker.c b/hw/net/rocker/qmp-norocker.c
index f253747361..49b498b642 100644
--- a/hw/net/rocker/qmp-norocker.c
+++ b/hw/net/rocker/qmp-norocker.c
@@ -21,13 +21,13 @@
RockerSwitch *qmp_query_rocker(const char *name, Error **errp)
{
- error_set(errp, QERR_FEATURE_DISABLED, "rocker");
+ error_setg(errp, QERR_FEATURE_DISABLED, "rocker");
return NULL;
};
RockerPortList *qmp_query_rocker_ports(const char *name, Error **errp)
{
- error_set(errp, QERR_FEATURE_DISABLED, "rocker");
+ error_setg(errp, QERR_FEATURE_DISABLED, "rocker");
return NULL;
};
@@ -36,7 +36,7 @@ RockerOfDpaFlowList *qmp_query_rocker_of_dpa_flows(const char *name,
uint32_t tbl_id,
Error **errp)
{
- error_set(errp, QERR_FEATURE_DISABLED, "rocker");
+ error_setg(errp, QERR_FEATURE_DISABLED, "rocker");
return NULL;
};
@@ -45,6 +45,6 @@ RockerOfDpaGroupList *qmp_query_rocker_of_dpa_groups(const char *name,
uint8_t type,
Error **errp)
{
- error_set(errp, QERR_FEATURE_DISABLED, "rocker");
+ error_setg(errp, QERR_FEATURE_DISABLED, "rocker");
return NULL;
};
diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
index 21efedfc3e..92057707e0 100644
--- a/hw/net/xilinx_axienet.c
+++ b/hw/net/xilinx_axienet.c
@@ -26,7 +26,6 @@
#include "qemu/log.h"
#include "net/net.h"
#include "net/checksum.h"
-#include "qapi/qmp/qerror.h"
#include "hw/stream.h"
diff --git a/hw/pci/pci-stub.c b/hw/pci/pci-stub.c
index f8f237e823..063a7c2427 100644
--- a/hw/pci/pci-stub.c
+++ b/hw/pci/pci-stub.c
@@ -20,12 +20,13 @@
#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
+#include "qapi/qmp/qerror.h"
#include "hw/pci/pci.h"
#include "qmp-commands.h"
PciInfoList *qmp_query_pci(Error **errp)
{
- error_set(errp, QERR_UNSUPPORTED);
+ error_setg(errp, QERR_UNSUPPORTED);
return NULL;
}
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 21580433d4..45394cfe32 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -30,6 +30,7 @@
#include "net/net.h"
#include "sysemu/sysemu.h"
#include "hw/loader.h"
+#include "qemu/error-report.h"
#include "qemu/range.h"
#include "qmp-commands.h"
#include "trace.h"
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 1463e65b5d..14c77117f6 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -26,7 +26,6 @@
#include "hw/pci/pci_bus.h"
#include "hw/pci/pcie_regs.h"
#include "qemu/range.h"
-#include "qapi/qmp/qerror.h"
//#define DEBUG_PCIE
#ifdef DEBUG_PCIE
diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c
index c8dea8ed9c..f1847ac210 100644
--- a/hw/pci/pcie_aer.c
+++ b/hw/pci/pcie_aer.c
@@ -975,7 +975,7 @@ static int do_pcie_aer_inject_error(Monitor *mon,
if (pcie_aer_parse_error_string(error_name, &error_status, &correctable)) {
char *e = NULL;
error_status = strtoul(error_name, &e, 0);
- correctable = qdict_get_try_bool(qdict, "correctable", 0);
+ correctable = qdict_get_try_bool(qdict, "correctable", false);
if (!e || *e != '\0') {
monitor_printf(mon, "invalid error status value. \"%s\"",
error_name);
@@ -989,7 +989,7 @@ static int do_pcie_aer_inject_error(Monitor *mon,
if (correctable) {
err.flags |= PCIE_AER_ERR_IS_CORRECTABLE;
}
- if (qdict_get_try_bool(qdict, "advisory_non_fatal", 0)) {
+ if (qdict_get_try_bool(qdict, "advisory_non_fatal", false)) {
err.flags |= PCIE_AER_ERR_MAYBE_ADVISORY;
}
if (qdict_haskey(qdict, "header0")) {
diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c
index a706486394..bfb4d31b62 100644
--- a/hw/pci/shpc.c
+++ b/hw/pci/shpc.c
@@ -7,7 +7,6 @@
#include "hw/pci/pci.h"
#include "hw/pci/pci_bus.h"
#include "hw/pci/msi.h"
-#include "qapi/qmp/qerror.h"
/* TODO: model power only and disabled slot states. */
/* TODO: handle SERR and wakeups */
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 4df3a33db4..d4a6150527 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -1062,8 +1062,8 @@ static void spapr_phb_hot_plug_child(HotplugHandler *plug_handler,
* we need to let them know it's not enabled
*/
if (plugged_dev->hotplugged) {
- error_set(errp, QERR_BUS_NO_HOTPLUG,
- object_get_typename(OBJECT(phb)));
+ error_setg(errp, QERR_BUS_NO_HOTPLUG,
+ object_get_typename(OBJECT(phb)));
}
return;
}
@@ -1090,8 +1090,8 @@ static void spapr_phb_hot_unplug_child(HotplugHandler *plug_handler,
Error *local_err = NULL;
if (!phb->dr_enabled) {
- error_set(errp, QERR_BUS_NO_HOTPLUG,
- object_get_typename(OBJECT(phb)));
+ error_setg(errp, QERR_BUS_NO_HOTPLUG,
+ object_get_typename(OBJECT(phb)));
return;
}
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
index 174033dd41..8b59b64b7e 100644
--- a/hw/ppc/spapr_vio.c
+++ b/hw/ppc/spapr_vio.c
@@ -22,7 +22,6 @@
#include "hw/hw.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
-#include "monitor/monitor.h"
#include "hw/loader.h"
#include "elf.h"
#include "hw/sysbus.h"
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index 6ebd5bee8b..439732f7ab 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -32,6 +32,7 @@
#include "sysemu/device_tree.h"
#include "hw/loader.h"
#include "elf.h"
+#include "qemu/error-report.h"
#include "qemu/log.h"
#include "exec/address-spaces.h"
@@ -40,7 +41,6 @@
#include "ppc405.h"
#include "sysemu/block-backend.h"
-#include "qapi/qmp/qerror.h"
#define EPAPR_MAGIC (0x45504150)
#define FLASH_SIZE (16 * 1024 * 1024)
diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
index 1cb116a297..0c700effb1 100644
--- a/hw/s390x/event-facility.c
+++ b/hw/s390x/event-facility.c
@@ -15,7 +15,6 @@
*
*/
-#include "monitor/monitor.h"
#include "sysemu/sysemu.h"
#include "hw/s390x/sclp.h"
diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
index 8a6e27eac1..77aec8a5bd 100644
--- a/hw/s390x/s390-virtio-bus.c
+++ b/hw/s390x/s390-virtio-bus.c
@@ -21,7 +21,6 @@
#include "sysemu/block-backend.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
-#include "monitor/monitor.h"
#include "hw/loader.h"
#include "elf.h"
#include "hw/virtio/virtio.h"
diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c
index 00ea793651..1284e77b22 100644
--- a/hw/s390x/s390-virtio.c
+++ b/hw/s390x/s390-virtio.c
@@ -22,12 +22,12 @@
*/
#include "hw/hw.h"
+#include "qapi/qmp/qerror.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
#include "sysemu/sysemu.h"
#include "net/net.h"
#include "hw/boards.h"
-#include "monitor/monitor.h"
#include "hw/loader.h"
#include "hw/virtio/virtio.h"
#include "hw/sysbus.h"
@@ -324,7 +324,7 @@ void s390_nmi(NMIState *n, int cpu_index, Error **errp)
CPUState *cs = qemu_get_cpu(cpu_index);
if (s390_cpu_restart(S390_CPU(cs))) {
- error_set(errp, QERR_UNSUPPORTED);
+ error_setg(errp, QERR_UNSUPPORTED);
}
}
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index e32ada9bf1..9605bf40b9 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -15,12 +15,12 @@
#include "sysemu/blockdev.h"
#include "sysemu/sysemu.h"
#include "net/net.h"
-#include "monitor/monitor.h"
#include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-serial.h"
#include "hw/virtio/virtio-net.h"
#include "hw/sysbus.h"
#include "qemu/bitops.h"
+#include "qemu/error-report.h"
#include "hw/virtio/virtio-bus.h"
#include "hw/s390x/adapter.h"
#include "hw/s390x/s390_flic.h"
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 1c389c4d7e..52549f8beb 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -16,6 +16,7 @@
#include <sys/ioctl.h>
#include "config.h"
+#include "qemu/error-report.h"
#include "qemu/queue.h"
#include "monitor/monitor.h"
#include "migration/migration.h"
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index b50071ef93..2bb62211c3 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
@@ -27,6 +27,7 @@
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "ui/console.h"
+#include "qemu/error-report.h"
#include "qemu/timer.h"
#include "hw/timer/hpet.h"
#include "hw/sysbus.h"
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
index 8d8523a535..79a8f98af0 100644
--- a/hw/tpm/tpm_passthrough.c
+++ b/hw/tpm/tpm_passthrough.c
@@ -26,6 +26,7 @@
#include "qemu-common.h"
#include "qapi/error.h"
+#include "qemu/error-report.h"
#include "qemu/sockets.h"
#include "sysemu/tpm_backend.h"
#include "tpm_int.h"
diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index 375167573d..5f39e1e3ac 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -1,6 +1,7 @@
#include "hw/hw.h"
#include "hw/usb.h"
#include "hw/qdev.h"
+#include "qemu/error-report.h"
#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
#include "trace.h"
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index aa1c37aabd..72329ed7d7 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -33,7 +33,6 @@
#include "qemu/thread.h"
#include "sysemu/char.h"
-#include "monitor/monitor.h"
#include "ccid.h"
#define DPRINTF(card, lvl, fmt, ...) \
diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
index 10f1d309a6..85a4fc3e53 100644
--- a/hw/usb/ccid-card-passthru.c
+++ b/hw/usb/ccid-card-passthru.c
@@ -9,8 +9,8 @@
*/
#include "sysemu/char.h"
+#include "qemu/error-report.h"
#include "qemu/sockets.h"
-#include "monitor/monitor.h"
#include "ccid.h"
#include "libcacard/vscard_common.h"
diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c
index 743c231d6b..5eeb4c6b06 100644
--- a/hw/usb/dev-network.c
+++ b/hw/usb/dev-network.c
@@ -1397,7 +1397,7 @@ static USBDevice *usb_net_init(USBBus *bus, const char *cmdline)
QemuOpts *opts;
int idx;
- opts = qemu_opts_parse(qemu_find_opts("net"), cmdline, 0);
+ opts = qemu_opts_parse_noisily(qemu_find_opts("net"), cmdline, false);
if (!opts) {
return NULL;
}
diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c
index 6ca3da9727..a6a66008ec 100644
--- a/hw/usb/dev-serial.c
+++ b/hw/usb/dev-serial.c
@@ -9,7 +9,7 @@
*/
#include "qemu-common.h"
-#include "monitor/monitor.h"
+#include "qemu/error-report.h"
#include "hw/usb.h"
#include "hw/usb/desc.h"
#include "sysemu/char.h"
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 2d29367ae7..de534bab37 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -38,7 +38,6 @@
#include "qemu/error-report.h"
#include "hw/usb.h"
#include "hw/usb/desc.h"
-#include "monitor/monitor.h"
#include "ccid.h"
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index abe0e1d6a1..9a4e7dc0cb 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -8,6 +8,7 @@
*/
#include "qemu-common.h"
+#include "qemu/error-report.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
#include "hw/usb.h"
diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h
index 87b240f70a..30218423c8 100644
--- a/hw/usb/hcd-ehci.h
+++ b/hw/usb/hcd-ehci.h
@@ -20,7 +20,6 @@
#include "hw/hw.h"
#include "qemu/timer.h"
#include "hw/usb.h"
-#include "monitor/monitor.h"
#include "sysemu/dma.h"
#include "sysemu/sysemu.h"
#include "hw/pci/pci.h"
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 10f4735ddf..bc2944c6b2 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -38,6 +38,7 @@
#include "qemu-common.h"
#include "monitor/monitor.h"
+#include "qemu/error-report.h"
#include "sysemu/sysemu.h"
#include "trace.h"
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 6b4218c037..25df25fd0f 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -27,8 +27,9 @@
#include "qemu-common.h"
#include "qemu/timer.h"
-#include "monitor/monitor.h"
#include "sysemu/sysemu.h"
+#include "qapi/qmp/qerror.h"
+#include "qemu/error-report.h"
#include "qemu/iov.h"
#include "sysemu/char.h"
@@ -1369,7 +1370,7 @@ static void usbredir_realize(USBDevice *udev, Error **errp)
int i;
if (dev->cs == NULL) {
- error_set(errp, QERR_MISSING_PARAMETER, "chardev");
+ error_setg(errp, QERR_MISSING_PARAMETER, "chardev");
return;
}
@@ -1378,8 +1379,8 @@ static void usbredir_realize(USBDevice *udev, Error **errp)
&dev->filter_rules,
&dev->filter_rules_count);
if (i) {
- error_set(errp, QERR_INVALID_PARAMETER_VALUE, "filter",
- "a usb device filter string");
+ error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "filter",
+ "a usb device filter string");
return;
}
}
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index 22b1d87d0e..740ed3102b 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -11,7 +11,6 @@
#include "qemu/iov.h"
#include "hw/qdev.h"
-#include "qapi/qmp/qerror.h"
#include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-rng.h"
#include "sysemu/rng.h"