summaryrefslogtreecommitdiff
path: root/Source/Kernel/VFS
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-09-11 16:22:30 +0200
committerAlexis211 <alexis211@gmail.com>2009-09-11 16:22:30 +0200
commit7b0d6ac9f903296c7537cec9ac606d49cb364049 (patch)
treec9bc6aaf4e7237cf5577f3a78291f1f591fe1563 /Source/Kernel/VFS
parentd95452c5452b4ca7418505fa5597f000596fcb78 (diff)
downloadMelon-7b0d6ac9f903296c7537cec9ac606d49cb364049.tar.gz
Melon-7b0d6ac9f903296c7537cec9ac606d49cb364049.zip
Nothing, really
Diffstat (limited to 'Source/Kernel/VFS')
-rw-r--r--Source/Kernel/VFS/Partition.class.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Kernel/VFS/Partition.class.cpp b/Source/Kernel/VFS/Partition.class.cpp
index 1032dee..b62f33c 100644
--- a/Source/Kernel/VFS/Partition.class.cpp
+++ b/Source/Kernel/VFS/Partition.class.cpp
@@ -1,5 +1,7 @@
#include "Partition.class.h"
+using namespace CMem; //For memcpy
+
Partition::Partition(BlockDevice* dev, u8int partnumber, u64int startblock, u64int blockcount) {
m_device = dev;
m_partnumber = partnumber;
@@ -49,7 +51,7 @@ bool Partition::write(u64int start, u32int length, u8int *data) {
if (!readBlocks(startBlock, 1, buff)) return false;
}
if (lastBlock != startBlock and (length + offset) % blksz != 0) {
- if (!readBlocks(lastBlock, 1, buff + ((blocks - 1) * blksize))) return false;
+ if (!readBlocks(lastBlock, 1, buff + ((blocks - 1) * blksz))) return false;
}
memcpy(buff + offset, data, length);
if (!writeBlocks(startBlock, blocks, buff)) return false;