X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device-src%2Fdevice.c;h=f0258d5d25b20cba4b4a69aa999312e21016fa82;hb=refs%2Ftags%2Fupstream%2F3.3.1;hp=921b9480c45b42f5c87382bc86af61df78755985;hpb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;p=debian%2Famanda diff --git a/device-src/device.c b/device-src/device.c index 921b948..f0258d5 100644 --- a/device-src/device.c +++ b/device-src/device.c @@ -881,8 +881,12 @@ property_set_block_size_fn( g_assert(block_size >= 0); /* int -> gsize (unsigned) */ if ((gsize)block_size < self->min_block_size - || (gsize)block_size > self->max_block_size) + || (gsize)block_size > self->max_block_size) { + device_set_error(self, + g_strdup_printf("Error setting BLOCK-SIZE property to '%zu', it must be between %zu and %zu", (gsize)block_size, self->min_block_size, self->max_block_size), + DEVICE_STATUS_DEVICE_ERROR); return FALSE; + } self->block_size = block_size; self->block_size_surety = surety;