Added lspci to core build and initrd
[tpg/acess2.git] / KernelLand / Modules / Filesystems / Ext2 / write.c
index 03109e8..22e256b 100644 (file)
@@ -18,10 +18,9 @@ void Ext2_int_DeallocateBlock(tExt2_Disk *Disk, Uint32 Block);
 
 // === 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;
@@ -120,7 +119,12 @@ addBlocks:
        }
        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

UCC git Repository :: git.ucc.asn.au