X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Finclude%2Fvfs.h;h=1aa073b26c76f9b306812fdf359ba865a118dd1d;hb=5f2024e5977e0cca0993a20dad5ab794c94d5711;hp=91771c8a6ebbe2bc0c477acbb9c4e3f03bc8114a;hpb=e56e258bdc6345e33454ddb127b2d87c536a0f39;p=tpg%2Facess2.git diff --git a/Kernel/include/vfs.h b/Kernel/include/vfs.h index 91771c8a..1aa073b2 100644 --- a/Kernel/include/vfs.h +++ b/Kernel/include/vfs.h @@ -26,6 +26,8 @@ */ typedef struct sVFS_SelectList tVFS_SelectList; +typedef struct sVFS_NodeType tVFS_NodeType; + /** * \name tVFS_Node Flags * \brief Flag values for tVFS_Node.Flags @@ -177,6 +179,22 @@ typedef struct sVFS_Node * \} */ + /** + * \brief Functions associated with the node + */ + tVFS_NodeType *Type; +} tVFS_Node; + +/** + * \brief Functions for a specific node type + */ +struct sVFS_NodeType +{ + /** + * \brief Debug name for the type + */ + const char *TypeName; + /** * \name Common Functions * \brief Functions that are used no matter the value of .Flags @@ -233,7 +251,7 @@ typedef struct sVFS_Node * \param Buffer Source of written data * \return Number of bytes read */ - Uint64 (*Write)(struct sVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer); + Uint64 (*Write)(struct sVFS_Node *Node, Uint64 Offset, Uint64 Length, const void *Buffer); /** * \brief Map a region of a file into memory @@ -299,14 +317,14 @@ typedef struct sVFS_Node * \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) + * \retur Zeron on success, non-zero on error (see errno.h) */ int (*Link)(struct sVFS_Node *Node, struct sVFS_Node *Child, const char *NewName); /** * \} */ -} tVFS_Node; +}; /** * \brief VFS Driver (Filesystem) Definition