X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/642855f81fd03b9fd6540ac99c665b57b4b38cc8..b6ff3c7dbab3f40d03389808d95ac27d416c35e3:/lunaix-os/includes/lunaix/fs.h diff --git a/lunaix-os/includes/lunaix/fs.h b/lunaix-os/includes/lunaix/fs.h index 59faabc..5fbcc90 100644 --- a/lunaix-os/includes/lunaix/fs.h +++ b/lunaix-os/includes/lunaix/fs.h @@ -19,11 +19,21 @@ #define VFS_IFFILE 0x2 #define VFS_IFSEQDEV 0x4 #define VFS_IFVOLDEV 0x8 -#define VFS_IFSYMLINK 0x16 +#define VFS_IFSYMLINK 0x10 +// Walk, mkdir if component encountered is non-exists. #define VFS_WALK_MKPARENT 0x1 + +// Walk, relative to current FS. #define VFS_WALK_FSRELATIVE 0x2 + +/* + Terminate the walk on the immediate parent, + name of child (last component) is returned through `component` +*/ #define VFS_WALK_PARENT 0x4 + +// Do not follow the symbolic link #define VFS_WALK_NOFOLLOW 0x8 #define VFS_HASHTABLE_BITS 10 @@ -396,6 +406,9 @@ vfs_get_dtype(int itype); void vfs_ref_dnode(struct v_dnode* dnode); +void +vfs_ref_file(struct v_file* file); + void vfs_unref_dnode(struct v_dnode* dnode);