*
* \sa open(2).
*/
-int para_open(const char *path, int flags, mode_t mode)
+int osl_open(const char *path, int flags, mode_t mode)
{
int ret = open(path, flags, mode);
int ret;
if (cwd) {
- ret = para_open(".", O_RDONLY, 0);
+ ret = osl_open(".", O_RDONLY, 0);
if (ret < 0)
return ret;
*cwd = ret;
*
* \return Standard.
*
- * \sa para_open(), mmap(2).
+ * \sa osl_open(), mmap(2).
*/
int mmap_full_file(const char *path, int open_mode, void **map,
size_t *size, int *fd_ptr)
mmap_prot = PROT_READ | PROT_WRITE;
mmap_flags = MAP_SHARED;
}
- ret = para_open(path, open_mode, 0);
+ ret = osl_open(path, open_mode, 0);
if (ret < 0)
return ret;
fd = ret;
/** \file fd.h exported symbols from fd.c */
-int para_open(const char *path, int flags, mode_t mode);
+int osl_open(const char *path, int flags, mode_t mode);
int para_opendir(const char *dirname, DIR **dir, int *cwd);
int para_mkdir(const char *path, mode_t mode);
int para_fchdir(int fd);
* \param buf The buffer to write to the file.
* \param size The size of \a buf.
*
- * \return Positive on success, negative on errors. Possible errors include:
- * any errors from para_open() or para_write().
- *
- * \sa para_open(), para_write().
+ * \return Standard.
*/
static int write_file(const char *filename, const void *buf, size_t size)
{
int ret, fd;
- ret = para_open(filename, O_WRONLY | O_CREAT | O_EXCL, 0644);
+ ret = osl_open(filename, O_WRONLY | O_CREAT | O_EXCL, 0644);
if (ret < 0)
return ret;
fd = ret;
int ret, fd;
// DEBUG_LOG("appending %zu + %zu bytes\n", header_size, data_size);
- ret = para_open(filename, O_WRONLY | O_CREAT | O_APPEND, 0644);
+ ret = osl_open(filename, O_WRONLY | O_CREAT | O_APPEND, 0644);
if (ret < 0)
return ret;
fd = ret;
goto out;
INFO_LOG("filename: %s\n", filename);
if (cd->storage_type == OSL_MAPPED_STORAGE) {
- ret = para_open(filename, O_RDWR | O_CREAT | O_EXCL,
+ ret = osl_open(filename, O_RDWR | O_CREAT | O_EXCL,
0644);
free(filename);
if (ret < 0)