X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Finclude%2Fvfs_ext.h;h=42d986549cdc50e7dada4118350a700c5bbbe717;hb=d7dcea0e5a8df0f479e99f168a10b9a9535c7ad6;hp=99a64e3be3c897581e15441d27908fb36d141475;hpb=3c3c26b58055f511af5b7f0c3ab22e83961c775f;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/include/vfs_ext.h b/KernelLand/Kernel/include/vfs_ext.h index 99a64e3b..42d98654 100644 --- a/KernelLand/Kernel/include/vfs_ext.h +++ b/KernelLand/Kernel/include/vfs_ext.h @@ -328,6 +328,16 @@ extern size_t VFS_ReadAt(int FD, Uint64 Offset, size_t Length, void *Buffer); */ extern size_t VFS_WriteAt(int FD, Uint64 Offset, size_t Length, const void *Buffer); +/** + * \brief Set the valid size of a file + * \param FD File descriptor + * \param Size New file size + * \return Actual new file size (-1 if error occurred) + * + * \note Not all files support this call (will return ENOTIMPL) + */ +extern off_t VFS_Truncate(int FD, off_t Size); + /** * \brief Sends an IOCtl request to the driver * \param FD File handle returned by ::VFS_Open