// === CODE ===
/**
- * \fn Uint64 Ext2_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer)
* \brief Write to a file
*/
-Uint64 Ext2_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, const void *Buffer)
+size_t Ext2_Write(tVFS_Node *Node, off_t Offset, size_t Length, const void *Buffer)
{
tExt2_Disk *disk = Node->ImplPtr;
tExt2_Inode inode;
}
base = block * disk->BlockSize;
VFS_WriteAt(disk->FD, base, retLen, Buffer);
+
+ // TODO: When should the size update be committed?
inode.i_size += retLen;
+ Node->Size += retLen;
+ Node->Flags |= VFS_FFLAG_DIRTY;
+
retLen = 0;
ret: // Makes sure the changes to the inode are committed