X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Finclude%2Fvfs.h;h=9cb9e5dece236b6b8fe900d65ea673f47621080d;hb=ce452fe1a1b499f519aaa7cb9722d4beeb2a6644;hp=b746d0e7db0a7a4ac7826013c5a50afde2434b1f;hpb=9dccbc6f16485ea62caa8c4153f6f878da8cbb0d;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/include/vfs.h b/KernelLand/Kernel/include/vfs.h index b746d0e7..9cb9e5de 100644 --- a/KernelLand/Kernel/include/vfs.h +++ b/KernelLand/Kernel/include/vfs.h @@ -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