X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Finclude%2Fvfs.h;h=59824e23907f0fe87b6584a43d1a4223c03fe661;hb=8c23fb908ad7ad37472ed83e0753bdfbab19ae13;hp=6afe309a1677623748f4cd8a87e11372ceb39b2e;hpb=3d86fd985109d04865582d0ae8c5440bf4c0c14b;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/include/vfs.h b/KernelLand/Kernel/include/vfs.h index 6afe309a..59824e23 100644 --- a/KernelLand/Kernel/include/vfs.h +++ b/KernelLand/Kernel/include/vfs.h @@ -20,6 +20,7 @@ #define _VFS_H #include +#include /** * \brief Thread list datatype for VFS_Select @@ -294,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