return 0;
}
+/**
+ * A wrapper for fchdir().
+ *
+ * \param fd An open file descriptor.
+ *
+ * \return Standard.
+ */
+static inline int __fchdir(int fd)
+{
+ if (fchdir(fd) < 0)
+ return -ERRNO_TO_ERROR(errno);
+ return 1;
+}
+
/**
* Traverse the given directory recursively.
*
ret = 1;
out:
closedir(dir);
- ret2 = para_fchdir(cwd_fd);
+ ret2 = __fchdir(cwd_fd);
if (ret2 < 0 && ret >= 0)
ret = ret2;
close(cwd_fd);
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)
break;
}
closedir(dir);
- ret2 = para_fchdir(cwd_fd);
+ ret2 = __fchdir(cwd_fd);
if (ret2 < 0 && ret >= 0)
ret = ret2;
close(cwd_fd);