19#include "../../libc/compilers/common/include/dirent.h"
22#include <sys/statfs.h>
29#define ATTR_MODE_SET (1 << 6)
33#define ATTR_ATIME_SET (1 << 7)
37#define ATTR_MTIME_SET (1 << 8)
41#define ATTR_UID_SET (1 << 9)
45#define ATTR_GID_SET (1 << 10)
48#ifndef AT_SYMLINK_NOFOLLOW
49#define AT_SYMLINK_NOFOLLOW 0x100
53#define UTIME_NOW 0x3fffffff
57#define UTIME_OMIT 0x3ffffffe
67#ifndef DFS_STDIO_OFFSET
68#define DFS_STDIO_OFFSET 3
72#define DFS_PATH_MAX 4096
76#define SECTOR_SIZE 512
79#define DFS_FS_FLAG_DEFAULT 0x00
80#define DFS_FS_FLAG_FULLPATH 0x01
83#define DFS_F_FREAD 0x01
84#define DFS_F_FWRITE 0x02
92 int rw = oflags & O_ACCMODE;
95 return (rw + 1) | oflags;
103 return (rw - 1) | fflags;
116const char *
dfs_subdir(
const char *directory,
const char *filename);
127#ifdef DFS_USING_POSIX
141int dfs_dup(
int oldfd,
int startfd);
rt_inline int dfs_oflags(int fflags)
rt_inline int dfs_fflags(int oflags)
struct dfs_fdtable * dfs_fdtable_get_global(void)
int dfs_dup(int oldfd, int startfd)
char * dfs_normalize_path(const char *directory, const char *filename)
void dfs_file_unlock(void)
int fdt_fd_associate_file(struct dfs_fdtable *fdt, int fd, struct dfs_file *file)
int dfs_fdtable_dup(struct dfs_fdtable *fdt_dst, struct dfs_fdtable *fdt_src, int fd_src)
Dup the specified fd_src from fdt_src to fdt_dst.
void fdt_fd_release(struct dfs_fdtable *fdt, int fd)
const char * dfs_subdir(const char *directory, const char *filename)
rt_err_t dfs_file_lock(void)
struct dfs_file * fd_get(int fd)
struct dfs_fdtable * dfs_fdtable_get(void)
int dfs_fdtable_drop_fd(struct dfs_fdtable *fdtab, int fd)
drop fd from the fd table.
struct dfs_file * fdt_get_file(struct dfs_fdtable *fdt, int fd)
int fdt_fd_new(struct dfs_fdtable *fdt)