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:
Markus Armbruster 2024-10-10 17:01:40 +02:00
parent 0f799b83bd
commit 5551449bb8
5 changed files with 11 additions and 21 deletions

View file

@ -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;