Merge branch 'master' of ted.mutabah.net:acess2
[tpg/acess2.git] / KernelLand / Kernel / include / vfs.h
index b746d0e..9cb9e5d 100644 (file)
@@ -90,6 +90,11 @@ typedef struct sVFS_NodeType tVFS_NodeType;
  */
 typedef struct sVFS_Node
 {
+       /**
+        * \brief Functions associated with the node
+        */
+       tVFS_NodeType   *Type;
+       
        /**
         * \name Identifiers
         * \brief Fields used by the driver to identify what data this node
@@ -178,11 +183,6 @@ typedef struct sVFS_Node
        /**
         * \}
         */
-       
-       /**
-        * \brief Functions associated with the node
-        */
-       tVFS_NodeType   *Type;
 } tVFS_Node;
 
 /**
@@ -339,6 +339,15 @@ typedef struct sVFS_Driver
         */
        Uint    Flags;
        
+       /**
+        * \brief Detect if a volume is accessible using this driver
+        * \return Boolean success (with higher numbers being higher priority)
+        *
+        * E.g. FAT would return 1 as it's the lowest common denominator while ext2 might return 2,
+        * because it can be embedded in a FAT volume (and is a more fully featured filesystem).
+        */
+        int    (*Detect)(int FD);
+
        /**
         * \brief Callback to mount a device
         */
@@ -486,8 +495,9 @@ extern tVFS_Node    *Inode_CacheNode(int Handle, tVFS_Node *Node);
  * \brief Dereferences (and removes if needed) a node from the cache
  * \param Handle       A handle returned by Inode_GetHandle()
  * \param Inode        Value of the Inode field of the ::tVFS_Node you want to remove
+ * \return -1: Error (not present), 0: Not freed, 1: Freed
  */
-extern void    Inode_UncacheNode(int Handle, Uint64 Inode);
+extern int     Inode_UncacheNode(int Handle, Uint64 Inode);
 /**
  * \fn void Inode_ClearCache(int Handle)
  * \brief Clears the cache for a handle

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