X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Finclude%2Fvfs.h;h=f2bf3212dcacd8cbe4a489d512c6d2967f8424d9;hb=49fee999ebaa079cbd48a98edd2323f7b0bbb03c;hp=1aa073b26c76f9b306812fdf359ba865a118dd1d;hpb=51ab5f489bc356940c95cc936fd0508e8f07ea97;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/include/vfs.h b/KernelLand/Kernel/include/vfs.h index 1aa073b2..f2bf3212 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 @@ -135,9 +140,9 @@ typedef struct sVFS_Node * \name Times * \{ */ - Sint64 ATime; //!< Last Accessed Time - Sint64 MTime; //!< Last Modified Time - Sint64 CTime; //!< Creation Time + tTime ATime; //!< Last Accessed Time + tTime MTime; //!< Last Modified Time + tTime CTime; //!< Creation Time /** * \} */ @@ -178,11 +183,6 @@ typedef struct sVFS_Node /** * \} */ - - /** - * \brief Functions associated with the node - */ - tVFS_NodeType *Type; } tVFS_Node; /** @@ -242,7 +242,7 @@ struct sVFS_NodeType * \param Buffer Destination for read data * \return Number of bytes read */ - Uint64 (*Read)(struct sVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer); + size_t (*Read)(struct sVFS_Node *Node, off_t Offset, size_t Length, void *Buffer); /** * \brief Write to the file * \param Node Pointer to this node @@ -251,7 +251,7 @@ struct sVFS_NodeType * \param Buffer Source of written data * \return Number of bytes read */ - Uint64 (*Write)(struct sVFS_Node *Node, Uint64 Offset, Uint64 Length, const void *Buffer); + size_t (*Write)(struct sVFS_Node *Node, off_t Offset, size_t Length, const void *Buffer); /** * \brief Map a region of a file into memory @@ -262,7 +262,7 @@ struct sVFS_NodeType * \return Boolean Failure * \note If NULL, the VFS implements it using .Read */ - int (*MMap)(struct sVFS_Node *Node, Uint64 Offset, int Length, void *Dest); + int (*MMap)(struct sVFS_Node *Node, off_t Offset, int Length, void *Dest); /** * \} @@ -307,19 +307,18 @@ struct sVFS_NodeType * \brief Relink (Rename/Remove) a file/directory * \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 Zero on Success, non-zero on error (see errno.h) */ - int (*Relink)(struct sVFS_Node *Node, const char *OldName, const char *NewName); + int (*Unlink)(struct sVFS_Node *Node, const char *OldName); /** * \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 + * \param Child Node to create a new link to * \retur Zeron on success, non-zero on error (see errno.h) */ - int (*Link)(struct sVFS_Node *Node, struct sVFS_Node *Child, const char *NewName); + int (*Link)(struct sVFS_Node *Node, const char *NewName, struct sVFS_Node *Child); /** * \}