Bugfixing
[tpg/acess2.git] / Kernel / include / vfs.h
index b75710f..057f7f4 100644 (file)
@@ -67,7 +67,7 @@
  */
 
 /**
- * \brief VFS Node
+ * \brief Represents a node (file or directory) in the VFS tree
  * 
  * This structure provides the VFS with the functions required to read/write
  * the file (or directory) that it represents.
@@ -87,12 +87,27 @@ typedef struct sVFS_Node
         * \}
         */
        
+       /**
+        * \name Node State
+        * \brief Stores the misc information about the node
+        * \{
+        */
         int    ReferenceCount; //!< Number of times the node is used
        
        Uint64  Size;   //!< File Size
        
        Uint32  Flags;  //!< File Flags
        
+       /**
+        * \brief Pointer to cached data (FS Specific)
+        * \note The Inode_* functions will free when the node is uncached
+        *       this if needed
+        */
+       void    *Data;
+       /**
+        * \}
+        */
+       
        /**
         * \name Times
         * \{
@@ -146,7 +161,7 @@ typedef struct sVFS_Node
         int    (*IOCtl)(struct sVFS_Node *Node, int Id, void *Data);
        
        /**
-        * }
+        * \}
         */
        
        /**
@@ -176,7 +191,7 @@ typedef struct sVFS_Node
        Uint64  (*Write)(struct sVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer);
        
        /**
-        * }
+        * \}
         */
        
        /**
@@ -210,7 +225,7 @@ typedef struct sVFS_Node
         * \param Node  Pointer to this node
         * \param Name  Name of the new child
         * \param Flags Flags to apply to the new child (directory or symlink)
-        * \return Boolean success
+        * \return Zero on Success, non-zero on error (see errno.h)
         */
         int    (*MkNod)(struct sVFS_Node *Node, char *Name, Uint Flags);
        
@@ -219,12 +234,21 @@ typedef struct sVFS_Node
         * \param Node  Pointer to this node
         * \param OldName       Name of the item to move/delete
         * \param NewName       New name (or NULL if unlinking is wanted)
-        * \return Boolean Success
+        * \return Zero on Success, non-zero on error (see errno.h)
         */
         int    (*Relink)(struct sVFS_Node *Node, char *OldName, char *NewName);
+       
+       /**
+        * \brief Link a node to a name
+        * \param Node  Pointer to this node (directory)
+        * \param Child Node to create a new link to
+        * \param NewName       Name for the new link
+        * \return Zeron on success, non-zero on error (see errno.h)
+        */
+        int    (*Link)(struct sVFS_Node *Node, struct sVFS_Node *Child, char *NewName);
         
         /**
-         * }
+         * \}
          */
 } tVFS_Node;
 

UCC git Repository :: git.ucc.asn.au