Kernel - Fixed screen not updating in VT framebuffer mode
[tpg/acess2.git] / KernelLand / Kernel / include / vfs.h
index 0977e28..98bc027 100644 (file)
@@ -20,6 +20,7 @@
 #define _VFS_H
 
 #include <acess.h>
+#include <mutex.h>
 
 /**
  * \brief Thread list datatype for VFS_Select
@@ -77,7 +78,15 @@ typedef struct sVFS_NodeType tVFS_NodeType;
  * is unmapped. Nice for read-only files and memory-only files (or 
  * pseudo-readonly filesystems)
  */
-#define VFS_FFLAG_NOWRITEBACK
+#define VFS_FFLAG_NOWRITEBACK  0x1000
+
+/**
+ * \brief "Dirty Metadata" Flag
+ *
+ * Indicates that the node's metadata has been altered since the flag was last
+ * cleared. Tells the driver that it should update the inode at the next flush.
+ */
+#define VFS_FFLAG_DIRTY        0x8000
 /**
  * \}
  */
@@ -90,6 +99,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 +192,6 @@ typedef struct sVFS_Node
        /**
         * \}
         */
-       
-       /**
-        * \brief Functions associated with the node
-        */
-       tVFS_NodeType   *Type;
 } tVFS_Node;
 
 /**
@@ -339,6 +348,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
         */

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