src/server/daemon/vfs.h

branch
aio
changeset 165
6942a8c3e737
parent 105
63d9051fe35c
child 172
5580517faafc
equal deleted inserted replaced
159:9ba9f8befa80 165:6942a8c3e737
44 int vfs_init(); 44 int vfs_init();
45 45
46 typedef int(*vfs_op_f)(VFSContext *, char *); 46 typedef int(*vfs_op_f)(VFSContext *, char *);
47 typedef int(*sys_op_f)(VFSContext *, char *, SysACL *); 47 typedef int(*sys_op_f)(VFSContext *, char *, SysACL *);
48 int vfs_path_op(VFSContext *ctx, char *path, vfs_op_f op, uint32_t access); 48 int vfs_path_op(VFSContext *ctx, char *path, vfs_op_f op, uint32_t access);
49 int sys_path_op(VFSContext *ctx, char *path, sys_op_f op, uint32_t access);
50 49
50 SYS_FILE sys_vfs_open(VFSContext *ctx, char *path, int oflags);
51 int sys_vfs_stat(VFSContext *ctx, char *path, struct stat *buf);
52 int sys_vfs_fstat(VFSContext *ctx, SYS_FILE fd, struct stat *buf);
53 VFS_DIR sys_vfs_opendir(VFSContext *ctx, char *path);
54 int sys_vfs_mkdir(VFSContext *ctx, char *path);
55 int sys_vfs_unlink(VFSContext *ctx, char *path);
56
57 int sys_path_op(VFSContext *ctx, char *path, sys_op_f op);
51 int sys_acl_check(VFSContext *ctx, uint32_t access_mask, SysACL *externacl); 58 int sys_acl_check(VFSContext *ctx, uint32_t access_mask, SysACL *externacl);
52 void sys_set_error_status(VFSContext *ctx); 59 void sys_set_error_status(VFSContext *ctx);
60
53 ssize_t sys_file_read(SYS_FILE fd, void *buf, size_t nbyte); 61 ssize_t sys_file_read(SYS_FILE fd, void *buf, size_t nbyte);
54 ssize_t sys_file_write(SYS_FILE fd, const void *buf, size_t nbyte); 62 ssize_t sys_file_write(SYS_FILE fd, const void *buf, size_t nbyte);
55 off_t sys_file_seek(SYS_FILE fd, off_t offset, int whence); 63 off_t sys_file_seek(SYS_FILE fd, off_t offset, int whence);
56 void sys_file_close(SYS_FILE fd); 64 void sys_file_close(SYS_FILE fd);
65
57 int sys_dir_read(VFS_DIR dir, VFS_ENTRY *entry, int getstat); 66 int sys_dir_read(VFS_DIR dir, VFS_ENTRY *entry, int getstat);
58 void sys_dir_close(VFS_DIR dir); 67 void sys_dir_close(VFS_DIR dir);
68
59 int sys_mkdir(VFSContext *ctx, char *path, SysACL *sysacl); 69 int sys_mkdir(VFSContext *ctx, char *path, SysACL *sysacl);
60 int sys_unlink(VFSContext *ctx, char *path, SysACL *sysacl); 70 int sys_unlink(VFSContext *ctx, char *path, SysACL *sysacl);
61 71
62 #ifdef __cplusplus 72 #ifdef __cplusplus
63 } 73 }

mercurial