47 }; |
47 }; |
48 typedef enum VFSAioOp VFSAioOp; |
48 typedef enum VFSAioOp VFSAioOp; |
49 |
49 |
50 int vfs_init(); |
50 int vfs_init(); |
51 |
51 |
52 typedef int(*vfs_op_f)(VFSContext *, char *); |
52 typedef int(*vfs_op_f)(VFSContext *, const char *); |
53 typedef int(*sys_op_f)(VFSContext *, char *, SysACL *); |
53 typedef int(*sys_op_f)(VFSContext *, const char *, SysACL *); |
54 int vfs_path_op(VFSContext *ctx, char *path, vfs_op_f op, uint32_t access); |
54 int vfs_path_op(VFSContext *ctx, const char *path, vfs_op_f op, uint32_t access); |
55 |
55 |
56 SYS_FILE sys_vfs_open(VFSContext *ctx, char *path, int oflags); |
56 SYS_FILE sys_vfs_open(VFSContext *ctx, const char *path, int oflags); |
57 int sys_vfs_stat(VFSContext *ctx, char *path, struct stat *buf); |
57 int sys_vfs_stat(VFSContext *ctx, const char *path, struct stat *buf); |
58 int sys_vfs_fstat(VFSContext *ctx, SYS_FILE fd, struct stat *buf); |
58 int sys_vfs_fstat(VFSContext *ctx, SYS_FILE fd, struct stat *buf); |
59 VFS_DIR sys_vfs_opendir(VFSContext *ctx, char *path); |
59 VFS_DIR sys_vfs_opendir(VFSContext *ctx, const char *path); |
60 VFS_DIR sys_vfs_fdopendir(VFSContext *ctx, SYS_FILE fd); |
60 VFS_DIR sys_vfs_fdopendir(VFSContext *ctx, SYS_FILE fd); |
61 int sys_vfs_mkdir(VFSContext *ctx, char *path); |
61 int sys_vfs_mkdir(VFSContext *ctx, const char *path); |
62 int sys_vfs_unlink(VFSContext *ctx, char *path); |
62 int sys_vfs_unlink(VFSContext *ctx, const char *path); |
63 |
63 |
64 int sys_path_op(VFSContext *ctx, char *path, sys_op_f op); |
64 int sys_path_op(VFSContext *ctx, const char *path, sys_op_f op); |
65 int sys_acl_check(VFSContext *ctx, uint32_t access_mask, SysACL *externacl); |
65 int sys_acl_check(VFSContext *ctx, uint32_t access_mask, SysACL *externacl); |
66 void sys_set_error_status(VFSContext *ctx); |
66 void sys_set_error_status(VFSContext *ctx); |
67 |
67 |
68 ssize_t sys_file_read(SYS_FILE fd, void *buf, size_t nbyte); |
68 ssize_t sys_file_read(SYS_FILE fd, void *buf, size_t nbyte); |
69 ssize_t sys_file_write(SYS_FILE fd, const void *buf, size_t nbyte); |
69 ssize_t sys_file_write(SYS_FILE fd, const void *buf, size_t nbyte); |
75 int sys_file_aiowrite(aiocb_s *aiocb); |
75 int sys_file_aiowrite(aiocb_s *aiocb); |
76 |
76 |
77 int sys_dir_read(VFS_DIR dir, VFS_ENTRY *entry, int getstat); |
77 int sys_dir_read(VFS_DIR dir, VFS_ENTRY *entry, int getstat); |
78 void sys_dir_close(VFS_DIR dir); |
78 void sys_dir_close(VFS_DIR dir); |
79 |
79 |
80 int sys_mkdir(VFSContext *ctx, char *path, SysACL *sysacl); |
80 int sys_mkdir(VFSContext *ctx, const char *path, SysACL *sysacl); |
81 int sys_unlink(VFSContext *ctx, char *path, SysACL *sysacl); |
81 int sys_unlink(VFSContext *ctx, const char *path, SysACL *sysacl); |
82 |
82 |
83 void vfs_queue_aio(aiocb_s *aiocb, VFSAioOp op); |
83 void vfs_queue_aio(aiocb_s *aiocb, VFSAioOp op); |
84 |
84 |
85 #ifdef __cplusplus |
85 #ifdef __cplusplus |
86 } |
86 } |