feat: symlink(2) and realpathat syscall
[lunaix-os.git] / lunaix-os / includes / lunaix / fs.h
index d233ff09e0289d05f84e2a3c9578254766b7b7bf..bc22fd537e371c13f1c7c32e39f9256726a3c26b 100644 (file)
@@ -27,6 +27,7 @@
 #define VFS_WALK_MKPARENT 0x1
 #define VFS_WALK_FSRELATIVE 0x2
 #define VFS_WALK_PARENT 0x4
+#define VFS_WALK_NOFOLLOW 0x4
 
 #define VFS_IOBUF_FDIRTY 0x1
 
@@ -101,6 +102,7 @@ struct v_fd
 {
     struct v_file* file;
     int pos;
+    int flags;
 };
 
 struct v_inode
@@ -123,6 +125,8 @@ struct v_inode
         int (*rmdir)(struct v_inode* this);
         int (*unlink)(struct v_inode* this);
         int (*link)(struct v_inode* this, struct v_dnode* new_name);
+        int (*read_symlink)(struct v_inode* this, const char** path_out);
+        int (*symlink)(struct v_inode* this, const char* target);
         int (*dir_lookup)(struct v_inode* this, struct v_dnode* dnode);
     } ops;
 };