X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Finclude%2Fvfs.h;h=42b4255061fd0801725f40e38e236699863f451b;hb=344c700061dfe97b5e96211ec9257671fd5a7f33;hp=98bc02757cc9b551456e74a25092ad5af722435c;hpb=e02f66c7125bf18f77c6c53587238cbd49da2c89;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/include/vfs.h b/KernelLand/Kernel/include/vfs.h index 98bc0275..42b42550 100644 --- a/KernelLand/Kernel/include/vfs.h +++ b/KernelLand/Kernel/include/vfs.h @@ -286,7 +286,7 @@ struct sVFS_NodeType * \param Node Pointer to this node * \param Name Name of the file wanted * \return Pointer to the requested node or NULL if it cannot be found - * \note The node returned must be accessable until ::tVFS_Node.Close + * \note The node returned must be accessable until tVFS_NodeType::Close * is called and ReferenceCount reaches zero. */ struct sVFS_Node *(*FindDir)(struct sVFS_Node *Node, const char *Name); @@ -295,22 +295,19 @@ struct sVFS_NodeType * \brief Read from a directory * \param Node Pointer to this node * \param Pos Offset in the directory - * \return Pointer to the name of the item on the heap (will be freed - * by the caller). If the directory end has been reached, NULL - * will be returned. - * If an item is required to be skipped either &::NULLNode, - * ::VFS_SKIP or ::VFS_SKIPN(0...1023) will be returned. + * \param Dest Destination for filename + * \return Zero on success, negative on error or +ve for ignore entry */ - char *(*ReadDir)(struct sVFS_Node *Node, int Pos); + int (*ReadDir)(struct sVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]); /** * \brief Create a node in a directory * \param Node Pointer to this node * \param Name Name of the new child * \param Flags Flags to apply to the new child (directory or symlink) - * \return Zero on Success, non-zero on error (see errno.h) + * \return Created node or NULL on error */ - int (*MkNod)(struct sVFS_Node *Node, const char *Name, Uint Flags); + tVFS_Node *(*MkNod)(struct sVFS_Node *Node, const char *Name, Uint Flags); /** * \brief Relink (Rename/Remove) a file/directory @@ -325,7 +322,7 @@ struct sVFS_NodeType * \param Node Pointer to this node (directory) * \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) + * \return Zero on success, non-zero on error (see errno.h) */ int (*Link)(struct sVFS_Node *Node, const char *NewName, struct sVFS_Node *Child);