Imported Upstream version 3.3.1
[debian/amanda] / device-src / device.c
index 921b9480c45b42f5c87382bc86af61df78755985..f0258d5d25b20cba4b4a69aa999312e21016fa82 100644 (file)
@@ -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;