git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added lspci to core build and initrd
[tpg/acess2.git]
/
KernelLand
/
Modules
/
Filesystems
/
Ext2
/
write.c
diff --git
a/KernelLand/Modules/Filesystems/Ext2/write.c
b/KernelLand/Modules/Filesystems/Ext2/write.c
index
03109e8
..
22e256b
100644
(file)
--- a/
KernelLand/Modules/Filesystems/Ext2/write.c
+++ b/
KernelLand/Modules/Filesystems/Ext2/write.c
@@
-18,10
+18,9
@@
void Ext2_int_DeallocateBlock(tExt2_Disk *Disk, Uint32 Block);
// === CODE ===
/**
// === CODE ===
/**
- * \fn Uint64 Ext2_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer)
* \brief Write to a file
*/
* \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;
{
tExt2_Disk *disk = Node->ImplPtr;
tExt2_Inode inode;
@@
-120,7
+119,12
@@
addBlocks:
}
base = block * disk->BlockSize;
VFS_WriteAt(disk->FD, base, retLen, Buffer);
}
base = block * disk->BlockSize;
VFS_WriteAt(disk->FD, base, retLen, Buffer);
+
+ // TODO: When should the size update be committed?
inode.i_size += retLen;
inode.i_size += retLen;
+ Node->Size += retLen;
+ Node->Flags |= VFS_FFLAG_DIRTY;
+
retLen = 0;
ret: // Makes sure the changes to the inode are committed
retLen = 0;
ret: // Makes sure the changes to the inode are committed
UCC
git Repository :: git.ucc.asn.au