diff options
author | Markus Armbruster | 2020-06-22 11:42:24 +0200 |
---|---|---|
committer | Markus Armbruster | 2020-06-23 16:07:07 +0200 |
commit | 934df912966683b942840f67b9d1a07c8cfea102 (patch) | |
tree | 17f3e4de0095b30a947992d1b7614981c1aff186 /hw/m68k/q800.c | |
parent | qdev: Reject chardev property override (diff) | |
download | qemu-934df912966683b942840f67b9d1a07c8cfea102.tar.gz qemu-934df912966683b942840f67b9d1a07c8cfea102.tar.xz qemu-934df912966683b942840f67b9d1a07c8cfea102.zip |
qdev: Make qdev_prop_set_drive() match the other helpers
qdev_prop_set_drive() can fail. None of the other qdev_prop_set_FOO()
can; they abort on error.
To clean up this inconsistency, rename qdev_prop_set_drive() to
qdev_prop_set_drive_err(), and create a qdev_prop_set_drive() that
aborts on error.
Coccinelle script to update callers:
@ depends on !(file in "hw/core/qdev-properties-system.c")@
expression dev, name, value;
symbol error_abort;
@@
- qdev_prop_set_drive(dev, name, value, &error_abort);
+ qdev_prop_set_drive(dev, name, value);
@@
expression dev, name, value, errp;
@@
- qdev_prop_set_drive(dev, name, value, errp);
+ qdev_prop_set_drive_err(dev, name, value, errp);
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200622094227.1271650-14-armbru@redhat.com>
Diffstat (limited to 'hw/m68k/q800.c')
-rw-r--r-- | hw/m68k/q800.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 503ec54f5d..459d326af0 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -221,8 +221,7 @@ static void q800_init(MachineState *machine) via_dev = qdev_new(TYPE_MAC_VIA); dinfo = drive_get(IF_MTD, 0, 0); if (dinfo) { - qdev_prop_set_drive(via_dev, "drive", blk_by_legacy_dinfo(dinfo), - &error_abort); + qdev_prop_set_drive(via_dev, "drive", blk_by_legacy_dinfo(dinfo)); } sysbus = SYS_BUS_DEVICE(via_dev); sysbus_realize_and_unref(sysbus, &error_fatal); |