X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Finclude%2Fvfs_ext.h;h=44c70f869dd58bcca9a5aad5a9f1a75b18c4443c;hb=68f8179ab9eb6380323dc4b19cf4cc1603b576f5;hp=8cabfa18f4facde6afe5c071c7d083237a28c96c;hpb=4842e2d6740bcb81da4e94019285bfd2c45425b8;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/include/vfs_ext.h b/KernelLand/Kernel/include/vfs_ext.h index 8cabfa18..44c70f86 100644 --- a/KernelLand/Kernel/include/vfs_ext.h +++ b/KernelLand/Kernel/include/vfs_ext.h @@ -13,6 +13,7 @@ typedef Uint64 tInode; typedef Uint32 tMount; // === CONSTANTS === +#define FILENAME_MAX 256 //! Maximum size of a Memory Path generated by VFS_GetMemPath #define VFS_MEMPATH_SIZE (3 + (BITS/4)*2) /** @@ -276,7 +277,7 @@ extern Uint64 VFS_Tell(int FD); * \param Buffer Destination of read data * \return Number of read bytes */ -extern Uint64 VFS_Read(int FD, Uint64 Length, void *Buffer); +extern size_t VFS_Read(int FD, size_t Length, void *Buffer); /** * \brief Writes data to a file * \param FD File handle returned by ::VFS_Open @@ -284,7 +285,7 @@ extern Uint64 VFS_Read(int FD, Uint64 Length, void *Buffer); * \param Buffer Source of written data * \return Number of bytes written */ -extern Uint64 VFS_Write(int FD, Uint64 Length, const void *Buffer); +extern size_t VFS_Write(int FD, size_t Length, const void *Buffer); /** * \brief Reads from a specific offset in the file @@ -294,7 +295,7 @@ extern Uint64 VFS_Write(int FD, Uint64 Length, const void *Buffer); * \param Buffer Source of read data * \return Number of bytes read */ -extern Uint64 VFS_ReadAt(int FD, Uint64 Offset, Uint64 Length, void *Buffer); +extern size_t VFS_ReadAt(int FD, Uint64 Offset, size_t Length, void *Buffer); /** * \brief Writes to a specific offset in the file * \param FD File handle returned by ::VFS_Open @@ -303,7 +304,7 @@ extern Uint64 VFS_ReadAt(int FD, Uint64 Offset, Uint64 Length, void *Buffer); * \param Buffer Source of written data * \return Number of bytes written */ -extern Uint64 VFS_WriteAt(int FD, Uint64 Offset, Uint64 Length, const void *Buffer); +extern size_t VFS_WriteAt(int FD, Uint64 Offset, size_t Length, const void *Buffer); /** * \brief Sends an IOCtl request to the driver @@ -368,10 +369,10 @@ extern int VFS_Symlink(const char *Name, const char *Link); /** * \brief Read from a directory * \param FD File handle returned by ::VFS_Open - * \param Dest Destination array for the file name (max 255 bytes) + * \param Dest Destination array for the file name (max FILENAME_MAX bytes) * \return Boolean Success */ -extern int VFS_ReadDir(int FD, char *Dest); +extern int VFS_ReadDir(int FD, char Dest[FILENAME_MAX]); /** * \brief Wait for an aciton on a file descriptor * \param MaxHandle Maximum set handle in \a *Handles