mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-18 22:47:29 +00:00
Ext2FS: Implement writing into inodes with arbitrary offset and length.
Okay, this is pretty cool. :^) There are some issues and limitations for sure but the basic functionality is there.
This commit is contained in:
@@ -15,10 +15,10 @@ DiskBackedFS::~DiskBackedFS()
|
||||
|
||||
bool DiskBackedFS::writeBlock(unsigned index, const ByteBuffer& data)
|
||||
{
|
||||
ASSERT(data.size() == blockSize());
|
||||
#ifdef DBFS_DEBUG
|
||||
kprintf("DiskBackedFileSystem::writeBlock %u\n", index);
|
||||
kprintf("DiskBackedFileSystem::writeBlock %u, size=%u\n", index, data.size());
|
||||
#endif
|
||||
ASSERT(data.size() == blockSize());
|
||||
DiskOffset baseOffset = static_cast<DiskOffset>(index) * static_cast<DiskOffset>(blockSize());
|
||||
return device().write(baseOffset, blockSize(), data.pointer());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user