X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fvfs%2Fmemfile.c;h=c197626ff4e85aac6b95d3c627245d89fba07d0b;hb=4d498b090274b87befa5652589e0aa54b2b6fe0a;hp=3c756713e52faea441b0d0e143bb05ec0a2e7486;hpb=4ab9a574c9301d9590c91209f62c348e1d8c8883;p=tpg%2Facess2.git diff --git a/Kernel/vfs/memfile.c b/Kernel/vfs/memfile.c index 3c756713..c197626f 100644 --- a/Kernel/vfs/memfile.c +++ b/Kernel/vfs/memfile.c @@ -7,7 +7,7 @@ #include // === PROTOTYPES === -tVFS_Node *VFS_MemFile_Create(tVFS_Node *Unused, char *Path); +tVFS_Node *VFS_MemFile_Create(tVFS_Node *Unused, const char *Path); void VFS_MemFile_Close(tVFS_Node *Node); Uint64 VFS_MemFile_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer); Uint64 VFS_MemFile_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer); @@ -21,13 +21,13 @@ tVFS_Node gVFS_MemRoot = { // === CODE === /** - * \fn tVFS_Node *VFS_MemFile_Create(tVFS_Node *Unused, char *Path) + * \fn tVFS_Node *VFS_MemFile_Create(tVFS_Node *Unused, const char *Path) * \note Treated as finddir by VFS_ParsePath */ -tVFS_Node *VFS_MemFile_Create(tVFS_Node *Unused, char *Path) +tVFS_Node *VFS_MemFile_Create(tVFS_Node *Unused, const char *Path) { Uint base, size; - char *str = Path; + const char *str = Path; tVFS_Node *ret; str++; // Eat '$' @@ -110,7 +110,7 @@ Uint64 VFS_MemFile_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buf Length = Node->Size - Offset; // Copy Data - memcpy(Buffer, Node->ImplPtr+Offset, Length); + memcpy(Buffer, (Uint8*)Node->ImplPtr + Offset, Length); return Length; } @@ -132,7 +132,7 @@ Uint64 VFS_MemFile_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Bu Length = Node->Size - Offset; // Copy Data - memcpy(Node->ImplPtr+Offset, Buffer, Length); + memcpy((Uint8*)Node->ImplPtr + Offset, Buffer, Length); return Length; }