int para_fchdir(int fd);
int mmap_full_file(const char *filename, int open_mode, void **map,
size_t *size, int *fd_ptr);
-int para_munmap(void *start, size_t length);
+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);
/**
* A wrapper for mkdir(2).
return -ERRNO_TO_ERROR(errno);
}
+/**
+ * A wrapper for rename(2).
+ *
+ * \param old_path The source path.
+ * \param new_path The destination path.
+ *
+ * \return Standard.
+ *
+ * \sa rename(2).
+ */
+_static_inline_ int osl_rename(const char *old_path, const char *new_path)
+{
+ if (rename(old_path, new_path) < 0)
+ return -ERRNO_TO_ERROR(errno);
+ return 1;
+}