mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-30 13:31:52 -06:00
block: Adjust check_block_size() signature
Parameter @id is no longer used, drop. Return a bool to indicate success / failure, as recommended by qapi/error.h. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20241010150144.986655-4-armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
0f799b83bd
commit
5551449bb8
5 changed files with 11 additions and 21 deletions
|
@ -588,18 +588,14 @@ const PropertyInfo qdev_prop_losttickpolicy = {
|
|||
static void set_blocksize(Object *obj, Visitor *v, const char *name,
|
||||
void *opaque, Error **errp)
|
||||
{
|
||||
DeviceState *dev = DEVICE(obj);
|
||||
Property *prop = opaque;
|
||||
uint32_t *ptr = object_field_prop_ptr(obj, prop);
|
||||
uint64_t value;
|
||||
Error *local_err = NULL;
|
||||
|
||||
if (!visit_type_size(v, name, &value, errp)) {
|
||||
return;
|
||||
}
|
||||
check_block_size(dev->id ? : "", name, value, &local_err);
|
||||
if (local_err) {
|
||||
error_propagate(errp, local_err);
|
||||
if (!check_block_size(name, value, errp)) {
|
||||
return;
|
||||
}
|
||||
*ptr = value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue