summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/DiskBackedFileSystem.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-30 08:57:01 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-30 08:57:01 +0200
commit8f45a259fc9f8180b366cbaccac1af6d368e3b3a (patch)
tree5045baec395404f39728611190925f4ce39c2ae4 /Kernel/FileSystem/DiskBackedFileSystem.cpp
parentdd696e7c75c5fb630d10d0ce37e53d88fecb58a0 (diff)
downloadserenity-8f45a259fc9f8180b366cbaccac1af6d368e3b3a.zip
ByteBuffer: Remove pointer() in favor of data()
We had two ways to get the data inside a ByteBuffer. That was silly.
Diffstat (limited to 'Kernel/FileSystem/DiskBackedFileSystem.cpp')
-rw-r--r--Kernel/FileSystem/DiskBackedFileSystem.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/FileSystem/DiskBackedFileSystem.cpp b/Kernel/FileSystem/DiskBackedFileSystem.cpp
index 51b193f3b8..59d51ff4b4 100644
--- a/Kernel/FileSystem/DiskBackedFileSystem.cpp
+++ b/Kernel/FileSystem/DiskBackedFileSystem.cpp
@@ -107,7 +107,7 @@ ByteBuffer DiskBackedFS::read_block(unsigned index) const
auto buffer = ByteBuffer::create_uninitialized(block_size());
//kprintf("created block buffer with size %u\n", block_size());
DiskOffset base_offset = static_cast<DiskOffset>(index) * static_cast<DiskOffset>(block_size());
- auto* buffer_pointer = buffer.pointer();
+ auto* buffer_pointer = buffer.data();
bool success = device().read(base_offset, block_size(), buffer_pointer);
ASSERT(success);
ASSERT(buffer.size() == block_size());
@@ -126,13 +126,13 @@ ByteBuffer DiskBackedFS::read_blocks(unsigned index, unsigned count) const
if (count == 1)
return read_block(index);
auto blocks = ByteBuffer::create_uninitialized(count * block_size());
- u8* out = blocks.pointer();
+ u8* out = blocks.data();
for (unsigned i = 0; i < count; ++i) {
auto block = read_block(index + i);
if (!block)
return nullptr;
- memcpy(out, block.pointer(), block.size());
+ memcpy(out, block.data(), block.size());
out += block_size();
}