*
* \sa truncate(2)
*/
-int para_truncate(const char *path, off_t size)
+int truncate_file(const char *path, off_t size)
{
int ret;
struct stat statbuf;
int osl_munmap(void *start, size_t length);
int write_all(int fd, const char *buf, size_t *len);
int write_file(const char *filename, const void *buf, size_t size);
-int para_truncate(const char *filename, off_t size);
+int truncate_file(const char *filename, off_t size);
/**
* A wrapper for mkdir(2).
DEBUG_LOG("unmapping index\n");
osl_munmap(t->index_map.data, t->index_map.size);
filename = index_filename(t->desc);
- ret = para_truncate(filename, t->row_index_size
+ ret = truncate_file(filename, t->row_index_size
* t->num_invalid_rows);
free(filename);
if (ret < 0)
if (!filename)
return -ERRNO_TO_ERROR(ENOMEM);
- ret = para_truncate(filename, size);
+ ret = truncate_file(filename, size);
free(filename);
return ret;
}
if (ret < 0) { /* truncate index and rollback changes */
char *filename = index_filename(t->desc);
if (filename)
- para_truncate(filename, t->row_index_size);
+ truncate_file(filename, t->row_index_size);
free(filename);
goto rollback;
}