mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
error: Use error_report_err() where appropriate
Coccinelle semantic patch:
@@
expression E;
@@
- error_report("%s", error_get_pretty(E));
- error_free(E);
+ error_report_err(E);
@@
expression E, S;
@@
- error_report("%s", error_get_pretty(E));
+ error_report_err(E);
(
exit(S);
|
abort();
)
Trivial manual touch-ups in block/sheepdog.c.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
+1
-2
@@ -1093,8 +1093,7 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
|
|||||||
|
|
||||||
ret = qemu_ram_resize(block->offset, length, &local_err);
|
ret = qemu_ram_resize(block->offset, length, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
+13
-26
@@ -726,8 +726,7 @@ static coroutine_fn void reconnect_to_sdog(void *opaque)
|
|||||||
s->fd = get_sheep_fd(s, &local_err);
|
s->fd = get_sheep_fd(s, &local_err);
|
||||||
if (s->fd < 0) {
|
if (s->fd < 0) {
|
||||||
DPRINTF("Wait for connection to be established\n");
|
DPRINTF("Wait for connection to be established\n");
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
co_aio_sleep_ns(bdrv_get_aio_context(s->bs), QEMU_CLOCK_REALTIME,
|
co_aio_sleep_ns(bdrv_get_aio_context(s->bs), QEMU_CLOCK_REALTIME,
|
||||||
1000000000ULL);
|
1000000000ULL);
|
||||||
}
|
}
|
||||||
@@ -1283,8 +1282,7 @@ static int reload_inode(BDRVSheepdogState *s, uint32_t snapid, const char *tag)
|
|||||||
|
|
||||||
fd = connect_to_sdog(s, &local_err);
|
fd = connect_to_sdog(s, &local_err);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
error_report("%s", error_get_pretty(local_err));;
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1292,8 +1290,7 @@ static int reload_inode(BDRVSheepdogState *s, uint32_t snapid, const char *tag)
|
|||||||
|
|
||||||
ret = find_vdi_name(s, s->name, snapid, tag, &vid, false, &local_err);
|
ret = find_vdi_name(s, s->name, snapid, tag, &vid, false, &local_err);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
error_report("%s", error_get_pretty(local_err));;
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1785,8 +1782,7 @@ static void sd_close(BlockDriverState *bs)
|
|||||||
|
|
||||||
fd = connect_to_sdog(s, &local_err);
|
fd = connect_to_sdog(s, &local_err);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
error_report("%s", error_get_pretty(local_err));;
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1838,8 +1834,7 @@ static int sd_truncate(BlockDriverState *bs, int64_t offset)
|
|||||||
|
|
||||||
fd = connect_to_sdog(s, &local_err);
|
fd = connect_to_sdog(s, &local_err);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
error_report("%s", error_get_pretty(local_err));;
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1912,8 +1907,7 @@ static bool sd_delete(BDRVSheepdogState *s)
|
|||||||
|
|
||||||
fd = connect_to_sdog(s, &local_err);
|
fd = connect_to_sdog(s, &local_err);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
error_report("%s", error_get_pretty(local_err));;
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1960,8 +1954,7 @@ static int sd_create_branch(BDRVSheepdogState *s)
|
|||||||
deleted = sd_delete(s);
|
deleted = sd_delete(s);
|
||||||
ret = do_sd_create(s, &vid, !deleted, &local_err);
|
ret = do_sd_create(s, &vid, !deleted, &local_err);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
error_report("%s", error_get_pretty(local_err));;
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1969,8 +1962,7 @@ static int sd_create_branch(BDRVSheepdogState *s)
|
|||||||
|
|
||||||
fd = connect_to_sdog(s, &local_err);
|
fd = connect_to_sdog(s, &local_err);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
error_report("%s", error_get_pretty(local_err));;
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
ret = fd;
|
ret = fd;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -2218,8 +2210,7 @@ static int sd_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
|
|||||||
/* refresh inode. */
|
/* refresh inode. */
|
||||||
fd = connect_to_sdog(s, &local_err);
|
fd = connect_to_sdog(s, &local_err);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
error_report("%s", error_get_pretty(local_err));;
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
ret = fd;
|
ret = fd;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -2234,8 +2225,7 @@ static int sd_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
|
|||||||
|
|
||||||
ret = do_sd_create(s, &new_vid, 1, &local_err);
|
ret = do_sd_create(s, &new_vid, 1, &local_err);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
error_report("%s", error_get_pretty(local_err));;
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
error_report("failed to create inode for snapshot. %s",
|
error_report("failed to create inode for snapshot. %s",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -2336,8 +2326,7 @@ static int sd_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_tab)
|
|||||||
|
|
||||||
fd = connect_to_sdog(s, &local_err);
|
fd = connect_to_sdog(s, &local_err);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
error_report("%s", error_get_pretty(local_err));;
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
ret = fd;
|
ret = fd;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -2366,8 +2355,7 @@ static int sd_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_tab)
|
|||||||
|
|
||||||
fd = connect_to_sdog(s, &local_err);
|
fd = connect_to_sdog(s, &local_err);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
error_report("%s", error_get_pretty(local_err));;
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
ret = fd;
|
ret = fd;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -2429,8 +2417,7 @@ static int do_load_save_vmstate(BDRVSheepdogState *s, uint8_t *data,
|
|||||||
|
|
||||||
fd = connect_to_sdog(s, &local_err);
|
fd = connect_to_sdog(s, &local_err);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
error_report("%s", error_get_pretty(local_err));;
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-8
@@ -728,8 +728,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType block_default_type)
|
|||||||
qemu_opt_rename(all_opts, opt_renames[i].from, opt_renames[i].to,
|
qemu_opt_rename(all_opts, opt_renames[i].from, opt_renames[i].to,
|
||||||
&local_err);
|
&local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -767,8 +766,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType block_default_type)
|
|||||||
&error_abort);
|
&error_abort);
|
||||||
qemu_opts_absorb_qdict(legacy_opts, bs_opts, &local_err);
|
qemu_opts_absorb_qdict(legacy_opts, bs_opts, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -983,8 +981,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType block_default_type)
|
|||||||
bs_opts = NULL;
|
bs_opts = NULL;
|
||||||
if (!blk) {
|
if (!blk) {
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
}
|
}
|
||||||
goto fail;
|
goto fail;
|
||||||
} else {
|
} else {
|
||||||
@@ -1978,8 +1975,7 @@ int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data)
|
|||||||
aio_context_acquire(aio_context);
|
aio_context_acquire(aio_context);
|
||||||
|
|
||||||
if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_DRIVE_DEL, &local_err)) {
|
if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_DRIVE_DEL, &local_err)) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
aio_context_release(aio_context);
|
aio_context_release(aio_context);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -158,7 +158,7 @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem,
|
|||||||
if (object_property_find(cpuobj, "has_el3", NULL)) {
|
if (object_property_find(cpuobj, "has_el3", NULL)) {
|
||||||
object_property_set_bool(cpuobj, false, "has_el3", &err);
|
object_property_set_bool(cpuobj, false, "has_el3", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -168,7 +168,7 @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem,
|
|||||||
"reset-cbar", &error_abort);
|
"reset-cbar", &error_abort);
|
||||||
object_property_set_bool(cpuobj, true, "realized", &err);
|
object_property_set_bool(cpuobj, true, "realized", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -248,7 +248,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
|
|||||||
if (object_property_find(cpuobj, "has_el3", NULL)) {
|
if (object_property_find(cpuobj, "has_el3", NULL)) {
|
||||||
object_property_set_bool(cpuobj, false, "has_el3", &err);
|
object_property_set_bool(cpuobj, false, "has_el3", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -259,7 +259,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
|
|||||||
}
|
}
|
||||||
object_property_set_bool(cpuobj, true, "realized", &err);
|
object_property_set_bool(cpuobj, true, "realized", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
cpu_irq[n] = qdev_get_gpio_in(DEVICE(cpu), ARM_CPU_IRQ);
|
cpu_irq[n] = qdev_get_gpio_in(DEVICE(cpu), ARM_CPU_IRQ);
|
||||||
|
|||||||
@@ -500,14 +500,14 @@ static void integratorcp_init(MachineState *machine)
|
|||||||
if (object_property_find(cpuobj, "has_el3", NULL)) {
|
if (object_property_find(cpuobj, "has_el3", NULL)) {
|
||||||
object_property_set_bool(cpuobj, false, "has_el3", &err);
|
object_property_set_bool(cpuobj, false, "has_el3", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object_property_set_bool(cpuobj, true, "realized", &err);
|
object_property_set_bool(cpuobj, true, "realized", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -108,7 +108,7 @@ static void realview_init(MachineState *machine,
|
|||||||
if (object_property_find(cpuobj, "has_el3", NULL)) {
|
if (object_property_find(cpuobj, "has_el3", NULL)) {
|
||||||
object_property_set_bool(cpuobj, false, "has_el3", &err);
|
object_property_set_bool(cpuobj, false, "has_el3", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,14 +116,14 @@ static void realview_init(MachineState *machine,
|
|||||||
if (is_pb && is_mpcore) {
|
if (is_pb && is_mpcore) {
|
||||||
object_property_set_int(cpuobj, periphbase, "reset-cbar", &err);
|
object_property_set_int(cpuobj, periphbase, "reset-cbar", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object_property_set_bool(cpuobj, true, "realized", &err);
|
object_property_set_bool(cpuobj, true, "realized", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -213,14 +213,14 @@ static void versatile_init(MachineState *machine, int board_id)
|
|||||||
if (object_property_find(cpuobj, "has_el3", NULL)) {
|
if (object_property_find(cpuobj, "has_el3", NULL)) {
|
||||||
object_property_set_bool(cpuobj, false, "has_el3", &err);
|
object_property_set_bool(cpuobj, false, "has_el3", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object_property_set_bool(cpuobj, true, "realized", &err);
|
object_property_set_bool(cpuobj, true, "realized", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -223,7 +223,7 @@ static void init_cpus(const char *cpu_model, const char *privdev,
|
|||||||
}
|
}
|
||||||
object_property_set_bool(cpuobj, true, "realized", &err);
|
object_property_set_bool(cpuobj, true, "realized", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,25 +133,25 @@ static void zynq_init(MachineState *machine)
|
|||||||
if (object_property_find(OBJECT(cpu), "has_el3", NULL)) {
|
if (object_property_find(OBJECT(cpu), "has_el3", NULL)) {
|
||||||
object_property_set_bool(OBJECT(cpu), false, "has_el3", &err);
|
object_property_set_bool(OBJECT(cpu), false, "has_el3", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object_property_set_int(OBJECT(cpu), ZYNQ_BOARD_MIDR, "midr", &err);
|
object_property_set_int(OBJECT(cpu), ZYNQ_BOARD_MIDR, "midr", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
object_property_set_int(OBJECT(cpu), MPCORE_PERIPHBASE, "reset-cbar", &err);
|
object_property_set_int(OBJECT(cpu), MPCORE_PERIPHBASE, "reset-cbar", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
object_property_set_bool(OBJECT(cpu), true, "realized", &err);
|
object_property_set_bool(OBJECT(cpu), true, "realized", &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -858,8 +858,7 @@ static void virtio_blk_migration_state_changed(Notifier *notifier, void *data)
|
|||||||
virtio_blk_data_plane_create(VIRTIO_DEVICE(s), &s->conf,
|
virtio_blk_data_plane_create(VIRTIO_DEVICE(s), &s->conf,
|
||||||
&s->dataplane, &err);
|
&s->dataplane, &err);
|
||||||
if (err != NULL) {
|
if (err != NULL) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
error_free(err);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-4
@@ -906,8 +906,7 @@ SerialState *serial_init(int base, qemu_irq irq, int baudbase,
|
|||||||
s->chr = chr;
|
s->chr = chr;
|
||||||
serial_realize_core(s, &err);
|
serial_realize_core(s, &err);
|
||||||
if (err != NULL) {
|
if (err != NULL) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
error_free(err);
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -970,8 +969,7 @@ SerialState *serial_mm_init(MemoryRegion *address_space,
|
|||||||
|
|
||||||
serial_realize_core(s, &err);
|
serial_realize_core(s, &err);
|
||||||
if (err != NULL) {
|
if (err != NULL) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
error_free(err);
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
vmstate_register(NULL, base, &vmstate_serial, s);
|
vmstate_register(NULL, base, &vmstate_serial, s);
|
||||||
|
|||||||
@@ -953,8 +953,7 @@ static void assigned_dev_update_irq_routing(PCIDevice *dev)
|
|||||||
|
|
||||||
r = assign_intx(assigned_dev, &err);
|
r = assign_intx(assigned_dev, &err);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
error_free(err);
|
|
||||||
err = NULL;
|
err = NULL;
|
||||||
qdev_unplug(&dev->qdev, &err);
|
qdev_unplug(&dev->qdev, &err);
|
||||||
assert(!err);
|
assert(!err);
|
||||||
@@ -1010,8 +1009,7 @@ static void assigned_dev_update_msi(PCIDevice *pci_dev)
|
|||||||
|
|
||||||
assign_intx(assigned_dev, &local_err);
|
assign_intx(assigned_dev, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1158,8 +1156,7 @@ static void assigned_dev_update_msix(PCIDevice *pci_dev)
|
|||||||
|
|
||||||
assign_intx(assigned_dev, &local_err);
|
assign_intx(assigned_dev, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-3
@@ -414,7 +414,7 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size,
|
|||||||
|
|
||||||
set_boot_dev(s, boot_device, &local_err);
|
set_boot_dev(s, boot_device, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1040,8 +1040,7 @@ void pc_cpus_init(const char *cpu_model, DeviceState *icc_bridge)
|
|||||||
cpu = pc_new_cpu(cpu_model, x86_cpu_apic_id_from_index(i),
|
cpu = pc_new_cpu(cpu_model, x86_cpu_apic_id_from_index(i),
|
||||||
icc_bridge, &error);
|
icc_bridge, &error);
|
||||||
if (error) {
|
if (error) {
|
||||||
error_report("%s", error_get_pretty(error));
|
error_report_err(error);
|
||||||
error_free(error);
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-7
@@ -908,7 +908,7 @@ void smbios_entry_add(QemuOpts *opts)
|
|||||||
|
|
||||||
qemu_opts_validate(opts, qemu_smbios_file_opts, &local_err);
|
qemu_opts_validate(opts, qemu_smbios_file_opts, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -994,7 +994,7 @@ void smbios_entry_add(QemuOpts *opts)
|
|||||||
case 0:
|
case 0:
|
||||||
qemu_opts_validate(opts, qemu_smbios_type0_opts, &local_err);
|
qemu_opts_validate(opts, qemu_smbios_type0_opts, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
save_opt(&type0.vendor, opts, "vendor");
|
save_opt(&type0.vendor, opts, "vendor");
|
||||||
@@ -1014,7 +1014,7 @@ void smbios_entry_add(QemuOpts *opts)
|
|||||||
case 1:
|
case 1:
|
||||||
qemu_opts_validate(opts, qemu_smbios_type1_opts, &local_err);
|
qemu_opts_validate(opts, qemu_smbios_type1_opts, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
save_opt(&type1.manufacturer, opts, "manufacturer");
|
save_opt(&type1.manufacturer, opts, "manufacturer");
|
||||||
@@ -1036,7 +1036,7 @@ void smbios_entry_add(QemuOpts *opts)
|
|||||||
case 2:
|
case 2:
|
||||||
qemu_opts_validate(opts, qemu_smbios_type2_opts, &local_err);
|
qemu_opts_validate(opts, qemu_smbios_type2_opts, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
save_opt(&type2.manufacturer, opts, "manufacturer");
|
save_opt(&type2.manufacturer, opts, "manufacturer");
|
||||||
@@ -1049,7 +1049,7 @@ void smbios_entry_add(QemuOpts *opts)
|
|||||||
case 3:
|
case 3:
|
||||||
qemu_opts_validate(opts, qemu_smbios_type3_opts, &local_err);
|
qemu_opts_validate(opts, qemu_smbios_type3_opts, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
save_opt(&type3.manufacturer, opts, "manufacturer");
|
save_opt(&type3.manufacturer, opts, "manufacturer");
|
||||||
@@ -1061,7 +1061,7 @@ void smbios_entry_add(QemuOpts *opts)
|
|||||||
case 4:
|
case 4:
|
||||||
qemu_opts_validate(opts, qemu_smbios_type4_opts, &local_err);
|
qemu_opts_validate(opts, qemu_smbios_type4_opts, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
save_opt(&type4.sock_pfx, opts, "sock_pfx");
|
save_opt(&type4.sock_pfx, opts, "sock_pfx");
|
||||||
@@ -1074,7 +1074,7 @@ void smbios_entry_add(QemuOpts *opts)
|
|||||||
case 17:
|
case 17:
|
||||||
qemu_opts_validate(opts, qemu_smbios_type17_opts, &local_err);
|
qemu_opts_validate(opts, qemu_smbios_type17_opts, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
save_opt(&type17.loc_pfx, opts, "loc_pfx");
|
save_opt(&type17.loc_pfx, opts, "loc_pfx");
|
||||||
|
|||||||
+1
-2
@@ -172,8 +172,7 @@ static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind)
|
|||||||
if (kind != IDE_CD) {
|
if (kind != IDE_CD) {
|
||||||
blkconf_geometry(&dev->conf, &dev->chs_trans, 65536, 16, 255, &err);
|
blkconf_geometry(&dev->conf, &dev->chs_trans, 65536, 16, 255, &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report("%s", error_get_pretty(err));
|
error_report_err(err);
|
||||||
error_free(err);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,8 +132,7 @@ static int scsi_hot_add(Monitor *mon, DeviceState *adapter,
|
|||||||
dinfo->unit, false, -1, NULL,
|
dinfo->unit, false, -1, NULL,
|
||||||
&local_err);
|
&local_err);
|
||||||
if (!scsidev) {
|
if (!scsidev) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
dinfo->unit = scsidev->id;
|
dinfo->unit = scsidev->id;
|
||||||
|
|||||||
+1
-2
@@ -2038,8 +2038,7 @@ int pci_add_capability(PCIDevice *pdev, uint8_t cap_id,
|
|||||||
ret = pci_add_capability2(pdev, cap_id, offset, size, &local_err);
|
ret = pci_add_capability2(pdev, cap_id, offset, size, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
assert(ret < 0);
|
assert(ret < 0);
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
} else {
|
} else {
|
||||||
/* success implies a positive offset in config space */
|
/* success implies a positive offset in config space */
|
||||||
assert(ret > 0);
|
assert(ret > 0);
|
||||||
|
|||||||
@@ -1399,8 +1399,7 @@ static USBDevice *usb_net_init(USBBus *bus, const char *cmdline)
|
|||||||
|
|
||||||
idx = net_client_init(opts, 0, &local_err);
|
idx = net_client_init(opts, 0, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -878,8 +878,7 @@ static int usb_host_open(USBHostDevice *s, libusb_device *dev)
|
|||||||
|
|
||||||
usb_device_attach(udev, &local_err);
|
usb_device_attach(udev, &local_err);
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
error_report_err(local_err);
|
||||||
error_free(local_err);
|
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user