AVLs: Made an error message more informative
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
major = 3
|
major = 3
|
||||||
minor = 0
|
minor = 0
|
||||||
serial= '0-beta15'
|
serial= '0-beta15a'
|
||||||
|
|
||||||
version ="%d.%02d.%s" % (major,minor,serial)
|
version ="%d.%02d.%s" % (major,minor,serial)
|
||||||
|
@ -648,7 +648,7 @@ int truncate_avl_data_to_size_used(OBIDMS_avl_data_p avl_data) // TODO is it nec
|
|||||||
new_data_size = ((index_t) multiple) * getpagesize();
|
new_data_size = ((index_t) multiple) * getpagesize();
|
||||||
|
|
||||||
// Check that it is actually greater than the current size of the file, otherwise no need to truncate
|
// Check that it is actually greater than the current size of the file, otherwise no need to truncate
|
||||||
if ((avl_data->header)->data_size_max == new_data_size)
|
if ((avl_data->header)->data_size_max >= new_data_size)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// Get the file descriptor
|
// Get the file descriptor
|
||||||
@ -667,7 +667,7 @@ int truncate_avl_data_to_size_used(OBIDMS_avl_data_p avl_data) // TODO is it nec
|
|||||||
if (ftruncate(file_descriptor, file_size) < 0)
|
if (ftruncate(file_descriptor, file_size) < 0)
|
||||||
{
|
{
|
||||||
obi_set_errno(OBI_AVL_ERROR);
|
obi_set_errno(OBI_AVL_ERROR);
|
||||||
obidebug(1, "\nError truncating an AVL data file");
|
obidebug(1, "\nError truncating an AVL data file, old data size = %lld, new data size = %lld", (avl_data->header)->data_size_max, new_data_size);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user