qdev: Make functions taking Error ** return bool, not void
See recent commit "error: Document Error API usage rules" for rationale. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20200707160613.848843-32-armbru@redhat.com>
This commit is contained in:
parent
b783f54d60
commit
73ac1aac39
@ -421,7 +421,7 @@ const PropertyInfo qdev_prop_audiodev = {
|
||||
.set = set_audiodev,
|
||||
};
|
||||
|
||||
void qdev_prop_set_drive_err(DeviceState *dev, const char *name,
|
||||
bool qdev_prop_set_drive_err(DeviceState *dev, const char *name,
|
||||
BlockBackend *value, Error **errp)
|
||||
{
|
||||
const char *ref = "";
|
||||
@ -436,7 +436,7 @@ void qdev_prop_set_drive_err(DeviceState *dev, const char *name,
|
||||
}
|
||||
}
|
||||
|
||||
object_property_set_str(OBJECT(dev), name, ref, errp);
|
||||
return object_property_set_str(OBJECT(dev), name, ref, errp);
|
||||
}
|
||||
|
||||
void qdev_prop_set_drive(DeviceState *dev, const char *name,
|
||||
|
@ -239,7 +239,7 @@ extern const PropertyInfo qdev_prop_pcie_link_width;
|
||||
/*
|
||||
* Set properties between creation and realization.
|
||||
*/
|
||||
void qdev_prop_set_drive_err(DeviceState *dev, const char *name,
|
||||
bool qdev_prop_set_drive_err(DeviceState *dev, const char *name,
|
||||
BlockBackend *value, Error **errp);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user