X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/8c6f505faaa66e18cdca108dca549d4ad806a077..f044ca812256b421e793c4335ce1ffed74710a70:/lunaix-os/includes/lunaix/fs.h diff --git a/lunaix-os/includes/lunaix/fs.h b/lunaix-os/includes/lunaix/fs.h index 4b28881..d90a773 100644 --- a/lunaix-os/includes/lunaix/fs.h +++ b/lunaix-os/includes/lunaix/fs.h @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -19,11 +20,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 @@ -37,6 +48,9 @@ #define TEST_FD(fd) (fd >= 0 && fd < VFS_MAX_FD) +#define EXPORT_FILE_SYSTEM(fs_id, init_fn) \ + export_ldga_el(fs, fs_id, ptr_t, init_fn) + #define VFS_VALID_CHAR(chr) \ (('A' <= (chr) && (chr) <= 'Z') || ('a' <= (chr) && (chr) <= 'z') || \ ('0' <= (chr) && (chr) <= '9') || (chr) == '.' || (chr) == '_' || \