mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
qdev: Drop qbus_set_hotplug_handler() parameter @errp
qbus_set_hotplug_handler() is a simple wrapper around object_property_set_link(). object_property_set_link() fails when the property doesn't exist, is not settable, or its .check() method fails. These are all programming errors here, so passing &error_abort to qbus_set_hotplug_handler() is appropriate. Most of its callers do. Exceptions: * pcie_cap_slot_init(), shpc_init(), spapr_phb_realize() pass NULL, i.e. they ignore errors. * spapr_machine_init() passes &error_fatal. * s390_pcihost_realize(), virtio_serial_device_realize(), s390_pcihost_plug() pass the error to their callers. The latter two keep going after the error, which looks wrong. Drop the @errp parameter, and instead pass &error_abort to object_property_set_link(). Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Daniel P. Berrangé" <berrange@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200630090351.1247703-15-armbru@redhat.com>
This commit is contained in:
parent
cd7c866074
commit
9bc6bfdf67
15 changed files with 22 additions and 33 deletions
|
@ -535,8 +535,7 @@ extern bool qdev_hot_removed;
|
|||
|
||||
char *qdev_get_dev_path(DeviceState *dev);
|
||||
|
||||
void qbus_set_hotplug_handler(BusState *bus, Object *handler, Error **errp);
|
||||
|
||||
void qbus_set_hotplug_handler(BusState *bus, Object *handler);
|
||||
void qbus_set_bus_hotplug_handler(BusState *bus);
|
||||
|
||||
static inline bool qbus_is_hotpluggable(BusState *bus)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue